:root {
    color-scheme: light;
    --bg-soft: #fff7ed;
    --bg-warm: #fffbeb;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-strong: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --line: #fde68a;
    --accent: #d97706;
    --accent-deep: #92400e;
    --accent-hot: #ea580c;
    --shadow: 0 18px 45px rgba(146, 64, 14, 0.16);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text-main);
    background:
        radial-gradient(circle at top left, rgba(251, 191, 36, 0.22), transparent 30rem),
        linear-gradient(180deg, var(--bg-warm), var(--bg-soft));
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
video {
    max-width: 100%;
}

img {
    display: block;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(253, 230, 138, 0.9);
    background: rgba(255, 251, 235, 0.88);
    backdrop-filter: blur(16px);
    box-shadow: 0 8px 28px rgba(146, 64, 14, 0.08);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-deep);
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-hot));
    box-shadow: 0 10px 25px rgba(217, 119, 6, 0.35);
}

.logo-text {
    font-size: 26px;
    line-height: 1;
    background: linear-gradient(90deg, var(--accent-deep), var(--accent-hot));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    color: #374151;
    font-weight: 600;
}

.main-nav a {
    position: relative;
    padding: 8px 0;
}

.main-nav a::after {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    content: "";
    border-radius: 999px;
    background: var(--accent);
    transition: width 0.25s ease;
}

.main-nav a:hover {
    color: var(--accent);
}

.main-nav a:hover::after {
    width: 100%;
}

.mobile-menu-button {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    color: var(--accent-deep);
    background: rgba(253, 230, 138, 0.45);
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    padding: 12px 0 18px;
}

.mobile-nav a {
    display: block;
    padding: 11px 0;
    color: #374151;
    font-weight: 700;
}

.hero-carousel {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: #111827;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
    transform: scale(1.02);
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.1)),
        linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(120, 53, 15, 0.5));
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, 380px);
    align-items: center;
    gap: 46px;
    padding: 80px 0;
    color: #ffffff;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(245, 158, 11, 0.9);
    box-shadow: 0 12px 25px rgba(245, 158, 11, 0.25);
    font-size: 14px;
    font-weight: 800;
}

.hero-title {
    margin: 20px 0 16px;
    max-width: 760px;
    font-size: clamp(40px, 7vw, 78px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero-desc {
    max-width: 760px;
    color: #fef3c7;
    font-size: clamp(18px, 2vw, 22px);
    line-height: 1.75;
}

.hero-meta,
.detail-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 18px;
    color: #fef3c7;
    font-weight: 700;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.button:hover {
    transform: translateY(-2px);
}

.button-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-hot));
    box-shadow: 0 15px 30px rgba(234, 88, 12, 0.34);
}

.button-secondary {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
}

.hero-poster {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(253, 230, 138, 0.45);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.42);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.hero-controls {
    position: absolute;
    right: max(16px, calc((100vw - 1180px) / 2));
    bottom: 28px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-dot,
.hero-arrow {
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    cursor: pointer;
}

.hero-dot {
    width: 14px;
    height: 14px;
    border-radius: 999px;
}

.hero-dot.is-active {
    width: 36px;
    background: var(--accent);
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    font-size: 20px;
}

.page-section {
    padding: 62px 0;
}

.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 28px;
}

.section-title {
    margin: 12px 0 8px;
    color: #1f2937;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-desc {
    max-width: 720px;
    color: var(--text-muted);
    font-size: 17px;
    line-height: 1.75;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(253, 230, 138, 0.88);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: 0 10px 26px rgba(146, 64, 14, 0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.75);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #78350f, #f59e0b);
}

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.movie-card:hover .poster-link img {
    transform: scale(1.06);
}

.badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(217, 119, 6, 0.92);
    font-size: 12px;
    font-weight: 900;
}

.card-body {
    padding: 16px;
}

.card-title {
    margin: 0 0 8px;
    color: #111827;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 900;
}

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

.card-line {
    display: -webkit-box;
    overflow: hidden;
    min-height: 48px;
    margin: 0;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.7;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta {
    margin-top: 12px;
    color: #92400e;
    font-size: 13px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.tag-list span,
.filter-chip {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    color: #92400e;
    background: #ffedd5;
    font-size: 12px;
    font-weight: 700;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}

.category-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 178px;
    padding: 24px;
    border: 1px solid rgba(253, 230, 138, 0.9);
    border-radius: var(--radius-md);
    background:
        radial-gradient(circle at right top, rgba(251, 191, 36, 0.2), transparent 12rem),
        var(--surface-strong);
    box-shadow: 0 12px 32px rgba(146, 64, 14, 0.11);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.category-card h3 {
    margin: 0 0 10px;
    color: #92400e;
    font-size: 22px;
    font-weight: 900;
}

.category-card p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.7;
}

.rank-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.rank-item {
    display: grid;
    grid-template-columns: 58px 74px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(253, 230, 138, 0.9);
    border-radius: var(--radius-sm);
    background: var(--surface);
    box-shadow: 0 8px 20px rgba(146, 64, 14, 0.08);
}

.rank-num {
    color: var(--accent);
    font-size: 22px;
    font-weight: 900;
    text-align: center;
}

.rank-item img {
    width: 74px;
    aspect-ratio: 3 / 4;
    border-radius: 10px;
    object-fit: cover;
}

.rank-item h3 {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 900;
}

.rank-item p {
    display: -webkit-box;
    overflow: hidden;
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px;
    gap: 14px;
    margin: 28px 0;
}

.search-input,
.filter-select {
    width: 100%;
    min-height: 48px;
    border: 1px solid #fcd34d;
    border-radius: 16px;
    padding: 0 16px;
    color: #374151;
    background: rgba(255, 255, 255, 0.94);
    outline: none;
    box-shadow: 0 8px 20px rgba(146, 64, 14, 0.08);
}

.search-input:focus,
.filter-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.17);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 30px;
    color: #92400e;
    font-size: 14px;
    font-weight: 700;
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) 360px;
    gap: 28px;
    align-items: start;
    padding: 38px 0 56px;
}

.detail-panel,
.content-panel {
    border: 1px solid rgba(253, 230, 138, 0.9);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.detail-info {
    padding: 28px;
}

.detail-title {
    margin: 0 0 14px;
    color: #111827;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.detail-intro {
    margin: 0;
    color: #4b5563;
    font-size: 18px;
    line-height: 1.8;
}

.detail-meta {
    color: #92400e;
}

.cover-panel {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: #fff7ed;
}

.cover-panel img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.video-player {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: #111827;
}

.video-player video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #111827;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.55));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay.is-hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.play-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-hot));
    box-shadow: 0 18px 45px rgba(234, 88, 12, 0.45);
    font-size: 20px;
    font-weight: 900;
}

.content-panel {
    padding: 28px;
    margin-bottom: 28px;
}

.content-panel h2 {
    margin: 0 0 14px;
    color: #92400e;
    font-size: 28px;
    font-weight: 900;
}

.content-panel p {
    margin: 0 0 18px;
    color: #374151;
    font-size: 17px;
    line-height: 1.9;
}

.footer {
    margin-top: 50px;
    padding: 42px 0;
    color: #78350f;
    border-top: 1px solid rgba(253, 230, 138, 0.95);
    background: rgba(255, 251, 235, 0.78);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-weight: 700;
}

.hidden-by-filter {
    display: none !important;
}

@media (max-width: 1024px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .hero-inner,
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .hero-poster,
    .cover-panel {
        max-width: 360px;
    }
}

@media (max-width: 760px) {
    .main-nav {
        display: none;
    }

    .mobile-menu-button {
        display: inline-flex;
    }

    .mobile-nav.is-open {
        display: block;
    }

    .hero-carousel {
        min-height: 760px;
    }

    .hero-inner {
        padding: 48px 0 90px;
    }

    .hero-title {
        font-size: 42px;
    }

    .movie-grid,
    .category-grid,
    .rank-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rank-item {
        grid-template-columns: 42px 58px 1fr;
    }

    .rank-item img {
        width: 58px;
    }

    .toolbar {
        grid-template-columns: 1fr;
    }

    .section-head,
    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

    .logo-text {
        font-size: 22px;
    }

    .movie-grid,
    .category-grid,
    .rank-list {
        grid-template-columns: 1fr;
    }

    .hero-actions {
        flex-direction: column;
    }

    .button {
        width: 100%;
    }
}
