:root {
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-300: #fcd34d;
    --amber-400: #fbbf24;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --amber-800: #92400e;
    --amber-900: #78350f;
    --orange-50: #fff7ed;
    --orange-600: #ea580c;
    --orange-900: #7c2d12;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow: 0 12px 30px rgba(120, 53, 15, 0.12);
    --shadow-strong: 0 26px 50px rgba(120, 53, 15, 0.22);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--gray-900);
    background: linear-gradient(180deg, var(--amber-50), var(--orange-50));
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--amber-200);
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(254, 252, 232, 0.96), rgba(255, 247, 237, 0.96));
    box-shadow: 0 6px 18px rgba(120, 53, 15, 0.08);
    backdrop-filter: blur(14px);
}

.header-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

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

.logo-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
    box-shadow: 0 10px 22px rgba(217, 119, 6, 0.26);
}

.logo-text {
    background: linear-gradient(90deg, var(--amber-800), var(--orange-600), var(--amber-600));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav a {
    padding: 9px 14px;
    border-radius: 12px;
    color: var(--amber-800);
    font-size: 14px;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav a:hover,
.nav a.active {
    color: var(--white);
    background: var(--amber-600);
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    padding: 9px 12px;
    border: 0;
    border-radius: 12px;
    color: var(--amber-800);
    background: var(--amber-100);
    font-weight: 700;
}

.hero {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    color: var(--amber-50);
    background: var(--amber-900);
}

.hero-track {
    position: relative;
    min-height: 520px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(120, 53, 15, 0.95), rgba(124, 45, 18, 0.78), rgba(0, 0, 0, 0.52));
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 520px;
    display: grid;
    align-items: center;
    padding: 72px 0;
}

.hero-panel {
    max-width: 780px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 7px 12px;
    border: 1px solid rgba(253, 230, 138, 0.45);
    border-radius: 999px;
    color: var(--amber-200);
    background: rgba(255, 255, 255, 0.1);
    font-size: 13px;
    font-weight: 800;
}

.hero h1 {
    margin: 0 0 16px;
    font-size: clamp(42px, 8vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.055em;
    text-shadow: 0 16px 32px rgba(0, 0, 0, 0.22);
}

.hero h2 {
    margin: 0 0 16px;
    color: var(--amber-100);
    font-size: clamp(24px, 4vw, 42px);
    line-height: 1.15;
}

.hero p {
    max-width: 680px;
    margin: 0 0 28px;
    color: var(--amber-100);
    font-size: clamp(16px, 2vw, 21px);
}

.hero-actions,
.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 18px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
    box-shadow: 0 18px 34px rgba(217, 119, 6, 0.28);
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 24px 42px rgba(217, 119, 6, 0.34);
}

.button.secondary {
    color: var(--amber-900);
    background: var(--amber-100);
    box-shadow: none;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 26px;
    z-index: 5;
    display: flex;
    gap: 9px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 32px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(254, 243, 199, 0.5);
    cursor: pointer;
}

.hero-dot.active {
    background: var(--amber-300);
}

.main-content {
    padding: 54px 0 72px;
}

.section {
    margin-bottom: 62px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.section-heading h2,
.page-title h1,
.detail-title h1 {
    margin: 0;
    color: var(--amber-900);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.18;
    letter-spacing: -0.035em;
}

.section-heading p,
.page-title p,
.detail-title p {
    margin: 8px 0 0;
    color: var(--gray-600);
}

.search-box {
    display: flex;
    gap: 10px;
    margin: 0 0 24px;
    padding: 12px;
    border: 1px solid var(--amber-200);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow);
}

.search-box input {
    width: 100%;
    min-height: 46px;
    border: 0;
    outline: 0;
    border-radius: 14px;
    padding: 0 16px;
    color: var(--gray-800);
    background: var(--white);
    font-size: 15px;
}

.search-box span {
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    color: var(--amber-700);
    font-weight: 800;
    white-space: nowrap;
}

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

.movie-grid.compact {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

.movie-card,
.category-card,
.info-card,
.rank-card {
    overflow: hidden;
    border: 1px solid rgba(253, 230, 138, 0.78);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover,
.category-card:hover,
.rank-card:hover {
    transform: translateY(-6px);
    border-color: var(--amber-300);
    box-shadow: var(--shadow-strong);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, var(--amber-100), var(--orange-50));
}

.movie-grid.featured .poster-link,
.rank-card .poster-link {
    aspect-ratio: 16 / 10;
}

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

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

.score-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 5px 9px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(217, 119, 6, 0.94);
    font-size: 12px;
    font-weight: 900;
}

.rank-badge {
    background: rgba(17, 24, 39, 0.82);
}

.card-gradient {
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent);
}

.movie-card-body {
    padding: 16px;
}

.movie-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 8px;
    color: var(--amber-700);
    font-size: 13px;
    font-weight: 800;
}

.movie-card h3,
.rank-card h3,
.category-card h3,
.info-card h2 {
    margin: 0 0 8px;
    color: var(--gray-900);
    font-size: 18px;
    line-height: 1.28;
}

.movie-card p,
.rank-card p,
.category-card p,
.info-card p {
    margin: 0;
    color: var(--gray-600);
    font-size: 14px;
}

.line-clamp-2,
.line-clamp-3 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
}

.line-clamp-2 {
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    -webkit-line-clamp: 3;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tag-row span {
    padding: 3px 8px;
    border-radius: 999px;
    color: var(--amber-800);
    background: var(--amber-100);
    font-size: 12px;
    font-weight: 800;
}

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

.category-card {
    min-height: 190px;
    padding: 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 247, 237, 0.95));
}

.category-card .button {
    margin-top: 18px;
    min-height: 38px;
    padding: 8px 14px;
    font-size: 13px;
}

.page-title,
.detail-title {
    padding: 42px 0 22px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--amber-700);
    font-size: 14px;
    font-weight: 800;
}

.breadcrumb a:hover {
    color: var(--orange-600);
}

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

.rank-card {
    display: grid;
    grid-template-columns: 220px 1fr;
}

.rank-card .movie-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(280px, 0.9fr);
    gap: 30px;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000000;
    box-shadow: var(--shadow-strong);
}

.video-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: var(--white);
    background: rgba(0, 0, 0, 0.34);
    cursor: pointer;
}

.player-cover span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--amber-600), var(--orange-600));
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34);
    font-size: 30px;
    transform: translateZ(0);
}

.player-shell.is-playing .player-cover {
    display: none;
}

.detail-card {
    padding: 26px;
    border: 1px solid var(--amber-200);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
}

.detail-card h2,
.detail-card h3 {
    margin: 0 0 14px;
    color: var(--amber-900);
}

.detail-card p {
    margin: 0 0 16px;
    color: var(--gray-700);
}

.detail-cover {
    overflow: hidden;
    border-radius: 22px;
    background: var(--amber-100);
    box-shadow: var(--shadow);
}

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

.site-footer {
    color: var(--amber-50);
    background: linear-gradient(180deg, var(--amber-900), #451a03);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 30px;
    padding: 46px 0;
}

.footer-inner h3 {
    margin: 0 0 12px;
    color: var(--amber-100);
}

.footer-inner p,
.footer-inner a {
    color: var(--amber-200);
    font-size: 14px;
}

.footer-links {
    display: grid;
    gap: 8px;
}

.copyright {
    padding: 18px 0 24px;
    border-top: 1px solid rgba(253, 230, 138, 0.2);
    color: var(--amber-300);
    text-align: center;
    font-size: 13px;
}

.hidden-card {
    display: none !important;
}

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

    .movie-grid.compact {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .rank-card {
        grid-template-columns: 170px 1fr;
    }
}

@media (max-width: 820px) {
    .nav-toggle {
        display: inline-flex;
    }

    .nav {
        position: absolute;
        top: 68px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
        border: 1px solid var(--amber-200);
        border-radius: 18px;
        background: var(--amber-50);
        box-shadow: var(--shadow-strong);
    }

    .nav.open {
        display: flex;
    }

    .hero,
    .hero-track,
    .hero-content {
        min-height: 560px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .movie-grid,
    .movie-grid.compact,
    .category-grid,
    .rank-list,
    .detail-layout,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .rank-card {
        grid-template-columns: 130px 1fr;
    }
}

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

    .logo {
        font-size: 20px;
    }

    .hero-content {
        padding: 50px 0 70px;
    }

    .hero h1 {
        font-size: 40px;
    }

    .hero h2 {
        font-size: 25px;
    }

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

    .movie-card-body {
        padding: 12px;
    }

    .movie-card h3,
    .rank-card h3 {
        font-size: 15px;
    }

    .rank-card {
        grid-template-columns: 108px 1fr;
    }

    .search-box {
        flex-direction: column;
    }
}
