:root {
    color-scheme: light;
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --primary: #f97316;
    --primary-deep: #dc2626;
    --blue: #2563eb;
    --dark: #08101f;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(226, 232, 240, 0.72);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 24px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--ink);
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    font-size: 13px;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.28);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.nav-link {
    padding: 9px 14px;
    border-radius: 999px;
    color: #334155;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    background: #fff7ed;
    color: var(--primary);
}

.header-search {
    display: flex;
    align-items: center;
    width: 320px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
}

.header-search input,
.big-search input,
.filter-bar input,
.mobile-panel input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
}

.header-search input {
    padding: 8px 12px;
}

.header-search button,
.big-search button {
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    color: #fff;
    padding: 9px 16px;
    font-weight: 800;
}

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

.mobile-panel {
    display: none;
    padding: 0 24px 20px;
    border-top: 1px solid var(--line);
    background: #fff;
}

.mobile-panel.open {
    display: grid;
    gap: 10px;
}

.mobile-panel a,
.mobile-panel input {
    padding: 12px 14px;
    border-radius: 14px;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 700;
}

.hero {
    position: relative;
    height: 620px;
    overflow: hidden;
    background: var(--dark);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.9s ease;
}

.hero-slide.active {
    opacity: 1;
}

.hero-content {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    color: #fff;
}

.hero-content h1,
.detail-info h1,
.page-hero h1 {
    margin: 14px 0;
    max-width: 790px;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 0.98;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.hero-content p,
.detail-info p,
.page-hero p {
    max-width: 720px;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(17px, 2.3vw, 22px);
    line-height: 1.7;
}

.hero-kicker,
.page-hero span {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    color: #fff;
    font-weight: 900;
    box-shadow: 0 12px 26px rgba(249, 115, 22, 0.25);
}

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

.hero-meta span {
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-weight: 700;
}

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

.primary-btn,
.ghost-btn,
.line-btn,
.section-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
    padding: 14px 24px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    box-shadow: 0 14px 30px rgba(249, 115, 22, 0.28);
}

.primary-btn:hover,
.movie-card:hover,
.category-card:hover,
.category-entry:hover,
.wide-card:hover {
    transform: translateY(-4px);
}

.ghost-btn {
    padding: 14px 24px;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.12);
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
}

.hero-dot.active {
    width: 36px;
    background: #fff;
}

.content-section {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
    padding: 64px 0;
}

.soft-section {
    width: 100%;
    max-width: none;
    padding-left: max(20px, calc((100% - 1280px) / 2));
    padding-right: max(20px, calc((100% - 1280px) / 2));
    background: #fff;
}

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

.section-head h2 {
    margin: 0 0 8px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.section-head p,
.movie-card p,
.wide-card p,
.category-card p,
.category-entry p,
.story-card p,
.site-footer p {
    color: var(--muted);
    line-height: 1.75;
}

.section-more,
.line-btn {
    padding: 10px 16px;
    border: 1px solid var(--line);
    color: var(--blue);
    background: #fff;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    box-shadow: var(--shadow);
}

.card-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #172033, #334155);
}

.card-cover img,
.entry-cover img,
.wide-cover img,
.poster-box img,
.category-card img {
    transition: transform 0.35s ease;
}

.movie-card:hover img,
.category-card:hover img,
.category-entry:hover img,
.wide-card:hover img {
    transform: scale(1.08);
}

.play-dot {
    position: absolute;
    left: 14px;
    bottom: 14px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    background: rgba(249, 115, 22, 0.9);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.rank-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 9px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #f97316);
    font-weight: 950;
}

.card-body {
    padding: 18px;
}

.card-title,
.wide-title {
    display: block;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
    color: #0f172a;
}

.card-title:hover,
.wide-title:hover,
.category-entry h2 a:hover {
    color: var(--primary);
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.card-meta span {
    padding: 4px 8px;
    border-radius: 999px;
    background: #f1f5f9;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tag-row span {
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff7ed;
    color: #c2410c;
    font-size: 12px;
    font-weight: 800;
}

.light-tags span {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.12);
}

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

.category-card {
    position: relative;
    min-height: 270px;
    overflow: hidden;
    border-radius: 26px;
    padding: 26px;
    display: flex;
    flex-direction: column;
    justify-content: end;
    color: #fff;
    isolation: isolate;
    box-shadow: var(--shadow);
    transition: transform 0.24s ease;
}

.category-card:before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(0deg, rgba(8, 16, 31, 0.88), rgba(8, 16, 31, 0.22));
}

.category-card img {
    position: absolute;
    inset: 0;
    z-index: -2;
}

.category-card span {
    font-size: 28px;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.category-card p {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.76);
}

.page-hero,
.detail-hero {
    display: flex;
    align-items: center;
    min-height: 390px;
    padding: 70px max(20px, calc((100% - 1280px) / 2));
    color: #fff;
    background: radial-gradient(circle at 20% 20%, #1d4ed8, #08101f 58%);
    background-size: cover;
    background-position: center;
}

.category-list {
    display: grid;
    gap: 24px;
}

.category-entry,
.wide-card,
.story-card,
.side-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.category-entry {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 28px;
    padding: 18px;
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.entry-cover {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 18px;
    background: #0f172a;
}

.category-entry h2,
.side-panel h2,
.story-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.entry-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.entry-links a {
    padding: 8px 12px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-weight: 700;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
}

.filter-bar input,
.big-search input {
    min-height: 54px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.filter-bar a {
    white-space: nowrap;
    padding: 14px 18px;
    border-radius: 18px;
    background: #fff7ed;
    color: var(--primary);
    font-weight: 900;
}

.big-search {
    display: flex;
    width: min(680px, 100%);
    gap: 10px;
    margin-top: 26px;
    padding: 8px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(14px);
}

.big-search input {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.big-search input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.big-search button {
    min-width: 110px;
}

.rank-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
}

.rank-list {
    display: grid;
    gap: 18px;
}

.wide-card {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 20px;
    padding: 16px;
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.wide-cover {
    overflow: hidden;
    border-radius: 18px;
    aspect-ratio: 16 / 10;
    background: #0f172a;
}

.side-panel {
    position: sticky;
    top: 92px;
    padding: 22px;
}

.side-link {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    color: #334155;
    font-weight: 800;
}

.side-link:hover {
    color: var(--primary);
}

.detail-hero {
    min-height: 560px;
}

.detail-wrap {
    display: grid;
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 42px;
    align-items: center;
    width: min(1280px, 100%);
}

.poster-box {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 28px;
    aspect-ratio: 3 / 4;
    background: #0f172a;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}

.player-section {
    background: #050914;
    padding: 56px max(20px, calc((100% - 1180px) / 2));
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #fff;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.16), rgba(0, 0, 0, 0.42));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-overlay span {
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    padding-left: 6px;
    border-radius: 50%;
    color: #fff;
    font-size: 34px;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    box-shadow: 0 18px 38px rgba(249, 115, 22, 0.42);
}

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

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 28px;
    align-items: start;
}

.story-card {
    padding: 30px;
}

.story-card p {
    margin: 0 0 28px;
    font-size: 17px;
}

.info-list {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 10px 14px;
    margin: 0 0 22px;
}

.info-list dt {
    color: var(--muted);
    font-weight: 800;
}

.info-list dd {
    margin: 0;
    font-weight: 800;
}

.site-footer {
    margin-top: 36px;
    background: #08101f;
    color: rgba(255, 255, 255, 0.72);
}

.footer-inner {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
    padding: 44px 0;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
}

.footer-brand {
    color: #fff;
    margin-bottom: 12px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-content: start;
}

.footer-links a {
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.82);
    font-weight: 700;
}

.footer-bottom {
    width: min(1280px, calc(100% - 40px));
    margin: 0 auto;
    padding: 18px 0 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.56);
}

.movie-card.hidden {
    display: none;
}

@media (max-width: 1100px) {
    .header-search {
        width: 240px;
    }

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

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

    .rank-layout,
    .article-layout,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .side-panel {
        position: static;
    }
}

@media (max-width: 820px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

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

    .nav-wrap {
        padding: 12px 18px;
    }

    .hero {
        height: 560px;
    }

    .hero-content h1,
    .detail-info h1,
    .page-hero h1 {
        font-size: clamp(36px, 12vw, 58px);
    }

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

    .category-entry,
    .wide-card,
    .detail-wrap {
        grid-template-columns: 1fr;
    }

    .poster-box {
        max-width: 280px;
    }

    .content-section {
        width: min(100% - 28px, 1280px);
        padding: 44px 0;
    }

    .section-head,
    .filter-bar,
    .big-search {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (max-width: 540px) {
    .movie-grid,
    .category-grid,
    .rank-grid {
        grid-template-columns: 1fr;
    }

    .hero,
    .detail-hero {
        min-height: 520px;
        height: auto;
        padding: 64px 0;
    }

    .card-cover,
    .wide-cover {
        aspect-ratio: 16 / 9;
    }

    .page-hero,
    .detail-hero {
        padding: 52px 18px;
    }

    .player-section {
        padding: 28px 12px;
    }

    .player-shell {
        border-radius: 18px;
    }
}
