/* Film & Media Portal — Warm Sunset Theme */

:root {
    --clr-a: #ff6b35;
    --clr-b: #f7c59f;
    --clr-c: #4a1942;
    --clr-d: #e63946;
    --clr-e: #ff9f1c;
    --clr-f: #ffffff;
    --clr-g: #1a1a2e;
    --clr-h: #16213e;
    --clr-i: #0f3460;
    --clr-j: #533483;

    --accent-warm: #ff6b35;
    --accent-cool: #533483;
    --accent-gold: #ff9f1c;
    --text-main: #1a1a2e;
    --text-muted: #6b5b7b;
    --text-light: #9b8faa;
    --surface: #ffffff;
    --surface-alt: #fdf6ff;
    --surface-warm: #fff8f4;
    --border-soft: #e8ddf0;
    --border-warm: #ffd4bc;
    --shadow-sm: 0 2px 8px rgba(83, 52, 131, 0.08);
    --shadow-md: 0 4px 16px rgba(83, 52, 131, 0.14);
    --shadow-lg: 0 8px 32px rgba(83, 52, 131, 0.18);
    --grad-main: linear-gradient(135deg, #ff6b35 0%, #e63946 40%, #533483 100%);
    --grad-warm: linear-gradient(135deg, #ff9f1c 0%, #ff6b35 100%);
    --grad-cool: linear-gradient(135deg, #533483 0%, #4a1942 100%);
    --grad-subtle: linear-gradient(135deg, #fff8f4 0%, #fdf6ff 100%);
    --curve: 10px;
    --curve-sm: 6px;
    --curve-lg: 16px;
    --ease: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', 'Helvetica Neue', Arial, sans-serif;
    background: var(--surface-alt);
    color: var(--text-main);
    line-height: 1.55;
    font-size: 15px;
    overflow-x: hidden;
}

/* ===================== HEADER ===================== */
.pg-header {
    background: var(--surface);
    border-bottom: 2px solid var(--border-warm);
    padding: 0.65rem 0;
    box-shadow: var(--shadow-sm);
}

.pg-header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: center;
}

.brand-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: var(--ease);
}

.brand-link:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.brand-title {
    font-size: 26px;
    font-weight: 900;
    background: var(--grad-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.3px;
    font-style: normal;
    text-decoration: none;
    border-bottom: none;
}

.domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: var(--grad-warm);
    border-radius: 20px;
    box-shadow: 0 3px 10px rgba(255, 107, 53, 0.3);
    animation: glow-pulse 2.5s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 3px 10px rgba(255, 107, 53, 0.3); }
    50% { box-shadow: 0 3px 18px rgba(255, 107, 53, 0.55); }
}

.domain-tag {
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.domain-val {
    font-size: 17px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.2px;
    white-space: nowrap;
}

/* ===================== LAYOUT ===================== */
.wrap {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 14px;
}

.section-pad {
    padding: 12px 0;
}

/* ===================== BANNER ===================== */
.promo-strip {
    width: 100%;
    overflow: hidden;
    margin: 2px 0;
}

.promo-strip a {
    display: block;
    line-height: 0;
}

.promo-strip img {
    width: 100%;
    display: block;
    border-radius: var(--curve);
}

/* ===================== NAV ===================== */
.cat-nav {
    background: var(--surface);
    border-radius: var(--curve);
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-sm);
}

.cat-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--border-soft);
}

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

.cat-zone {
    font-size: 14px;
    font-weight: 700;
    color: var(--surface);
    background: var(--grad-cool);
    width: 10%;
    min-width: 52px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 4px;
    flex-shrink: 0;
    border-right: 2px solid var(--border-soft);
    white-space: nowrap;
    overflow: hidden;
}

.cat-items {
    width: 90%;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 10px;
    align-items: center;
}

.cat-items a {
    display: inline-block;
    color: var(--text-main);
    text-decoration: none;
    padding: 5px 4px;
    border-radius: var(--curve-sm);
    transition: var(--ease);
    background: var(--surface-alt);
    border: 1px solid var(--border-soft);
    white-space: nowrap;
    text-align: center;
    width: calc((100% - 42px) / 8);
    flex-shrink: 0;
    flex-grow: 0;
    font-size: 13px;
}

.cat-items a:hover {
    background: var(--grad-warm);
    color: #fff;
    border-color: var(--accent-warm);
    box-shadow: 0 3px 10px rgba(255, 107, 53, 0.25);
    transform: translateY(-1px);
}

.cat-items a.active {
    background: var(--grad-warm);
    color: #fff;
    border-color: var(--accent-warm);
    box-shadow: 0 3px 10px rgba(255, 107, 53, 0.3);
    font-weight: 700;
}

/* ===================== SEARCH ===================== */
.search-bar {
    background: var(--surface);
    border-radius: var(--curve);
    padding: 12px;
    margin-bottom: 10px;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-sm);
}

.search-bar form {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: center;
}

.search-bar input[type="text"] {
    flex: 1;
    min-width: 180px;
    padding: 10px 15px;
    border: 2px solid var(--border-soft);
    border-radius: var(--curve-sm);
    background: var(--surface-alt);
    color: var(--text-main);
    font-size: 14px;
    transition: var(--ease);
    outline: none;
    font-family: inherit;
}

.search-bar input[type="text"]:focus {
    border-color: var(--accent-warm);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.12);
}

.search-bar input[type="text"]::placeholder {
    color: var(--text-light);
}

.search-bar button {
    padding: 10px 15px;
    border: none;
    border-radius: var(--curve-sm);
    background: var(--grad-main);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    letter-spacing: 0.3px;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
}

.search-bar button:hover {
    box-shadow: var(--shadow-md);
    opacity: 0.92;
    transform: translateY(-1px);
}

/* ===================== TAG CLOUDS ===================== */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    list-style: none;
    padding: 12px;
    background: var(--surface);
    border-radius: var(--curve);
    margin-bottom: 10px;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-sm);
}

.tag-item {
    padding: 5px 13px;
    background: var(--surface-warm);
    border-radius: 18px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
    transition: var(--ease);
    border: 1px solid var(--border-warm);
}

.tag-item:hover {
    background: var(--grad-warm);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(255, 107, 53, 0.2);
    transform: translateY(-1px);
}

/* ===================== SECTIONS ===================== */
.film-section {
    margin-bottom: 16px;
}

.section-head {
    margin-bottom: 13px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-soft);
    position: relative;
}

.section-head::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--grad-warm);
    border-radius: 2px;
}

.section-title {
    font-size: 19px;
    font-weight: 800;
    margin: 0;
    color: var(--text-main);
    letter-spacing: -0.2px;
}

.section-title a {
    color: var(--text-main);
    text-decoration: none;
    transition: var(--ease);
}

.section-title a:hover {
    color: var(--accent-warm);
}

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

.film-grid li {
    animation: rise-in 0.5s ease backwards;
}

.film-grid li:nth-child(1) { animation-delay: 0.04s; }
.film-grid li:nth-child(2) { animation-delay: 0.08s; }
.film-grid li:nth-child(3) { animation-delay: 0.12s; }
.film-grid li:nth-child(4) { animation-delay: 0.16s; }
.film-grid li:nth-child(5) { animation-delay: 0.20s; }
.film-grid li:nth-child(6) { animation-delay: 0.24s; }
.film-grid li:nth-child(7) { animation-delay: 0.28s; }
.film-grid li:nth-child(8) { animation-delay: 0.32s; }

@keyframes rise-in {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}

.card-thumb {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--curve);
    aspect-ratio: 600 / 350;
    background: var(--surface-alt);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-sm);
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.card-thumb:hover img {
    transform: scale(1.08);
}

.card-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(83,52,131,0.65) 0%, transparent 55%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: var(--curve);
}

.card-thumb:hover {
    box-shadow: var(--shadow-lg);
}

.card-thumb:hover::after {
    opacity: 1;
}

.card-meta {
    padding: 8px 0 0;
}

.card-meta h5 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: var(--text-main);
}

.card-meta h5 a {
    color: inherit;
    text-decoration: none;
    transition: var(--ease);
}

.card-meta h5 a:hover {
    color: var(--accent-warm);
}

/* ===================== TORRENT PAGE ===================== */
.info-panel {
    line-height: 1.8;
    text-align: center;
    padding: 18px;
    font-size: 17px;
    margin: 16px 0;
    word-break: break-all;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.07) 0%, rgba(83, 52, 131, 0.07) 100%);
    border-radius: var(--curve-lg);
    border: 1px solid var(--border-warm);
}

.info-panel a {
    color: var(--accent-warm);
    text-decoration: none;
    font-weight: 700;
    margin-right: 8px;
}

.details-panel {
    font-size: 15px;
    line-height: 1.9;
    padding: 22px 24px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.05) 0%, rgba(83, 52, 131, 0.05) 100%);
    border-radius: var(--curve-lg);
    margin: 14px 0;
    border: 1px solid var(--border-soft);
}

.capture-wrap {
    margin-top: 10px;
}

.capture-wrap picture {
    display: block;
    width: 100%;
}

.capture-wrap picture img,
.capture-wrap img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--curve);
}

/* ===================== DOWNLOAD BUTTONS ===================== */
.dl-btns {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 18px 10px;
    margin: 14px 0;
    background: var(--surface);
    border-radius: var(--curve);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-sm);
}

.dl-btn {
    display: inline-block;
    padding: 11px 24px;
    background: var(--grad-main);
    color: #fff !important;
    text-decoration: none;
    border-radius: 24px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.3px;
    border: none;
    cursor: pointer;
    transition: var(--ease);
    box-shadow: 0 4px 14px rgba(255, 107, 53, 0.3);
}

.dl-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
    opacity: 0.92;
}

/* ===================== SHARE SECTION ===================== */
.share-section {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    margin: 14px 0;
    background: var(--surface);
    border-radius: var(--curve);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-sm);
    flex-wrap: nowrap;
}

.share-url-display {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--surface-alt);
    border-radius: var(--curve-sm);
    border: 1px solid var(--border-soft);
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.share-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-warm);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.share-url {
    font-size: 12px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1;
    font-family: 'Courier New', monospace;
}

.share-copy-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--grad-cool);
    color: #fff;
    border: none;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
}

.share-copy-btn:hover {
    opacity: 0.88;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.share-icon {
    font-size: 15px;
    line-height: 1;
}

/* ===================== CLIENT LINKS ===================== */
.client-link-pc,
.client-link-m {
    text-align: center;
    padding: 16px;
}

.client-link-pc a,
.client-link-m a {
    color: var(--accent-cool);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: var(--ease);
}

.client-link-pc a:hover,
.client-link-m a:hover {
    color: var(--accent-warm);
}

/* ===================== PAGINATION ===================== */
.pg-nav {
    padding: 18px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.pg-link,
.pg-cur {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 13px;
    border-radius: var(--curve-sm);
    font-size: 13px;
    transition: var(--ease);
    min-width: 36px;
    text-align: center;
    text-decoration: none;
}

.pg-link {
    background: var(--surface);
    color: var(--text-main);
    border: 1px solid var(--border-soft);
}

.pg-link:hover {
    background: var(--grad-warm);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 3px 10px rgba(255, 107, 53, 0.2);
}

.pg-cur {
    background: var(--grad-main);
    color: #fff;
    border: 1px solid transparent;
    font-weight: 700;
    cursor: default;
}

/* ===================== FOOTER ===================== */
.friendly-links {
    padding: 12px;
    background: var(--surface);
    border-radius: var(--curve);
    border: 1px solid var(--border-soft);
}

.friendly-links dl {
    margin: 0;
}

.friendly-links dd {
    display: inline-block;
    margin: 4px;
}

.friendly-links a {
    color: var(--accent-cool);
    text-decoration: none;
    transition: var(--ease);
    font-size: 13px;
}

.friendly-links a:hover {
    color: var(--accent-warm);
}

.pd5 { padding: 3px 6px; }

.site-footer {
    padding: 22px 0;
    text-align: center;
    border-top: 1px solid var(--border-soft);
    margin-top: 20px;
    background: var(--surface);
}

.site-footer p {
    margin: 6px 0;
    color: var(--text-muted);
    font-size: 13px;
}

.site-footer a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--ease);
}

.site-footer a:hover {
    color: var(--accent-warm);
}

/* ===================== UTILS ===================== */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

.hide-mobile { display: block; }
.hide-pc     { display: block; }

@media (max-width: 768px) {
    .hide-mobile { display: none !important; }
}
@media (min-width: 769px) {
    .hide-pc { display: none !important; }
}

img[data-original] {
    background: var(--surface-alt);
}

/* ===================== RESPONSIVE ===================== */

/* Large phone (481px – 768px) */
@media (max-width: 768px) {
    .wrap { padding: 0 8px; }

    .pg-header { padding: 0.5rem 0; }

    .brand-wrap { gap: 10px; }

    .brand-title { font-size: 20px; }

    .domain-badge { padding: 4px 11px; gap: 5px; }
    .domain-tag   { font-size: 10px; }
    .domain-val   { font-size: 15px; }

    .section-pad  { padding: 8px 0; }

    /* Nav mobile layout */
    .cat-zone {
        width: 15%;
        font-size: 10px;
        padding: 8px 2px;
        white-space: normal;
        word-break: break-all;
    }

    .cat-items {
        width: 85%;
        gap: 4px;
        padding: 8px 5px;
        font-size: 12px;
    }

    .cat-items a {
        font-size: 12px;
        padding: 4px 2px;
        width: calc((100% - 12px) / 4);
        flex-shrink: 0;
        flex-grow: 0;
    }

    .film-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .section-title { font-size: 17px; }

    .card-meta h5 { font-size: 12px; }

    .search-bar { padding: 10px; }
    .search-bar form { gap: 6px; }
    .search-bar input[type="text"] { min-width: 90px; padding: 9px 11px; font-size: 13px; }
    .search-bar button { padding: 9px 10px; font-size: 12px; }

    .tag-cloud { padding: 10px; gap: 6px; margin-bottom: 8px; }
    .tag-item  { padding: 4px 11px; font-size: 12px; }

    .dl-btns { padding: 14px 8px; gap: 8px; }
    .dl-btn  { padding: 10px 18px; font-size: 13px; }

    .share-section     { padding: 10px 12px; gap: 8px; margin: 10px 0; }
    .share-url-display { padding: 9px 10px; gap: 7px; }
    .share-label       { font-size: 11px; }
    .share-url         { font-size: 10px; }
    .share-copy-btn    { padding: 9px 12px; font-size: 12px; }
    .share-icon        { font-size: 14px; }

    .pg-link, .pg-cur  { padding: 6px 10px; font-size: 12px; min-width: 30px; }

    .film-section { margin-bottom: 12px; }

    .info-panel    { padding: 14px; font-size: 15px; margin: 12px 0; }
    .details-panel { padding: 16px 14px; font-size: 14px; margin: 10px 0; }
}

/* Small phone (≤480px) */
@media (max-width: 480px) {
    .pg-header { padding: 0.4rem 0; }

    .brand-title { font-size: 18px; }

    .domain-badge { padding: 4px 9px; }
    .domain-tag   { font-size: 9px; }
    .domain-val   { font-size: 14px; }

    .cat-zone {
        width: 15%;
        font-size: 10px;
        padding: 6px 2px;
    }

    .cat-items {
        width: 85%;
        gap: 3px;
        padding: 6px 4px;
    }

    .cat-items a {
        font-size: 12px;
        padding: 3px 1px;
        width: calc((100% - 9px) / 4);
    }

    .film-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .search-bar input[type="text"] { min-width: 70px; padding: 8px 9px; font-size: 12px; }
    .search-bar button { padding: 8px 8px; font-size: 11px; }

    .section-title { font-size: 15px; }

    .dl-btn { padding: 9px 14px; font-size: 12px; }

    .share-section  { padding: 8px 10px; gap: 6px; }
    .share-copy-btn { padding: 8px 10px; font-size: 11px; }
}

/* Desktop (≥769px) - ensure 4 per row */
@media (min-width: 769px) {
    .film-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .cat-zone {
        font-size: 14px;
    }

    .cat-items a {
        font-size: 13px;
    }
}
