:root {
    --primary-50: #fff7ed;
    --primary-100: #ffedd5;
    --primary-500: #f97316;
    --primary-600: #ea580c;
    --primary-700: #c2410c;
    --warm-50: #fffaf0;
    --warm-100: #fef3c7;
    --dark-50: #f8fafc;
    --dark-100: #f1f5f9;
    --dark-200: #e2e8f0;
    --dark-300: #cbd5e1;
    --dark-500: #64748b;
    --dark-600: #475569;
    --dark-700: #334155;
    --dark-800: #1e293b;
    --dark-900: #0f172a;
    --shadow-soft: 0 16px 38px rgba(15, 23, 42, 0.10);
    --shadow-card: 0 10px 26px rgba(15, 23, 42, 0.08);
    --radius-lg: 20px;
    --radius-md: 14px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--dark-800);
    background: linear-gradient(180deg, var(--warm-50), #ffffff 24%, var(--dark-50));
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
    backdrop-filter: blur(16px);
}

.nav-shell {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--dark-900);
}

.brand-text {
    font-size: 22px;
    letter-spacing: -0.03em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary-600), #f59e0b);
    box-shadow: 0 10px 24px rgba(234, 88, 12, 0.28);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-link,
.mobile-link {
    font-weight: 700;
    color: var(--dark-600);
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--primary-600);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: var(--primary-50);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 22px;
    height: 2px;
    background: var(--primary-700);
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    padding: 10px 20px 18px;
    border-top: 1px solid var(--dark-200);
    background: #ffffff;
}

.mobile-nav.open {
    display: grid;
    gap: 12px;
}

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

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

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

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.58) 44%, rgba(0, 0, 0, 0.18));
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 620px;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(100%, 680px);
    color: #ffffff;
    padding: 78px 0 118px;
}

.hero-kicker,
.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
    background: rgba(234, 88, 12, 0.96);
    border-radius: 999px;
    padding: 6px 13px;
    font-size: 14px;
    font-weight: 800;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 22px 0 18px;
    font-size: clamp(38px, 6vw, 68px);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.hero-copy p {
    margin: 0;
    width: min(100%, 620px);
    color: rgba(255, 255, 255, 0.90);
    font-size: 18px;
    line-height: 1.75;
}

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

.btn-primary,
.btn-light,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary-600), #f59e0b);
    box-shadow: 0 16px 26px rgba(234, 88, 12, 0.32);
}

.btn-light {
    color: var(--dark-900);
    background: #ffffff;
}

.btn-ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.13);
    border-color: rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(8px);
}

.btn-primary:hover,
.btn-light:hover,
.btn-ghost:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.18);
}

.hero-control {
    position: absolute;
    z-index: 3;
    top: 50%;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    transform: translateY(-50%);
}

.hero-control:hover {
    background: rgba(255, 255, 255, 0.24);
}

.hero-control.prev {
    left: 24px;
}

.hero-control.next {
    right: 24px;
}

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

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

.hero-dot.is-active {
    width: 34px;
    background: #ffffff;
}

.section {
    padding: 62px 0;
}

.section.alt {
    background: #ffffff;
}

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

.section-head h1,
.section-head h2 {
    margin: 0 0 8px;
    color: var(--dark-900);
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.section-head p {
    margin: 0;
    color: var(--dark-600);
    line-height: 1.7;
}

.search-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    margin: -40px auto 36px;
    padding: 18px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(14px);
}

.search-panel input,
.list-search input {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--dark-200);
    border-radius: 12px;
    padding: 0 16px;
    color: var(--dark-800);
    background: #ffffff;
    outline: none;
}

.search-panel input:focus,
.list-search input:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.13);
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 160px;
    padding: 24px;
    border: 1px solid var(--primary-100);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #ffffff, var(--primary-50));
    box-shadow: var(--shadow-card);
}

.category-card::after {
    content: "";
    position: absolute;
    right: -30px;
    bottom: -38px;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: rgba(249, 115, 22, 0.12);
}

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

.category-card p {
    margin: 0 0 18px;
    color: var(--dark-600);
    line-height: 1.65;
}

.category-card span {
    color: var(--primary-700);
    font-weight: 800;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
}

.poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, var(--dark-100), var(--dark-200));
}

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

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

.poster::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 45%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.68), transparent);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.movie-card:hover .poster::after {
    opacity: 1;
}

.poster-play {
    position: absolute;
    left: 50%;
    bottom: 18px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    height: 34px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(234, 88, 12, 0.96);
    font-size: 14px;
    font-weight: 800;
    opacity: 0;
    transform: translateX(-50%) translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border-radius: 10px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary-600), #f59e0b);
    font-weight: 900;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
}

.card-body {
    padding: 16px;
}

.card-meta {
    color: var(--primary-700);
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 8px;
}

.card-body h2,
.card-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.3;
}

.card-body p {
    margin: 0 0 12px;
    color: var(--dark-600);
    font-size: 14px;
    line-height: 1.6;
}

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

.tag-row span,
.meta-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    color: var(--dark-700);
    background: var(--dark-100);
    font-size: 12px;
    font-weight: 700;
}

.list-toolbar {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid var(--dark-200);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.list-search {
    width: 100%;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chip {
    min-height: 36px;
    border: 1px solid var(--dark-200);
    border-radius: 999px;
    padding: 0 14px;
    color: var(--dark-700);
    background: #ffffff;
    font-weight: 800;
}

.filter-chip.is-active,
.filter-chip:hover {
    color: #ffffff;
    border-color: var(--primary-600);
    background: var(--primary-600);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 28px auto 0;
    color: var(--dark-500);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--primary-700);
    font-weight: 800;
}

.detail-hero {
    padding: 28px 0 60px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 28px;
    align-items: start;
}

.player-card,
.detail-card,
.related-card {
    overflow: hidden;
    border: 1px solid var(--dark-200);
    border-radius: var(--radius-lg);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.player-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-frame video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.player-start {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(234, 88, 12, 0.22), rgba(0, 0, 0, 0.74));
}

.player-start span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 138px;
    height: 54px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-600), #f59e0b);
    font-weight: 900;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.36);
}

.player-frame.is-playing .player-start {
    display: none;
}

.player-info,
.detail-card {
    padding: 22px;
}

.player-info h1 {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.info-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--dark-600);
    font-weight: 800;
}

.meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.detail-card h2,
.related-card h2 {
    margin: 0 0 14px;
    color: var(--dark-900);
    font-size: 24px;
}

.detail-card p {
    margin: 0 0 18px;
    color: var(--dark-700);
    line-height: 1.82;
}

.side-poster {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--dark-100);
    box-shadow: var(--shadow-card);
}

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

.side-panel {
    display: grid;
    gap: 20px;
}

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

.related-item {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.related-item:hover {
    background: var(--primary-50);
}

.related-item img {
    width: 74px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 10px;
}

.related-item strong {
    display: block;
    margin-bottom: 4px;
    color: var(--dark-900);
}

.related-item span {
    color: var(--dark-500);
    font-size: 13px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 54px 86px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--dark-200);
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: var(--shadow-card);
}

.rank-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: #ffffff;
    background: var(--dark-800);
    font-weight: 900;
}

.rank-row:nth-child(-n+3) .rank-index {
    background: linear-gradient(135deg, var(--primary-600), #f59e0b);
}

.rank-row img {
    width: 86px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 10px;
}

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

.rank-row p {
    margin: 0;
    color: var(--dark-600);
    line-height: 1.6;
}

.empty-state {
    display: none;
    padding: 28px;
    text-align: center;
    color: var(--dark-500);
    border: 1px dashed var(--dark-300);
    border-radius: var(--radius-lg);
    background: #ffffff;
}

.empty-state.show {
    display: block;
}

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

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

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

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

    .menu-toggle {
        display: inline-flex;
    }

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

    .hero-control {
        display: none;
    }

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

    .section-head {
        align-items: start;
        flex-direction: column;
    }

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

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

    .rank-row {
        grid-template-columns: 42px 70px 1fr;
    }

    .rank-row .btn-primary {
        grid-column: 1 / -1;
    }
}

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

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

    .hero-copy {
        padding: 58px 0 98px;
    }

    .hero-copy p {
        font-size: 16px;
    }

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

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

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.site-footer {
    margin-top: 30px;
    color: var(--dark-200);
    background: var(--dark-800);
}

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

.footer-brand {
    color: #ffffff;
    margin-bottom: 16px;
}

.site-footer p {
    margin: 0;
    color: var(--dark-300);
    line-height: 1.7;
}

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

.footer-links {
    display: grid;
    gap: 10px;
}

.footer-links a {
    color: var(--dark-300);
}

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

.footer-bottom {
    padding: 18px 0 24px;
    color: var(--dark-300);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
