:root {
    --bg: #0f172a;
    --bg-soft: #111827;
    --panel: #1e293b;
    --panel-light: #253449;
    --text: #f8fafc;
    --muted: #94a3b8;
    --line: rgba(148, 163, 184, 0.24);
    --orange: #f97316;
    --orange-dark: #ea580c;
    --gold: #fbbf24;
    --radius: 22px;
    --shadow: 0 24px 80px rgba(15, 23, 42, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 12% 8%, rgba(249, 115, 22, 0.16), transparent 28%),
        radial-gradient(circle at 86% 4%, rgba(59, 130, 246, 0.12), transparent 30%),
        linear-gradient(180deg, #0f172a 0%, #111827 42%, #0b1120 100%);
    color: var(--text);
    font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    min-height: 100vh;
}

img {
    max-width: 100%;
}

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.88);
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    backdrop-filter: blur(18px);
}

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

.site-logo,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.site-logo-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: white;
    font-weight: 900;
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    box-shadow: 0 12px 30px rgba(249, 115, 22, 0.32);
}

.site-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.site-logo-text strong {
    font-size: 21px;
    letter-spacing: 0.05em;
}

.site-logo-text em {
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-nav a {
    color: #cbd5e1;
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: 700;
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.site-nav a:hover,
.site-nav a.active {
    color: #fff;
    background: rgba(249, 115, 22, 0.92);
    transform: translateY(-1px);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.84);
}

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #fff;
    border-radius: 999px;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 680px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

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

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

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

.hero-image {
    position: absolute;
    inset: 0;
}

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

.hero-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.76) 45%, rgba(15, 23, 42, 0.42) 100%),
        linear-gradient(0deg, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.08) 45%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1200px, calc(100% - 32px));
    min-height: 680px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.7fr);
    align-items: center;
    gap: 48px;
    padding: 64px 0;
}

.hero-copy {
    max-width: 760px;
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fed7aa;
    background: rgba(249, 115, 22, 0.16);
    border: 1px solid rgba(249, 115, 22, 0.35);
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 800;
    font-size: 14px;
}

.hero h1,
.page-hero h1 {
    margin: 22px 0 18px;
    font-size: clamp(40px, 6vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.hero h1 span,
.accent-text {
    display: block;
    color: var(--orange);
}

.hero p,
.page-hero p {
    color: #cbd5e1;
    font-size: 20px;
    line-height: 1.9;
}

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

.btn-primary,
.btn-secondary,
.filter-form button,
.player-start {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 14px;
    font-weight: 900;
    color: white;
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
    box-shadow: 0 14px 34px rgba(249, 115, 22, 0.28);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-primary:hover,
.btn-secondary:hover,
.filter-form button:hover,
.player-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(249, 115, 22, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: none;
}

.hero-panel {
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    padding: 22px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-panel img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 20px;
    background: rgba(15, 23, 42, 0.35);
}

.hero-panel h2 {
    margin: 18px 0 8px;
    font-size: 26px;
}

.hero-panel p {
    font-size: 15px;
    line-height: 1.7;
}

.hero-dots {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 36px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 42px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
}

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

.home-search {
    width: min(920px, calc(100% - 32px));
    margin: -34px auto 0;
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 24px;
    background: rgba(30, 41, 59, 0.92);
    box-shadow: var(--shadow);
}

.home-search input,
.filter-form input,
.filter-form select {
    width: 100%;
    min-height: 50px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    color: #fff;
    background: rgba(15, 23, 42, 0.72);
    padding: 0 16px;
    outline: none;
}

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

.home-search button {
    min-width: 132px;
}

.section,
.page-section,
.filter-panel,
.page-hero,
.movie-detail,
.player-section {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.section,
.page-section {
    padding: 72px 0 0;
}

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

.section-header h2,
.filter-panel h2 {
    margin: 10px 0 8px;
    font-size: clamp(26px, 3vw, 40px);
    letter-spacing: -0.03em;
}

.section-header p,
.filter-panel p,
.category-card p,
.movie-card p,
.detail-summary p,
.detail-review p {
    color: var(--muted);
    line-height: 1.8;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: var(--radius);
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
    box-shadow: 0 16px 46px rgba(0, 0, 0, 0.18);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(249, 115, 22, 0.55);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.5);
}

.movie-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.movie-year {
    position: absolute;
    right: 12px;
    top: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    color: #fff;
    background: rgba(15, 23, 42, 0.78);
}

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

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

.movie-card h3 a:hover {
    color: #fed7aa;
}

.movie-meta-line {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fed7aa;
    font-size: 12px;
    font-weight: 800;
}

.movie-card p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    min-height: 76px;
    overflow: hidden;
    margin: 0 0 14px;
    font-size: 14px;
}

.movie-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.movie-tags span,
.detail-tags span,
.rank-badge {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 0 9px;
    border-radius: 999px;
    color: #fed7aa;
    background: rgba(249, 115, 22, 0.12);
    border: 1px solid rgba(249, 115, 22, 0.22);
    font-size: 12px;
    font-weight: 800;
}

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

.category-card {
    padding: 24px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
    border: 1px solid rgba(148, 163, 184, 0.18);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

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

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

.category-links {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.small-movie-link {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(148, 163, 184, 0.12);
}

.small-movie-link:hover {
    border-color: rgba(249, 115, 22, 0.45);
}

.small-movie-link img {
    width: 52px;
    height: 68px;
    object-fit: cover;
    border-radius: 10px;
}

.small-movie-link strong,
.small-movie-link em {
    display: block;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 64px 84px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 20px;
    background: rgba(30, 41, 59, 0.8);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    color: #fff;
    font-size: 20px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--orange), var(--orange-dark));
}

.rank-item img {
    width: 84px;
    height: 112px;
    object-fit: cover;
    border-radius: 14px;
}

.rank-item h2,
.rank-item h3 {
    margin: 0 0 8px;
    font-size: 22px;
}

.rank-item p {
    color: var(--muted);
    line-height: 1.7;
    margin: 0;
}

.filter-panel {
    margin-top: 52px;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 26px;
    background: rgba(30, 41, 59, 0.82);
}

.filter-form {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 150px 150px auto;
    gap: 12px;
    margin-top: 20px;
}

.filter-empty {
    margin: 18px 0 0;
    color: #fed7aa;
}

.page-hero {
    padding: 74px 0 10px;
}

.page-hero-content {
    padding: 36px;
    border-radius: 30px;
    background:
        linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(15, 23, 42, 0.4)),
        rgba(30, 41, 59, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: var(--shadow);
}

.movie-detail {
    padding: 54px 0 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    margin-bottom: 22px;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 34px;
    align-items: start;
}

.detail-poster {
    border-radius: 28px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: var(--shadow);
}

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

.detail-info h1 {
    margin: 0 0 18px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.detail-meta span {
    color: #fed7aa;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.13);
    border: 1px solid rgba(249, 115, 22, 0.22);
    font-weight: 800;
}

.detail-one-line {
    color: #e2e8f0;
    font-size: 20px;
    line-height: 1.8;
    margin: 0 0 26px;
}

.player-section {
    padding: 64px 0 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #000;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: var(--shadow);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0.28);
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-start {
    min-width: 168px;
    min-height: 58px;
    font-size: 18px;
}

.player-status {
    position: absolute;
    left: 18px;
    bottom: 16px;
    color: #fff;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    font-size: 13px;
}

.detail-content-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 28px;
    margin-top: 48px;
}

.detail-summary,
.detail-review,
.related-panel {
    padding: 26px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 24px;
    background: rgba(30, 41, 59, 0.82);
}

.detail-summary h2,
.detail-review h2,
.related-panel h2 {
    margin: 0 0 16px;
    font-size: 26px;
}

.detail-review {
    margin-top: 24px;
}

.related-list {
    display: grid;
    gap: 12px;
}

.site-footer {
    margin-top: 84px;
    padding: 54px 0 34px;
    background: rgba(2, 6, 23, 0.88);
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.footer-grid,
.footer-bottom {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
    gap: 34px;
}

.site-footer h2 {
    margin: 0 0 16px;
    font-size: 18px;
}

.site-footer p,
.site-footer a {
    color: var(--muted);
    line-height: 1.85;
}

.site-footer a {
    display: block;
    margin: 8px 0;
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    margin-top: 38px;
    padding-top: 24px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.footer-bottom div {
    display: flex;
    gap: 18px;
}

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

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

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

    .hero-panel {
        max-width: 420px;
    }

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

@media (max-width: 780px) {
    .site-header-inner {
        height: auto;
        min-height: 68px;
        flex-wrap: wrap;
        padding: 12px 0;
    }

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

    .site-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding-bottom: 10px;
    }

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

    .site-nav a {
        width: 100%;
    }

    .hero,
    .hero-slider,
    .hero-content {
        min-height: 720px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 48px 0 86px;
    }

    .hero-panel {
        display: none;
    }

    .home-search,
    .filter-form,
    .detail-layout,
    .rank-item {
        grid-template-columns: 1fr;
    }

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

    .rank-item img {
        width: 100%;
        height: auto;
        aspect-ratio: 3 / 4;
    }

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

    .footer-bottom {
        flex-direction: column;
    }
}

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

    .section-header {
        display: block;
    }

    .hero h1,
    .page-hero h1 {
        font-size: 38px;
    }

    .page-hero-content,
    .filter-panel,
    .detail-summary,
    .detail-review,
    .related-panel {
        padding: 20px;
    }
}
