:root {
    color-scheme: light;
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --orange: #f97316;
    --orange-dark: #ea580c;
    --red: #dc2626;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 20px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}

.header-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 14px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    font-size: 24px;
    letter-spacing: 0.03em;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 10px 24px rgba(249, 115, 22, 0.35);
}

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

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

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

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #fff7ed;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-button span {
    width: 20px;
    height: 2px;
    background: var(--orange-dark);
    border-radius: 2px;
}

.mobile-nav {
    display: none;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 22px 14px;
    gap: 8px;
    flex-wrap: wrap;
}

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

main {
    min-height: 70vh;
}

.hero-slider {
    position: relative;
    overflow: hidden;
    background: #111827;
}

.hero-track {
    position: relative;
    min-height: 640px;
}

.hero-slide {
    min-height: 640px;
    display: none;
    background-position: center;
    background-size: cover;
    padding: 90px 22px 80px;
}

.hero-slide.is-active {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
    align-items: center;
    gap: 46px;
    animation: fade-in 0.55s ease both;
}

.hero-content {
    max-width: 720px;
    margin-left: max(0px, calc((100vw - 1240px) / 2));
    color: #ffffff;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 6px 12px;
    color: var(--orange-dark);
    background: #ffedd5;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero-content .eyebrow {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.hero-content h1,
.hero-content h2 {
    margin: 20px 0 10px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.hero-content strong {
    display: block;
    color: #fed7aa;
    font-size: clamp(20px, 3vw, 34px);
    margin-bottom: 18px;
}

.hero-content p {
    max-width: 660px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
}

.hero-meta,
.detail-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.hero-meta {
    margin: 24px 0;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
    border-radius: 999px;
    padding: 5px 10px;
    background: rgba(255, 255, 255, 0.16);
    color: inherit;
    font-size: 13px;
    font-weight: 700;
}

.detail-meta span,
.card-meta span {
    background: #f3f4f6;
    color: #4b5563;
}

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

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 900;
    transition: 0.22s ease;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 14px 30px rgba(249, 115, 22, 0.32);
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 42px rgba(249, 115, 22, 0.42);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
}

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.26);
}

.hero-cover {
    width: min(420px, 34vw);
    margin-right: max(0px, calc((100vw - 1240px) / 2));
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
    transform: rotate(2deg);
}

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

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

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

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

.section {
    max-width: 1240px;
    margin: 0 auto;
    padding: 64px 22px;
}

.section-raised {
    margin-top: -40px;
    position: relative;
    z-index: 2;
}

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

.section-heading h2,
.page-hero h1,
.detail-info h1,
.detail-content h2 {
    margin: 8px 0 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.18;
    font-weight: 950;
    letter-spacing: -0.03em;
}

.section-heading p,
.page-hero p {
    max-width: 720px;
    color: var(--muted);
    margin: 10px 0 0;
}

.section-heading > a {
    color: var(--orange-dark);
    font-weight: 900;
}

.featured-grid,
.movie-grid,
.category-grid {
    display: grid;
    gap: 22px;
}

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

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

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

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

.movie-card,
.category-tile,
.poster-panel,
.detail-info,
.player-shell,
.detail-content {
    background: var(--panel);
    border: 1px solid rgba(229, 231, 235, 0.78);
    border-radius: var(--radius);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.movie-card {
    overflow: hidden;
    transition: 0.22s ease;
}

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

.card-media {
    position: relative;
    display: block;
    overflow: hidden;
    background: #111827;
}

.card-media img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: 0.28s ease;
}

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

.card-play,
.big-play {
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.card-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
    transition: 0.22s ease;
}

.movie-card:hover .card-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.card-year,
.rank-badge {
    position: absolute;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(17, 24, 39, 0.82);
    font-weight: 900;
    font-size: 12px;
}

.card-year {
    right: 10px;
    bottom: 10px;
    padding: 4px 8px;
}

.rank-badge {
    left: 10px;
    top: 10px;
    min-width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--orange), var(--red));
}

.card-body {
    padding: 15px;
}

.card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 48px;
    font-weight: 900;
    line-height: 1.35;
}

.card-title:hover {
    color: var(--orange-dark);
}

.card-meta {
    margin-top: 8px;
    gap: 6px;
}

.card-desc {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-list {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag-list span {
    border-radius: 999px;
    padding: 4px 8px;
    color: var(--orange-dark);
    background: #fff7ed;
    font-size: 12px;
    font-weight: 800;
}

.movie-card-featured {
    background: linear-gradient(135deg, var(--orange), var(--red));
    color: #ffffff;
}

.movie-card-featured .card-body,
.movie-card-featured .card-desc {
    color: #ffffff;
}

.movie-card-featured .card-meta span,
.movie-card-featured .tag-list span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

.movie-card-horizontal {
    display: grid;
    grid-template-columns: 138px minmax(0, 1fr);
}

.movie-card-horizontal .card-media img {
    height: 100%;
    min-height: 190px;
}

.movie-card-horizontal .card-title {
    min-height: auto;
}

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

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

.category-tile {
    overflow: hidden;
    padding: 18px;
    transition: 0.22s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.category-covers {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.category-covers img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
}

.category-tile strong {
    display: block;
    font-size: 20px;
    font-weight: 950;
}

.category-tile p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.page-hero,
.detail-top {
    max-width: 1240px;
    margin: 0 auto;
    padding: 58px 22px 20px;
}

.small-hero > div:last-child,
.detail-grid {
    border-radius: 30px;
    background: linear-gradient(135deg, #ffffff, #fff7ed);
    padding: clamp(28px, 5vw, 56px);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 237, 213, 0.85);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    margin-bottom: 18px;
    font-size: 14px;
}

.breadcrumb a {
    color: var(--orange-dark);
    font-weight: 800;
}

.breadcrumb em {
    font-style: normal;
    color: #d1d5db;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 180px;
    gap: 12px;
    margin-bottom: 26px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    padding: 0 16px;
}

.search-box input,
.filter-panel select {
    width: 100%;
    height: 46px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
}

.filter-panel select {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    padding: 0 14px;
}

.empty-state {
    display: none;
    text-align: center;
    color: var(--muted);
    font-weight: 800;
    padding: 30px;
}

.empty-state.is-visible {
    display: block;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.poster-panel {
    padding: 12px;
    overflow: hidden;
}

.poster-panel img {
    width: 100%;
    border-radius: 16px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.detail-info {
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
}

.detail-info h1 {
    font-size: clamp(34px, 5vw, 60px);
}

.lead-text {
    color: #374151;
    font-size: 18px;
    margin: 18px 0;
}

.detail-tags {
    margin: 18px 0 24px;
}

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

.movie-video,
.player-poster {
    width: 100%;
    aspect-ratio: 16 / 9;
}

.movie-video {
    background: #000000;
}

.player-poster {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    background: #111827;
}

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

.player-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.25), rgba(17, 24, 39, 0.74));
}

.big-play {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 86px;
    height: 86px;
    transform: translate(-50%, -50%);
    font-size: 34px;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: 0 18px 40px rgba(249, 115, 22, 0.38);
}

.player-shell.is-playing .player-poster {
    display: none;
    pointer-events: none;
}

.detail-content {
    padding: 34px;
}

.detail-content h2 {
    font-size: 28px;
    margin-top: 0;
}

.detail-content h2 + p {
    margin-top: 12px;
}

.detail-content p + h2 {
    margin-top: 30px;
}

.detail-content p {
    color: #374151;
    font-size: 17px;
}

.site-footer {
    margin-top: 40px;
    background: #111827;
    color: rgba(255, 255, 255, 0.82);
}

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 42px 22px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 440px);
    gap: 30px;
}

.footer-logo {
    color: #ffffff;
}

.footer-inner p {
    max-width: 640px;
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.68);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.footer-links a {
    padding: 7px 10px;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.78);
    background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@media (max-width: 1120px) {
    .featured-grid,
    .movie-grid,
    .compact-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

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

    .hero-slide.is-active {
        grid-template-columns: 1fr;
        padding-top: 70px;
    }

    .hero-cover {
        display: none;
    }

    .featured-grid,
    .movie-grid,
    .compact-grid,
    .category-grid,
    .ranking-list,
    .wide-ranking,
    .footer-inner,
    .detail-grid,
    .filter-panel {
        grid-template-columns: 1fr;
    }

    .movie-card-horizontal {
        grid-template-columns: 120px minmax(0, 1fr);
    }

    .movie-card-horizontal .card-media img {
        min-height: 170px;
    }

    .footer-links {
        justify-content: flex-start;
    }
}

@media (max-width: 560px) {
    .header-inner,
    .section,
    .page-hero,
    .detail-top,
    .footer-inner {
        padding-left: 16px;
        padding-right: 16px;
    }

    .hero-slide {
        min-height: 560px;
        padding-left: 16px;
        padding-right: 16px;
    }

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

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

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

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

    .card-body {
        padding: 12px;
    }

    .card-meta,
    .tag-list,
    .card-desc {
        display: none;
    }

    .card-title {
        min-height: 42px;
        font-size: 14px;
    }

    .movie-card-horizontal {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .movie-card-horizontal .card-desc,
    .movie-card-horizontal .card-meta {
        display: block;
    }

    .big-play {
        width: 68px;
        height: 68px;
        font-size: 26px;
    }
}
