:root {
    --red-950: #3f0808;
    --red-900: #7f1d1d;
    --red-800: #991b1b;
    --red-700: #b91c1c;
    --amber-950: #451a03;
    --amber-800: #92400e;
    --amber-600: #d97706;
    --amber-300: #fcd34d;
    --amber-100: #fef3c7;
    --amber-50: #fffbeb;
    --paper: #fffaf1;
    --ink: #301b12;
    --muted: #735849;
    --line: rgba(146, 64, 14, 0.22);
    --shadow: 0 20px 60px rgba(69, 26, 3, 0.16);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: linear-gradient(180deg, #fffbeb 0%, #fff7ed 42%, #fef3c7 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

button,
input {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(255, 251, 235, 0.96), rgba(254, 226, 226, 0.96), rgba(255, 251, 235, 0.96));
    border-bottom: 2px solid rgba(217, 119, 6, 0.55);
    backdrop-filter: blur(18px);
    box-shadow: 0 12px 32px rgba(127, 29, 29, 0.12);
}

.header-inner {
    max-width: 1280px;
    height: 80px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    color: white;
    font-weight: 900;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--red-700), var(--amber-600));
    box-shadow: 0 12px 26px rgba(185, 28, 28, 0.25);
}

.brand-text strong,
.footer-logo {
    display: block;
    color: var(--red-900);
    font-size: 23px;
    line-height: 1.1;
    letter-spacing: 0.04em;
}

.brand-text em {
    display: block;
    margin-top: 3px;
    color: var(--amber-800);
    font-size: 12px;
    font-style: normal;
    letter-spacing: 0.2em;
}

.top-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px 18px;
    color: var(--red-900);
    font-weight: 700;
}

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

.top-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 4px;
    height: 2px;
    background: var(--amber-600);
    transform: scaleX(0);
    transition: transform 0.22s ease;
}

.top-nav a:hover::after {
    transform: scaleX(1);
}

.menu-button {
    display: none;
    border: 0;
    border-radius: 12px;
    color: var(--red-900);
    background: white;
    padding: 9px 13px;
    box-shadow: 0 8px 18px rgba(127, 29, 29, 0.12);
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 690px;
    color: white;
    background: radial-gradient(circle at 15% 10%, rgba(252, 211, 77, 0.42), transparent 28%), linear-gradient(135deg, #3f0808, #7f1d1d 48%, #92400e);
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(12px);
    opacity: 0.5;
}

.hero::before {
    width: 360px;
    height: 360px;
    right: -80px;
    top: 42px;
    background: rgba(252, 211, 77, 0.22);
}

.hero::after {
    width: 300px;
    height: 300px;
    left: -90px;
    bottom: -70px;
    background: rgba(248, 113, 113, 0.28);
}

.hero-slider {
    position: relative;
    max-width: 1280px;
    min-height: 610px;
    margin: 0 auto;
    padding: 78px 24px 52px;
    z-index: 1;
}

.hero-slide {
    display: none;
    align-items: center;
    grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.82fr);
    gap: 48px;
    animation: fadeUp 0.5s ease both;
}

.hero-slide.active {
    display: grid;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ffe9a6;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 18px 0 18px;
    font-size: clamp(38px, 6vw, 78px);
    line-height: 1.06;
    letter-spacing: -0.04em;
}

.hero p {
    max-width: 720px;
    margin: 0;
    color: #fff7d6;
    font-size: 18px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

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

.btn-primary {
    color: var(--red-950);
    background: linear-gradient(135deg, #fef3c7, #f59e0b);
    box-shadow: 0 14px 28px rgba(245, 158, 11, 0.28);
}

.btn-ghost {
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.38);
    background: rgba(255, 255, 255, 0.08);
}

.hero-meta,
.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-meta span,
.card-meta span,
.detail-meta span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.hero-meta span {
    color: #fff7d6;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
}

.hero-poster {
    position: relative;
    aspect-ratio: 3 / 4;
    border-radius: 34px;
    overflow: hidden;
    border: 6px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.36);
    transform: rotate(2deg);
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(63, 8, 8, 0.72));
}

.hero-dots {
    position: absolute;
    left: 24px;
    bottom: 34px;
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 34px;
    height: 7px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
}

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

.section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 64px 24px;
}

.section.alt {
    max-width: none;
    background: linear-gradient(90deg, rgba(254, 243, 199, 0.9), rgba(254, 226, 226, 0.72), rgba(254, 243, 199, 0.9));
}

.section.alt > .section-inner {
    max-width: 1280px;
    margin: 0 auto;
}

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

.section-title h2,
.page-title h1 {
    margin: 0;
    color: var(--red-900);
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.16;
}

.section-title p,
.page-title p {
    margin: 8px 0 0;
    color: var(--muted);
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 24px;
    border: 2px solid rgba(252, 211, 77, 0.78);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 12px 32px rgba(146, 64, 14, 0.12);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: var(--amber-600);
    box-shadow: var(--shadow);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #7f1d1d;
}

.poster img {
    transition: transform 0.35s ease;
}

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

.rank-no {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: grid;
    place-items: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    color: white;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--red-700), var(--amber-600));
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.card-body {
    padding: 18px;
}

.card-meta span,
.detail-meta span,
.tag-list span {
    color: var(--red-900);
    background: var(--amber-100);
}

.movie-card h3 {
    margin: 12px 0 8px;
    color: var(--red-950);
    font-size: 20px;
    line-height: 1.28;
}

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

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

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

.category-card {
    min-height: 156px;
    padding: 24px;
    border-radius: 24px;
    color: white;
    background: linear-gradient(135deg, var(--red-900), var(--amber-800));
    box-shadow: 0 18px 45px rgba(127, 29, 29, 0.18);
}

.category-card strong {
    display: block;
    font-size: 24px;
    margin-bottom: 8px;
}

.category-card span {
    color: #fef3c7;
}

.page-hero {
    background: linear-gradient(135deg, var(--red-950), var(--red-900) 52%, var(--amber-800));
    color: white;
}

.page-title {
    max-width: 1280px;
    margin: 0 auto;
    padding: 72px 24px;
}

.page-title h1 {
    color: white;
}

.page-title p {
    max-width: 760px;
    color: #fef3c7;
    font-size: 18px;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    margin-bottom: 30px;
    padding: 16px;
    border-radius: 24px;
    background: white;
    border: 2px solid var(--line);
    box-shadow: 0 14px 36px rgba(146, 64, 14, 0.1);
}

.search-panel input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--red-950);
    background: var(--amber-50);
    border-radius: 16px;
    padding: 14px 16px;
}

.search-panel a,
.search-panel button {
    border: 0;
    color: white;
    background: linear-gradient(135deg, var(--red-700), var(--amber-600));
    border-radius: 16px;
    padding: 12px 20px;
    font-weight: 800;
}

.detail-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 44px 24px 76px;
}

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

.detail-head {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 34px;
    align-items: start;
    margin-bottom: 34px;
}

.detail-cover {
    overflow: hidden;
    border-radius: 28px;
    aspect-ratio: 3 / 4;
    border: 5px solid #fff;
    box-shadow: var(--shadow);
}

.detail-info h1 {
    margin: 0 0 16px;
    color: var(--red-950);
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.08;
}

.lead {
    color: var(--red-900);
    font-size: 20px;
    font-weight: 700;
}

.content-card {
    margin-top: 22px;
    padding: 26px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--line);
    box-shadow: 0 12px 32px rgba(146, 64, 14, 0.1);
}

.content-card h2 {
    margin: 0 0 12px;
    color: var(--red-900);
    font-size: 26px;
}

.content-card p {
    margin: 0;
    color: #4b3327;
}

.player-card {
    overflow: hidden;
    margin: 36px 0;
    border-radius: 28px;
    background: #180404;
    box-shadow: var(--shadow);
}

.player-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #160404, #5f1515);
}

.player-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #0f0505;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    pointer-events: none;
}

.play-button {
    pointer-events: auto;
    width: 118px;
    height: 118px;
    border: 0;
    border-radius: 999px;
    color: var(--red-950);
    background: linear-gradient(135deg, #fff7d6, var(--amber-300));
    font-size: 18px;
    font-weight: 900;
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.36);
}

.player-status {
    min-height: 24px;
    padding: 14px 18px 18px;
    color: #fef3c7;
    text-align: center;
}

.rank-row {
    display: grid;
    grid-template-columns: 76px 90px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border-radius: 20px;
    background: white;
    border: 2px solid var(--line);
    margin-bottom: 12px;
}

.rank-row .poster {
    border-radius: 14px;
}

.rank-row h3 {
    margin: 0 0 6px;
    color: var(--red-950);
}

.rank-heat {
    color: var(--red-900);
    font-weight: 900;
}

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

.site-footer {
    color: #fef3c7;
    background: linear-gradient(135deg, var(--red-950), var(--amber-950));
    margin-top: 24px;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 24px;
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.footer-logo {
    color: white;
    margin-bottom: 8px;
}

.footer-inner p {
    max-width: 620px;
    margin: 0;
    color: #fcd34d;
}

.footer-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    align-items: center;
    font-weight: 800;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

    .hero-poster,
    .detail-cover {
        max-width: 420px;
    }
}

@media (max-width: 760px) {
    .header-inner {
        height: auto;
        min-height: 74px;
        align-items: flex-start;
        padding-top: 13px;
        padding-bottom: 13px;
    }

    .menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-top: 4px;
    }

    .top-nav {
        display: none;
        position: absolute;
        left: 14px;
        right: 14px;
        top: 74px;
        padding: 16px;
        border-radius: 18px;
        background: white;
        box-shadow: var(--shadow);
        justify-content: flex-start;
    }

    .top-nav.open {
        display: flex;
    }

    .hero {
        min-height: auto;
    }

    .hero-slider {
        padding-top: 44px;
        padding-bottom: 62px;
    }

    .hero-slide {
        gap: 28px;
    }

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

    .section-title,
    .footer-inner,
    .search-panel,
    .rank-row {
        display: block;
    }

    .search-panel input {
        margin-bottom: 12px;
    }

    .rank-row .poster {
        width: 120px;
        margin: 10px 0;
    }
}
