:root {
    color-scheme: light;
    --bg: #fff7ed;
    --surface: #ffffff;
    --surface-soft: #fffaf3;
    --text: #1f2937;
    --muted: #6b7280;
    --line: rgba(148, 163, 184, 0.28);
    --red: #ef4444;
    --orange: #f97316;
    --amber: #f59e0b;
    --green: #16a34a;
    --blue: #2563eb;
    --dark: #111827;
    --shadow: 0 20px 45px rgba(17, 24, 39, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 44%, #fff7ed 100%);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 78px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.brand-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: white;
    background: linear-gradient(135deg, var(--red), var(--orange));
    border-radius: 16px;
    box-shadow: 0 12px 24px rgba(239, 68, 68, 0.24);
}

.brand-text {
    display: grid;
    line-height: 1.1;
}

.brand-text strong {
    font-size: 22px;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #dc2626, #f97316);
    -webkit-background-clip: text;
    color: transparent;
}

.brand-text em {
    margin-top: 4px;
    font-size: 12px;
    color: var(--muted);
    font-style: normal;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
    display: none;
}

.main-nav a {
    font-weight: 700;
    color: #374151;
    transition: color 0.2s ease, transform 0.2s ease;
}

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

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.header-search input {
    width: 210px;
    padding: 10px 12px;
    background: transparent;
    border: 0;
    outline: none;
}

.header-search button,
.large-search button {
    padding: 10px 18px;
    color: #ffffff;
    cursor: pointer;
    background: linear-gradient(135deg, var(--red), var(--orange));
    border: 0;
    border-radius: 999px;
    box-shadow: 0 12px 24px rgba(239, 68, 68, 0.22);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    cursor: pointer;
    background: #fff7ed;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.hero {
    position: relative;
    min-height: 680px;
    overflow: hidden;
    background: radial-gradient(circle at top left, rgba(251, 146, 60, 0.9), transparent 34%), linear-gradient(135deg, #b91c1c, #f97316 48%, #f59e0b);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(17, 24, 39, 0.74), rgba(127, 29, 29, 0.35)), radial-gradient(circle at 80% 12%, rgba(255, 255, 255, 0.22), transparent 28%);
}

.hero-inner {
    position: relative;
    min-height: 680px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(300px, 430px);
    align-items: center;
    gap: 54px;
    padding: 72px 0;
    opacity: 0;
    transform: translateX(24px);
    pointer-events: none;
    transition: opacity 0.45s ease, transform 0.45s ease;
}

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

.hero-copy {
    color: #ffffff;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    padding: 9px 16px;
    margin-bottom: 22px;
    font-weight: 800;
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    backdrop-filter: blur(12px);
}

.hero h1 {
    max-width: 780px;
    margin: 0 0 14px;
    font-size: clamp(38px, 6vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero h2 {
    margin: 0 0 18px;
    font-size: clamp(26px, 3.4vw, 44px);
    color: #ffedd5;
}

.hero p {
    max-width: 720px;
    margin: 0 0 24px;
    font-size: 20px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}

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

.hero-tags span,
.detail-tags span,
.tag-line span {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
    color: #b45309;
    background: #fff7ed;
    border-radius: 999px;
}

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

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 24px;
    font-weight: 900;
    border-radius: 999px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.primary-btn {
    color: #dc2626;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.ghost-btn {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.42);
    backdrop-filter: blur(12px);
}

.primary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-2px) scale(1.02);
}

.hero-poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 34px;
    box-shadow: 0 34px 80px rgba(17, 24, 39, 0.36);
}

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

.hero-controls {
    position: absolute;
    right: 0;
    bottom: 54px;
    display: flex;
    gap: 12px;
}

.hero-controls button {
    width: 46px;
    height: 46px;
    color: #ffffff;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 50%;
    backdrop-filter: blur(10px);
}

.category-strip {
    margin-top: -36px;
    position: relative;
    z-index: 2;
}

.category-strip-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 22px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.84);
    border-radius: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.category-strip span {
    flex: 0 0 auto;
    font-weight: 900;
    color: #b91c1c;
}

.category-strip div div {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-strip a,
.card-meta a,
.section-more {
    color: #dc2626;
    font-weight: 800;
}

.category-strip a {
    display: inline-flex;
    padding: 9px 14px;
    background: #fff7ed;
    border-radius: 999px;
}

.content-section {
    padding: 72px 0;
}

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

.section-head h2 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    letter-spacing: -0.04em;
}

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

.section-head.light h2,
.section-head.light p {
    color: #ffffff;
}

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

.movie-card {
    position: relative;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: var(--radius);
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.09);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 22px 46px rgba(15, 23, 42, 0.15);
}

.poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, #fee2e2, #ffedd5);
}

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

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

.year-badge,
.rank-mark {
    position: absolute;
    top: 12px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    height: 30px;
    padding: 0 10px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    background: rgba(17, 24, 39, 0.72);
    border-radius: 999px;
    backdrop-filter: blur(10px);
}

.year-badge {
    left: 12px;
}

.rank-mark {
    right: 12px;
    background: linear-gradient(135deg, var(--red), var(--orange));
}

.card-body {
    padding: 18px;
}

.card-body h3 {
    margin: 10px 0 8px;
    font-size: 19px;
    line-height: 1.35;
}

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

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    color: #64748b;
    font-size: 13px;
}

.ranking-panel {
    padding: 78px 0;
    background: linear-gradient(135deg, #111827, #7f1d1d 52%, #c2410c);
}

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

.ranking-list .movie-card .card-body p {
    display: none;
}

.ranking-list .movie-card h3 {
    font-size: 16px;
}

.page-main {
    min-height: 60vh;
}

.page-hero {
    padding: 92px 0;
    color: #ffffff;
    background: radial-gradient(circle at top right, rgba(254, 215, 170, 0.35), transparent 30%), linear-gradient(135deg, #991b1b, #ea580c 48%, #f59e0b);
}

.page-hero p {
    margin: 0 0 10px;
    font-weight: 900;
    color: #ffedd5;
}

.page-hero h1 {
    max-width: 860px;
    margin: 0;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.page-hero span {
    display: block;
    max-width: 780px;
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.8;
}

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

.category-card a {
    display: block;
    height: 100%;
    padding: 22px;
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.88);
    border-radius: var(--radius);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.09);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 18px;
}

.category-thumbs img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: #ffedd5;
    border-radius: 14px;
}

.category-card h2 {
    margin: 0 0 8px;
    font-size: 24px;
}

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

.filter-bar {
    margin-bottom: 26px;
}

.filter-bar input,
.large-search input {
    width: 100%;
    min-height: 54px;
    padding: 0 18px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    outline: none;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.large-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    max-width: 780px;
    margin-top: 28px;
}

.detail-main {
    background: linear-gradient(180deg, #111827 0, #111827 540px, #fff7ed 540px, #ffffff 100%);
}

.detail-hero {
    padding: 38px 0 72px;
    color: #ffffff;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
    gap: 34px;
    align-items: start;
}

.video-shell {
    position: relative;
    overflow: hidden;
    background: #000000;
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.34);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    background: #111827;
    border: 0;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover img {
    position: absolute;
    inset: 0;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
}

.play-circle {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    padding-left: 5px;
    color: #dc2626;
    font-size: 34px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 24px 45px rgba(0, 0, 0, 0.24);
}

.detail-side {
    padding: 28px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    backdrop-filter: blur(18px);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.74);
    font-size: 14px;
}

.detail-side h1 {
    margin: 0 0 16px;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.one-line {
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
    line-height: 1.8;
}

.detail-meta {
    display: grid;
    gap: 12px;
    margin: 24px 0;
}

.detail-meta div {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 12px;
}

.detail-meta dt {
    color: rgba(255, 255, 255, 0.62);
}

.detail-meta dd {
    margin: 0;
    font-weight: 800;
}

.detail-switch {
    display: flex;
    gap: 12px;
}

.detail-switch a {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 999px;
}

.detail-content {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-top: -36px;
    position: relative;
    z-index: 2;
}

.story-card {
    padding: 28px;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.92);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.story-card h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.story-card p {
    margin: 0;
    color: #4b5563;
    font-size: 17px;
    line-height: 1.95;
}

.site-footer {
    margin-top: 48px;
    color: #d1d5db;
    background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 32px;
    padding: 48px 0;
}

.footer-logo {
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
}

.site-footer p {
    margin: 0;
    color: #9ca3af;
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 18px;
}

.site-footer a {
    display: block;
    margin: 9px 0;
    color: #9ca3af;
}

.site-footer a:hover {
    color: #fb923c;
}

.footer-bottom {
    padding: 18px;
    color: #9ca3af;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.no-results {
    grid-column: 1 / -1;
    padding: 46px;
    color: var(--muted);
    text-align: center;
    background: #ffffff;
    border-radius: var(--radius);
}

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

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

    .detail-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .header-inner {
        min-height: 68px;
    }

    .brand-text em,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: inline-grid;
        place-items: center;
        margin-left: auto;
    }

    .main-nav {
        position: absolute;
        top: 68px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 18px;
        background: rgba(255, 255, 255, 0.96);
        border: 1px solid var(--line);
        border-radius: 22px;
        box-shadow: var(--shadow);
    }

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

    .hero,
    .hero-inner {
        min-height: 760px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 44px 0 96px;
    }

    .hero-poster {
        width: min(250px, 70vw);
    }

    .category-strip-inner,
    .section-head,
    .large-search {
        display: block;
    }

    .large-search button {
        width: 100%;
        margin-top: 12px;
    }

    .category-strip span {
        display: block;
        margin-bottom: 12px;
    }

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

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

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

    .brand-text strong {
        font-size: 18px;
    }

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

    .hero p,
    .one-line {
        font-size: 16px;
    }

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

    .content-section {
        padding: 52px 0;
    }

    .detail-side,
    .story-card {
        padding: 20px;
    }
}
