:root {
    color-scheme: dark;
    --page-bg: #090909;
    --surface: #151515;
    --surface-light: #202020;
    --line: rgba(255, 255, 255, 0.1);
    --muted: #9ca3af;
    --text: #f9fafb;
    --accent: #f97316;
    --accent-strong: #ea580c;
    --accent-soft: rgba(249, 115, 22, 0.16);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(249, 115, 22, 0.16), transparent 36rem),
        radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.07), transparent 25rem),
        var(--page-bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
    min-height: 100vh;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(9, 9, 9, 0.82);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.site-header-inner {
    width: min(1400px, calc(100% - 32px));
    margin: 0 auto;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), #fb923c);
    color: #fff;
    box-shadow: 0 14px 35px rgba(249, 115, 22, 0.35);
}

.brand-text {
    font-size: 21px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    color: #d1d5db;
    font-size: 14px;
    white-space: nowrap;
}

.desktop-nav a,
.mobile-nav a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
    color: #fb923c;
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: #fff;
    font-size: 22px;
}

.mobile-nav {
    display: none;
    width: min(1400px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    color: #d1d5db;
}

.mobile-nav.is-open {
    display: grid;
}

.page-shell {
    width: min(1400px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 56px;
}

.hero {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    border-radius: 0 0 38px 38px;
    background: #111;
    box-shadow: var(--shadow);
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    filter: saturate(1.08) contrast(1.05);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.08)),
        linear-gradient(0deg, rgba(9, 9, 9, 0.95), transparent 50%);
}

.hero-content {
    position: absolute;
    z-index: 2;
    left: max(32px, calc((100vw - 1400px) / 2));
    bottom: 74px;
    width: min(660px, calc(100% - 64px));
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 7px 12px;
    border: 1px solid rgba(249, 115, 22, 0.38);
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.14);
    color: #fed7aa;
    font-size: 13px;
    font-weight: 700;
}

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

.hero p {
    margin: 0 0 24px;
    max-width: 620px;
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1.8;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.hero-meta span,
.tag-row span,
.detail-chip,
.category-chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: #f3f4f6;
    font-size: 12px;
    line-height: 1;
}

.hero-meta span,
.detail-chip,
.category-chip {
    padding: 8px 12px;
}

.hero-actions,
.card-actions,
.detail-actions,
.player-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.button-primary,
.button-secondary,
.card-actions a,
.player-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.button-primary,
.player-button {
    min-height: 46px;
    padding: 0 22px;
    background: linear-gradient(135deg, var(--accent), #fb923c);
    color: white;
    box-shadow: 0 16px 34px rgba(249, 115, 22, 0.32);
}

.button-secondary {
    min-height: 46px;
    padding: 0 22px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.button-primary:hover,
.button-secondary:hover,
.card-actions a:hover,
.player-button:hover {
    transform: translateY(-2px);
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: max(32px, calc((100vw - 1400px) / 2));
    bottom: 30px;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 36px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

.hero-dot.is-active {
    background: var(--accent);
}

.search-panel {
    position: relative;
    z-index: 6;
    width: min(1400px, calc(100% - 32px));
    margin: -38px auto 36px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(21, 21, 21, 0.88);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
}

.search-form input,
.search-page-input {
    width: 100%;
    min-height: 50px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    padding: 0 18px;
    outline: none;
}

.search-form input:focus,
.search-page-input:focus {
    border-color: rgba(249, 115, 22, 0.72);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.section-block {
    margin: 42px 0;
}

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

.section-head h2,
.page-title h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(28px, 3.8vw, 46px);
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.section-head p,
.page-title p,
.category-intro,
.detail-title p {
    margin: 10px 0 0;
    max-width: 760px;
    color: var(--muted);
    line-height: 1.8;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.025));
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(249, 115, 22, 0.48);
    background: linear-gradient(180deg, rgba(249, 115, 22, 0.13), rgba(255, 255, 255, 0.035));
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #222;
}

.movie-poster {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 55%);
    opacity: 0.9;
}

.poster-play {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.92);
    color: #fff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.36);
}

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

.movie-meta-line {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 18px;
    color: #9ca3af;
    font-size: 12px;
}

.movie-card h3 {
    margin: 8px 0 8px;
    min-height: 48px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 17px;
    line-height: 1.42;
}

.movie-card p {
    margin: 0 0 12px;
    min-height: 58px;
    color: #b6bcc7;
    font-size: 13px;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 24px;
}

.tag-row span {
    padding: 6px 8px;
    color: #fed7aa;
    background: rgba(249, 115, 22, 0.12);
    border-color: rgba(249, 115, 22, 0.22);
}

.card-actions {
    margin-top: 14px;
}

.card-actions a {
    min-height: 32px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.08);
    color: #f9fafb;
    font-size: 12px;
}

.card-actions a:last-child {
    background: var(--accent);
}

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

.category-card {
    min-height: 190px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background:
        radial-gradient(circle at top right, rgba(249, 115, 22, 0.22), transparent 14rem),
        var(--surface);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(249, 115, 22, 0.48);
}

.category-card h2,
.category-card h3 {
    margin: 12px 0 10px;
    font-size: 24px;
}

.category-card p {
    margin: 0;
    color: #b8bec9;
    line-height: 1.75;
}

.category-card .category-chip {
    color: #fed7aa;
    background: rgba(249, 115, 22, 0.12);
}

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

.rank-panel,
.info-panel,
.search-results-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(21, 21, 21, 0.78);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.23);
}

.rank-panel {
    padding: 18px;
}

.rank-panel h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

.rank-mini-item {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    gap: 10px;
    align-items: center;
    min-height: 42px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    color: #d1d5db;
}

.rank-mini-item:hover {
    color: #fb923c;
}

.rank-num {
    color: #fb923c;
    font-weight: 900;
}

.rank-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-year {
    color: #8c93a0;
    font-size: 12px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: #a1a1aa;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #fb923c;
}

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

.detail-poster-card {
    position: sticky;
    top: 96px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

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

.detail-poster-card .detail-actions {
    padding: 18px;
}

.detail-title {
    padding: 8px 0 20px;
}

.detail-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 0;
}

.info-panel {
    padding: 24px;
    margin-bottom: 18px;
}

.info-panel h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.info-panel p {
    color: #d1d5db;
    line-height: 1.9;
    margin: 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: #020202;
    box-shadow: var(--shadow);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.02), rgba(0, 0, 0, 0.38));
    transition: opacity 0.2s ease;
}

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

.player-button {
    border: 0;
    min-width: 150px;
    min-height: 54px;
    cursor: pointer;
    font-size: 16px;
}

.player-message {
    margin-top: 12px;
    color: #fca5a5;
    min-height: 22px;
}

.search-results-panel {
    padding: 18px;
}

.site-footer {
    border-top: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.36);
}

.footer-grid {
    width: min(1400px, calc(100% - 32px));
    margin: 0 auto;
    padding: 36px 0;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 28px;
}

.footer-brand {
    margin-bottom: 14px;
}

.site-footer p,
.site-footer a {
    color: #a1a1aa;
    line-height: 1.8;
}

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

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

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

.empty-state {
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    background: var(--surface);
}

@media (max-width: 1180px) {
    .desktop-nav {
        display: none;
    }

    .mobile-menu-button {
        display: block;
    }

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

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

@media (max-width: 760px) {
    .site-header-inner {
        height: 64px;
    }

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

    .hero {
        min-height: 590px;
        border-radius: 0 0 28px 28px;
    }

    .hero-content {
        left: 20px;
        bottom: 86px;
        width: calc(100% - 40px);
    }

    .hero p {
        font-size: 15px;
    }

    .hero-dots {
        left: 20px;
    }

    .search-form {
        grid-template-columns: 1fr;
    }

    .section-head {
        display: block;
    }

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

    .movie-card h3 {
        min-height: 44px;
        font-size: 15px;
    }

    .movie-card p {
        display: none;
    }

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

    .detail-poster-card {
        position: relative;
        top: auto;
    }

    .rank-mini-item {
        grid-template-columns: 38px 1fr auto;
    }
}
