:root {
    --amber-50: #fffbeb;
    --amber-100: #fef3c7;
    --amber-200: #fde68a;
    --amber-300: #fcd34d;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --amber-700: #b45309;
    --amber-800: #92400e;
    --amber-900: #78350f;
    --ink: #1f1307;
    --muted: #7c5d37;
    --card: #ffffff;
    --line: rgba(146, 64, 14, 0.18);
    --shadow: 0 18px 45px rgba(120, 53, 15, 0.14);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, var(--amber-50), #ffffff 42%, #fffaf0);
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 251, 235, 0.92);
    border-bottom: 1px solid var(--amber-200);
    box-shadow: 0 8px 28px rgba(120, 53, 15, 0.08);
    backdrop-filter: blur(14px);
}

.nav-wrap {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 22px;
}

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

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber-600), var(--amber-900));
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(217, 119, 6, 0.28);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    overflow: hidden;
}

.main-nav a {
    color: var(--amber-800);
    font-weight: 700;
    font-size: 15px;
    transition: color 0.2s ease, transform 0.2s ease;
    white-space: nowrap;
}

.main-nav a:hover {
    color: var(--amber-600);
    transform: translateY(-1px);
}

.nav-search {
    display: flex;
    align-items: center;
    min-width: 290px;
}

.nav-search input,
.search-box input,
.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 1px solid var(--amber-300);
    background: #ffffff;
    color: var(--ink);
    border-radius: 12px 0 0 12px;
    padding: 11px 14px;
    outline: none;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.nav-search input:focus,
.search-box input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--amber-600);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
}

.nav-search button,
.search-box button,
.primary-btn,
.secondary-btn,
.card-link {
    border: 0;
    cursor: pointer;
    color: #ffffff;
    background: linear-gradient(135deg, var(--amber-600), var(--amber-800));
    padding: 11px 18px;
    border-radius: 0 12px 12px 0;
    font-weight: 800;
    box-shadow: 0 12px 28px rgba(217, 119, 6, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-btn,
.secondary-btn {
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
}

.secondary-btn {
    color: var(--amber-900);
    background: rgba(255, 255, 255, 0.92);
}

.nav-search button:hover,
.search-box button:hover,
.primary-btn:hover,
.secondary-btn:hover,
.card-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(217, 119, 6, 0.28);
}

.menu-toggle {
    display: none;
    border: 0;
    color: var(--amber-900);
    background: transparent;
    font-size: 28px;
    cursor: pointer;
}

.hero {
    position: relative;
    min-height: 560px;
    height: 72vh;
    overflow: hidden;
    background: #17100a;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.62) 45%, rgba(0, 0, 0, 0.12));
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 220px;
    background: linear-gradient(0deg, rgba(255, 251, 235, 1), rgba(255, 251, 235, 0));
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(680px, 100%);
    padding-top: 20px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--amber-300);
    font-weight: 900;
    margin-bottom: 18px;
}

.hero h1 {
    margin: 0 0 18px;
    color: #ffffff;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 620px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.75;
}

.hero-tags,
.tag-row,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-row span,
.detail-tags span,
.movie-meta-line span,
.meta-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 13px;
    font-weight: 800;
    color: var(--amber-900);
    background: var(--amber-100);
}

.hero-tags span {
    color: #fff7dc;
    background: rgba(245, 158, 11, 0.28);
    border: 1px solid rgba(252, 211, 77, 0.34);
}

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

.hero-controls {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 34px;
    display: flex;
    align-items: center;
    gap: 12px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 34px;
    background: var(--amber-500);
}

.hero-arrow {
    position: absolute;
    z-index: 4;
    top: 50%;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.46);
    cursor: pointer;
    transform: translateY(-50%);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.68);
    transform: translateY(-50%) scale(1.05);
}

.hero-arrow.prev {
    left: 22px;
}

.hero-arrow.next {
    right: 22px;
}

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

.section {
    padding: 58px 0 0;
}

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

.section-title {
    margin: 0;
    color: var(--amber-900);
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.15;
}

.section-subtitle {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.more-link {
    color: var(--amber-700);
    font-weight: 900;
}

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

.movie-card {
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 12px 28px rgba(120, 53, 15, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    border-color: rgba(217, 119, 6, 0.38);
    box-shadow: var(--shadow);
}

.poster-frame,
.rank-cover,
.detail-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: radial-gradient(circle at 28% 18%, #fcd34d, #b45309 40%, #241105 100%);
}

.poster-frame {
    aspect-ratio: 3 / 4;
}

.poster-frame img,
.rank-cover img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.25s ease;
}

.movie-card:hover .poster-frame img {
    transform: scale(1.05);
}

.image-error img {
    opacity: 0;
}

.score {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    color: #ffffff;
    background: rgba(120, 53, 15, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 999px;
    padding: 5px 9px;
    font-weight: 900;
}

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

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 10px;
}

.movie-card h3 {
    margin: 0 0 8px;
    color: var(--amber-950, #451a03);
    font-size: 18px;
    line-height: 1.35;
}

.movie-card h3 a:hover,
.rank-info h3 a:hover,
.breadcrumb a:hover {
    color: var(--amber-600);
}

.movie-card p {
    min-height: 54px;
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.65;
    font-size: 14px;
}

.card-link {
    display: inline-flex;
    justify-content: center;
    width: 100%;
    margin-top: 14px;
    border-radius: 12px;
    text-align: center;
}

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

.category-card {
    padding: 22px;
    color: var(--amber-950, #451a03);
    background: linear-gradient(135deg, #ffffff, var(--amber-100));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 12px 28px rgba(120, 53, 15, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card h3 {
    margin: 0 0 10px;
    font-size: 22px;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 48px 82px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 12px 28px rgba(120, 53, 15, 0.07);
}

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

.rank-cover {
    width: 82px;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
}

.rank-info h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.rank-info p {
    margin: 0 0 10px;
    color: var(--muted);
    line-height: 1.55;
    font-size: 14px;
}

.rank-score {
    color: #ffffff;
    background: var(--amber-700);
    border-radius: 999px;
    padding: 8px 10px;
    font-weight: 900;
}

.page-hero {
    padding: 70px 0 44px;
    background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.28), transparent 34%), linear-gradient(135deg, var(--amber-900), #321707);
    color: #ffffff;
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.08;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.8;
    font-size: 18px;
}

.filter-bar,
.search-box {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    padding: 18px;
    margin: -28px auto 28px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.filter-bar input,
.filter-bar select,
.search-box input {
    border-radius: 12px;
}

.search-box button {
    border-radius: 12px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 18px 0;
    color: var(--muted);
    font-weight: 700;
}

.detail-hero {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 34px;
    padding: 28px;
    background: linear-gradient(135deg, #ffffff, var(--amber-50));
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.detail-poster {
    aspect-ratio: 3 / 4;
    border-radius: 24px;
    box-shadow: 0 18px 42px rgba(120, 53, 15, 0.22);
}

.detail-copy h1 {
    margin: 0 0 14px;
    color: var(--amber-950, #451a03);
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.08;
}

.detail-one-line {
    margin: 18px 0;
    color: var(--amber-900);
    font-size: 20px;
    line-height: 1.65;
    font-weight: 800;
}

.detail-copy p,
.article-block p {
    color: var(--muted);
    line-height: 1.9;
    font-size: 16px;
}

.article-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 30px;
}

.article-block {
    padding: 24px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 12px 28px rgba(120, 53, 15, 0.07);
}

.article-block h2,
.player-section h2 {
    margin: 0 0 14px;
    color: var(--amber-900);
    font-size: 26px;
}

.player-section {
    margin-top: 34px;
    padding: 28px;
    background: #140c05;
    border-radius: 28px;
    box-shadow: 0 24px 58px rgba(20, 12, 5, 0.28);
}

.player-section h2 {
    color: var(--amber-100);
}

.video-shell {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000000;
    aspect-ratio: 16 / 9;
}

.video-shell video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(217, 119, 6, 0.42), rgba(0, 0, 0, 0.78));
    cursor: pointer;
    font-size: 18px;
    font-weight: 900;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span:first-child {
    width: 84px;
    height: 84px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--amber-900);
    background: #ffffff;
    font-size: 34px;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.32);
}

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

.site-footer {
    margin-top: 70px;
    color: var(--amber-100);
    background: var(--amber-900);
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
    display: grid;
    grid-template-columns: 2fr 1fr 1.4fr;
    gap: 34px;
}

.footer-brand {
    color: #ffffff;
    margin-bottom: 16px;
}

.site-footer p {
    color: var(--amber-200);
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 16px;
    color: var(--amber-300);
    font-size: 18px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.footer-links a {
    color: var(--amber-100);
}

.footer-links a:hover {
    color: #ffffff;
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 18px;
    text-align: center;
    color: var(--amber-200);
}

.empty-state {
    display: none;
    padding: 32px;
    text-align: center;
    color: var(--muted);
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.empty-state.is-visible {
    display: block;
}

@media (max-width: 1080px) {
    .nav-search {
        min-width: 220px;
    }

    .main-nav {
        gap: 12px;
    }

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

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

@media (max-width: 820px) {
    .nav-wrap {
        height: auto;
        min-height: 64px;
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .main-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 0;
    }

    .main-nav.is-open {
        display: flex;
    }

    .nav-search {
        order: 3;
        width: 100%;
        min-width: 0;
    }

    .hero {
        height: auto;
        min-height: 620px;
    }

    .hero-content {
        padding: 90px 0 110px;
    }

    .hero-arrow {
        display: none;
    }

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

    .detail-hero,
    .article-grid,
    .footer-grid,
    .filter-bar,
    .search-box {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 320px;
    }
}

@media (max-width: 540px) {
    .container,
    .nav-wrap,
    .hero-content,
    .footer-grid {
        width: min(100% - 22px, 1180px);
    }

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

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

    .rank-score {
        grid-column: 3;
        justify-self: start;
    }

    .detail-hero,
    .player-section,
    .article-block {
        padding: 18px;
        border-radius: 20px;
    }
}
