/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #ffffff;
    --bg-soft: #f3f3f3;
    --bg-muted: #e8e8e8;
    --primary: #131921;
    --primary-mid: #232f3e;
    --primary-light: #37475a;
    --accent: #febd69;
    --accent-dk: #f3a847;
    --accent-bg: #fff8ee;
    --link: #007185;
    --link-dk: #c7511f;
    --txt: #0f1111;
    --txt2: #565959;
    --txt3: #767676;
    --border: #dddddd;
    --border2: #cccccc;
    --sd1: 0 1px 3px rgba(0,0,0,.08);
    --sd2: 0 2px 8px rgba(0,0,0,.12);
    --sd3: 0 4px 16px rgba(0,0,0,.16);
    --rad: 4px;
    --rad2: 3px;
    --rad3: 8px;
}

html { font-size: 15px; }

body {
    background: var(--bg-soft);
    color: var(--txt);
    font-family: "Amazon Ember","Helvetica Neue",Helvetica,Arial,sans-serif;
    line-height: 1.6;
}

a { color: var(--link); text-decoration: none; transition: color .15s; }
a:hover { color: var(--link-dk); text-decoration: underline; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
.cf::after { content: ''; display: table; clear: both; }

/* ===== WRAPPER ===== */
.site-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 12px;
}

/* ===== SITE HEADER ===== */
.top-header {
    background: var(--primary);
    padding: 8px 0;
}

.top-header .site-container {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: nowrap;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.site-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.site-title-text {
    font-size: 1.28rem;
    font-weight: 700;
    color: #ffffff;
    font-style: normal;
    letter-spacing: -.2px;
    text-decoration: none;
    border-bottom: none;
}

.domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-light);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 3px;
    padding: 4px 12px;
}

.domain-badge .badge-label {
    font-size: 0.68rem;
    color: rgba(255,255,255,.65);
    white-space: nowrap;
}

.domain-badge .badge-domain {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
}

/* ===== BANNER ===== */
.promo-zone {
    margin: 4px 0 3px;
}
.promo-zone img { border-radius: var(--rad); width: 100%; }

/* ===== CATEGORY NAV ===== */
.cat-nav-box {
    background: var(--primary-mid);
    border-radius: var(--rad);
    overflow: hidden;
    margin: 3px 0;
}

.cat-nav-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid rgba(255,255,255,.08);
    min-height: 36px;
}

.cat-nav-row:last-child { border-bottom: none; }

.zone-tag {
    background: rgba(0,0,0,.25);
    color: rgba(255,255,255,.75);
    font-size: .68rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px 2px;
    width: 64px;
    min-width: 64px;
    border-right: 1px solid rgba(255,255,255,.08);
    text-align: center;
    line-height: 1.3;
    letter-spacing: .3px;
    flex-shrink: 0;
}

.zone-links {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    align-items: center;
    padding: 4px 8px;
    gap: 3px;
    flex: 1;
}

.zone-links a {
    font-size: .81rem;
    color: rgba(255,255,255,.88);
    padding: 3px 5px;
    border-radius: var(--rad2);
    transition: all .15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    border: 1px solid transparent;
    text-decoration: none;
    display: block;
}

.zone-links a:hover {
    background: rgba(255,255,255,.12);
    color: var(--accent);
    text-decoration: none;
}

.zone-links a.active {
    background: var(--accent);
    color: var(--primary);
    border-color: var(--accent-dk);
    font-weight: 700;
}

/* ===== SEARCH ===== */
.search-panel {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--rad);
    padding: 8px 12px;
    margin: 3px 0;
    box-shadow: var(--sd1);
}

.search-panel form {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
}

.search-panel input[type="text"] {
    flex: 1;
    min-width: 0;
    height: 38px;
    border: 1px solid var(--border2);
    border-radius: var(--rad2);
    padding: 0 12px;
    font-size: .88rem;
    color: var(--txt);
    background: var(--bg);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}

.search-panel input[type="text"]:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(254,189,105,.35);
}

.search-panel button {
    height: 38px;
    padding: 0 13px;
    border: 1px solid;
    border-radius: var(--rad2);
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
    flex-shrink: 0;
    background: var(--primary-mid);
    border-color: var(--primary);
    color: #fff;
}

.search-panel button:hover { background: var(--primary-light); }

.search-panel button[value="1"] {
    background: var(--accent);
    border-color: var(--accent-dk);
    color: var(--primary);
}
.search-panel button[value="1"]:hover { background: var(--accent-dk); }

.search-panel button[value="2"] {
    background: #e8922a;
    border-color: #c97a20;
    color: #fff;
}
.search-panel button[value="2"]:hover { background: #c97a20; }

/* ===== HOT TAGS ===== */
.tag-cloud-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--rad);
    padding: 7px 12px;
    margin: 3px 0;
    box-shadow: var(--sd1);
}

.tag-cloud-box h4 {
    font-size: .79rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.tag-items {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.tag-items .tg {
    display: inline-block;
    background: var(--bg-soft);
    color: var(--txt2);
    border: 1px solid var(--border);
    border-radius: 2px;
    padding: 2px 9px;
    font-size: .75rem;
    text-decoration: none;
    transition: all .15s;
}

.tag-items .tg:hover {
    background: var(--accent-bg);
    color: var(--link-dk);
    border-color: var(--accent-dk);
    text-decoration: none;
}

/* ===== CONTENT SECTION ===== */
.content-block {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--rad3);
    padding: 12px 12px 10px;
    margin: 4px 0;
    box-shadow: var(--sd1);
}

.block-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 7px;
    border-bottom: 2px solid var(--bg-muted);
    position: relative;
}

.block-header::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 36px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

.block-header h3 {
    font-size: .96rem;
    font-weight: 700;
    color: var(--primary);
}

.block-header h3 a { color: var(--primary); text-decoration: none; }
.block-header h3 a:hover { color: var(--link); text-decoration: none; }

.block-header h4 {
    font-size: .93rem;
    font-weight: 700;
    color: var(--primary);
}

/* ===== FILM GRID ===== */
.movie-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.movie-grid li {
    border-radius: var(--rad);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    transition: box-shadow .18s, transform .18s;
}

.movie-grid li:hover {
    box-shadow: var(--sd3);
    transform: translateY(-2px);
}

.thumb-link {
    display: block;
    width: 100%;
    aspect-ratio: 600 / 350;
    overflow: hidden;
    background: var(--bg-muted);
}

.thumb-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .28s;
}

.thumb-link:hover img { transform: scale(1.04); }

.movie-caption {
    padding: 5px 7px 7px;
}

.movie-caption h5 {
    font-size: .77rem;
    font-weight: 400;
    color: var(--txt);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-caption h5 a { color: var(--txt); text-decoration: none; }
.movie-caption h5 a:hover { color: var(--link); text-decoration: underline; }

/* ===== PAGINATION ===== */
.pager-wrap {
    margin: 12px 0 5px;
    display: flex;
    justify-content: center;
}

.pager-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    justify-content: center;
}

.pager-inner a.pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 9px;
    background: var(--bg);
    border: 1px solid var(--border2);
    border-radius: var(--rad2);
    font-size: .83rem;
    color: var(--txt2);
    text-decoration: none;
    transition: all .15s;
}

.pager-inner a.pager-btn:hover {
    background: var(--accent-bg);
    border-color: var(--accent-dk);
    color: var(--link-dk);
    text-decoration: none;
}

.pager-inner a.pager-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 9px;
    background: var(--accent);
    border: 1px solid var(--accent-dk);
    border-radius: var(--rad2);
    font-size: .83rem;
    font-weight: 700;
    color: var(--primary);
    cursor: default;
}

/* ===== FOOTER ===== */
.friend-links-box {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--rad);
    padding: 9px 12px;
    margin: 4px 0;
    box-shadow: var(--sd1);
}

.flink-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.flink-list dd { display: inline; }

.flink-list a {
    display: inline-block;
    font-size: .76rem;
    color: var(--txt3);
    padding: 2px 8px;
    border-radius: 2px;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    text-decoration: none;
    transition: all .15s;
}

.flink-list a:hover {
    color: var(--link);
    border-color: var(--link);
    text-decoration: none;
}

.copyright-bar {
    text-align: center;
    padding: 8px 0 14px;
    color: var(--txt3);
    font-size: .75rem;
}

/* ===== DETAIL PAGES ===== */
.detail-heading {
    line-height: 1.8;
    text-align: center;
    padding: 12px 14px;
    font-size: .96rem;
    margin: 4px 0;
    word-break: break-all;
    background: var(--bg);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--rad);
    box-shadow: var(--sd1);
}

.detail-heading a {
    color: var(--link-dk);
    font-weight: 700;
    margin-right: 6px;
}

.detail-meta {
    font-size: .9rem;
    line-height: 2;
    padding: 14px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--rad);
    box-shadow: var(--sd1);
    margin: 4px 0;
}

.preview-area {
    display: block;
    width: 100%;
    margin-top: 10px;
}

.preview-area picture,
.preview-area img {
    width: 100%;
    height: auto;
    border-radius: var(--rad2);
    display: block;
}

/* ===== DL BUTTONS ===== */
.action-btns {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 9px 22px;
    background: var(--accent);
    color: var(--primary);
    border: 1px solid var(--accent-dk);
    border-radius: var(--rad2);
    font-size: .88rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s, transform .12s;
    text-decoration: none;
}

.action-btn:hover {
    background: var(--accent-dk);
    color: var(--primary);
    transform: translateY(-1px);
    text-decoration: none;
}

.client-hint {
    text-align: center;
    padding: 6px;
    font-size: .81rem;
}

.client-hint a { color: var(--primary-mid); font-weight: 600; }
.client-hint a:hover { color: var(--link); }

/* ===== SHARE BAR ===== */
.share-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-soft);
    border: 1px solid var(--border);
    border-radius: var(--rad);
    padding: 7px 12px;
    margin: 4px 0;
    flex-wrap: wrap;
}

.share-row .share-label { font-size: .76rem; color: var(--txt3); white-space: nowrap; }
.share-row .share-url { font-size: .78rem; color: var(--txt2); flex: 1; min-width: 0; word-break: break-all; }

.share-row .share-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 13px;
    background: var(--primary-mid);
    color: #fff;
    border: 1px solid var(--primary);
    border-radius: var(--rad2);
    font-size: .79rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    flex-shrink: 0;
}

.share-row .share-copy-btn:hover { background: var(--accent); color: var(--primary); }

/* ===== VIS HELPERS ===== */
.show-pc { display: block; }
.show-mb { display: none; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .movie-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .show-pc { display: none; }
    .show-mb { display: block; }
}

@media (max-width: 768px) {
    html { font-size: 14px; }

    .site-title-text { font-size: 1.05rem; }
    .domain-badge .badge-domain { font-size: .9rem; }

    .cat-nav-row {
        align-items: stretch;
    }

    .zone-tag {
        width: 15%;
        min-width: 15%;
        max-width: 15%;
        font-size: 10px;
        padding: 3px 1px;
        letter-spacing: 0;
        line-height: 1.4;
        word-break: break-all;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .zone-links {
        width: 85%;
        flex: 1;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 2px;
        padding: 3px 4px;
        align-items: center;
    }

    .zone-links a {
        font-size: 13px;
        padding: 4px 2px;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    }

    /* Search single row, no wrap */
    .search-panel form {
        flex-wrap: nowrap;
        gap: 3px;
    }

    .search-panel input[type="text"] {
        height: 34px;
        font-size: .78rem;
        padding: 0 6px;
    }

    .search-panel button {
        height: 34px;
        padding: 0 7px;
        font-size: .72rem;
    }

    /* Film grid: 2 columns */
    .movie-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 7px;
    }

    .thumb-link { aspect-ratio: 600 / 350; }
    .movie-caption h5 { font-size: .72rem; }
    .content-block { padding: 9px 9px 7px; }
    .action-btn { padding: 8px 14px; font-size: .83rem; }
}

@media (min-width: 481px) and (max-width: 768px) {
    .zone-tag { font-size: 10px; }
    .zone-links a { font-size: 13px; }
}

@media (max-width: 380px) {
    .zone-tag { font-size: 10px; }
    .zone-links a { font-size: 12px; }
    .search-panel button { padding: 0 5px; font-size: .67rem; }
}
