:root {
    color-scheme: dark;
    --deep-950: #121821;
    --deep-900: #1b222b;
    --deep-850: #222b35;
    --deep-800: #29323c;
    --deep-700: #313a45;
    --night-900: #142565;
    --night-700: #273b81;
    --night-600: #2e448c;
    --glow-500: #ffcf33;
    --glow-600: #eab91d;
    --text-main: #ffffff;
    --text-soft: #d1d5db;
    --text-muted: #9ca3af;
    --shadow-glow: 0 0 20px rgba(255, 207, 51, 0.3);
    --shadow-deep: 0 18px 55px rgba(0, 0, 0, 0.45);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(255, 207, 51, 0.12), transparent 32rem),
        radial-gradient(circle at top right, rgba(46, 68, 140, 0.26), transparent 34rem),
        var(--deep-900);
    color: var(--text-main);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

img {
    max-width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(27, 34, 43, 0.95);
    border-bottom: 1px solid rgba(49, 58, 69, 0.82);
    backdrop-filter: blur(14px);
}

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

.site-brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--glow-500);
}

.site-brand {
    white-space: nowrap;
    font-size: 18px;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--glow-500);
    color: var(--deep-900);
    box-shadow: var(--shadow-glow);
    font-size: 14px;
}

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

.desktop-nav a,
.mobile-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    color: var(--text-soft);
    transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--glow-500);
    background: rgba(255, 207, 51, 0.08);
}

.header-search {
    margin-left: auto;
    display: flex;
    align-items: center;
    width: min(360px, 32vw);
    background: rgba(41, 50, 60, 0.86);
    border: 1px solid rgba(49, 58, 69, 0.9);
    border-radius: 999px;
    overflow: hidden;
}

.header-search input {
    min-width: 0;
    flex: 1;
    height: 42px;
    padding: 0 16px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-main);
}

.header-search input::placeholder {
    color: var(--text-muted);
}

.header-search button,
.hero-cta,
.filter-panel button,
.player-start,
.primary-button {
    border: 0;
    border-radius: 999px;
    background: var(--glow-500);
    color: var(--deep-900);
    font-weight: 800;
    cursor: pointer;
    box-shadow: var(--shadow-glow);
    transition: transform 0.2s ease, background 0.2s ease;
}

.header-search button {
    height: 42px;
    padding: 0 18px;
}

.header-search button:hover,
.hero-cta:hover,
.filter-panel button:hover,
.player-start:hover,
.primary-button:hover {
    background: var(--glow-600);
    transform: translateY(-1px);
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(49, 58, 69, 0.9);
    border-radius: 12px;
    background: rgba(41, 50, 60, 0.88);
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: var(--text-main);
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 12px;
    border: 1px solid rgba(49, 58, 69, 0.8);
    border-radius: 18px;
    background: rgba(27, 34, 43, 0.98);
}

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

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

.hero {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: #000;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(27, 34, 43, 1), rgba(27, 34, 43, 0.72), rgba(27, 34, 43, 0.22));
}

.hero-content {
    position: absolute;
    left: max(16px, calc((100vw - 1180px) / 2));
    right: max(16px, calc((100vw - 1180px) / 2));
    bottom: clamp(44px, 9vh, 96px);
    z-index: 3;
    max-width: 760px;
}

.hero-kicker,
.section-kicker,
.detail-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--glow-500);
    font-weight: 800;
}

.hero-title {
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(36px, 6vw, 68px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-desc {
    max-width: 720px;
    margin: 0 0 26px;
    color: var(--text-soft);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.7;
}

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

.hero-cta,
.primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 28px;
}

.hero-pill,
.meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 12px;
    color: #fff;
    background: rgba(41, 50, 60, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: rgba(27, 34, 43, 0.78);
    color: #fff;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background 0.2s ease, color 0.2s ease;
}

.hero-control:hover {
    background: rgba(41, 50, 60, 0.95);
    color: var(--glow-500);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dots button.active {
    width: 34px;
    background: var(--glow-500);
}

.main-content {
    padding: 54px 0 72px;
}

.section-block {
    margin-bottom: 70px;
}

.section-panel {
    padding: clamp(22px, 4vw, 38px);
    border: 1px solid rgba(39, 59, 129, 0.5);
    border-radius: 28px;
    background: linear-gradient(120deg, rgba(20, 37, 101, 0.42), rgba(41, 50, 60, 0.72));
    box-shadow: var(--shadow-deep);
}

.section-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
}

.section-title-row h2,
.page-heading h1,
.detail-copy h1,
.content-panel h2,
.player-section h2 {
    margin: 0;
    color: #fff;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-title-row h2 {
    font-size: clamp(24px, 3vw, 34px);
}

.section-more {
    color: var(--glow-500);
    font-weight: 800;
}

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

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

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

.movie-card {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(49, 58, 69, 0.62);
    border-radius: 22px;
    background: rgba(41, 50, 60, 0.94);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.22);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 207, 51, 0.42);
    box-shadow: var(--shadow-glow), var(--shadow-deep);
}

.card-cover {
    position: relative;
    height: 268px;
    overflow: hidden;
    background: #111822;
}

.featured-grid .card-cover {
    height: 360px;
}

.trending-grid .card-cover {
    height: 300px;
}

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

.movie-card:hover .card-cover img {
    transform: scale(1.09);
}

.card-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(27, 34, 43, 0.92), rgba(27, 34, 43, 0.2), transparent);
    opacity: 0.82;
    transition: opacity 0.2s ease;
}

.movie-card:hover .card-cover::after {
    opacity: 0.95;
}

.card-category,
.rank-badge {
    position: absolute;
    z-index: 2;
    top: 14px;
    left: 14px;
    max-width: calc(100% - 28px);
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(46, 68, 140, 0.88);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.rank-badge {
    left: auto;
    right: 14px;
    background: var(--glow-500);
    color: var(--deep-900);
}

.card-play {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 207, 51, 0.92);
    color: var(--deep-900);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    box-shadow: var(--shadow-glow);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.card-body {
    padding: 18px;
}

.card-body h3 {
    margin: 0 0 10px;
    color: #fff;
    font-size: 17px;
    line-height: 1.45;
    font-weight: 800;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

.movie-card:hover h3 {
    color: var(--glow-500);
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 13px;
}

.card-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 8px;
    background: rgba(27, 34, 43, 0.7);
}

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

.horizontal-scroll {
    overflow-x: auto;
    padding: 2px 0 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--deep-700) var(--deep-900);
}

.horizontal-row {
    display: flex;
    gap: 18px;
    width: max-content;
}

.horizontal-row .movie-card {
    width: 300px;
}

.page-heading {
    padding: 58px 0 22px;
}

.page-heading h1 {
    margin-bottom: 14px;
    font-size: clamp(34px, 5vw, 54px);
}

.page-heading p {
    max-width: 840px;
    margin: 0;
    color: var(--text-soft);
    font-size: 18px;
    line-height: 1.8;
}

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

.category-card {
    display: block;
    min-height: 210px;
    padding: 26px;
    border: 1px solid rgba(49, 58, 69, 0.76);
    border-radius: 26px;
    background:
        linear-gradient(140deg, rgba(255, 207, 51, 0.12), transparent 42%),
        linear-gradient(135deg, rgba(46, 68, 140, 0.72), rgba(41, 50, 60, 0.92));
    box-shadow: var(--shadow-deep);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 207, 51, 0.45);
}

.category-card h2 {
    margin: 0 0 12px;
    color: #fff;
    font-size: 26px;
    font-weight: 900;
}

.category-card p {
    margin: 0 0 22px;
    color: var(--text-soft);
    line-height: 1.7;
}

.category-card span {
    color: var(--glow-500);
    font-weight: 900;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 190px 190px 130px;
    gap: 12px;
    margin: 0 0 30px;
    padding: 18px;
    border: 1px solid rgba(49, 58, 69, 0.82);
    border-radius: 22px;
    background: rgba(41, 50, 60, 0.74);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    border: 1px solid rgba(49, 58, 69, 0.94);
    border-radius: 14px;
    outline: 0;
    background: rgba(27, 34, 43, 0.92);
    color: #fff;
}

.filter-panel button {
    height: 46px;
}

.no-results {
    display: none;
    padding: 36px;
    border: 1px solid rgba(49, 58, 69, 0.76);
    border-radius: 22px;
    color: var(--text-soft);
    text-align: center;
    background: rgba(41, 50, 60, 0.66);
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 64px 88px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(49, 58, 69, 0.72);
    border-radius: 20px;
    background: rgba(41, 50, 60, 0.82);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 207, 51, 0.42);
}

.ranking-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: var(--glow-500);
    color: var(--deep-900);
    font-weight: 900;
}

.ranking-item img {
    width: 88px;
    height: 116px;
    object-fit: cover;
    border-radius: 14px;
}

.ranking-info h2 {
    margin: 0 0 8px;
    color: #fff;
    font-size: 20px;
    font-weight: 900;
}

.ranking-info p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.6;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    padding: 54px 0;
    background: rgba(0, 0, 0, 0.18);
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--detail-bg) center / cover no-repeat;
    opacity: 0.18;
    filter: blur(4px);
    transform: scale(1.04);
}

.detail-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(27, 34, 43, 1), rgba(27, 34, 43, 0.84), rgba(27, 34, 43, 0.58));
}

.detail-layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 36px;
    align-items: center;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: var(--shadow-deep);
}

.detail-copy h1 {
    margin-bottom: 18px;
    font-size: clamp(36px, 5vw, 60px);
    line-height: 1.08;
}

.detail-lead {
    margin: 0 0 20px;
    color: var(--text-soft);
    font-size: 19px;
    line-height: 1.8;
}

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

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0 0;
}

.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 207, 51, 0.1);
    color: var(--glow-500);
    font-weight: 700;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 24px 0 0;
    color: var(--text-muted);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--glow-500);
}

.player-section,
.content-panel {
    margin: 46px auto 0;
    padding: clamp(20px, 4vw, 34px);
    border: 1px solid rgba(49, 58, 69, 0.78);
    border-radius: 28px;
    background: rgba(41, 50, 60, 0.72);
    box-shadow: var(--shadow-deep);
}

.player-section h2,
.content-panel h2 {
    margin-bottom: 22px;
    font-size: clamp(24px, 3vw, 34px);
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    aspect-ratio: 16 / 9;
}

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

.player-start {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    min-height: 58px;
    padding: 0 30px;
    transform: translate(-50%, -50%);
    font-size: 18px;
}

.player-start:hover {
    transform: translate(-50%, calc(-50% - 1px));
}

.player-start.hidden {
    opacity: 0;
    pointer-events: none;
}

.content-panel p {
    margin: 0 0 18px;
    color: var(--text-soft);
    font-size: 17px;
    line-height: 1.9;
}

.site-footer {
    margin-top: 60px;
    border-top: 1px solid rgba(49, 58, 69, 0.82);
    background: rgba(18, 24, 33, 0.88);
}

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

.footer-inner p {
    max-width: 620px;
    margin: 12px 0 0;
    color: var(--text-muted);
    line-height: 1.8;
}

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

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--text-soft);
    background: rgba(41, 50, 60, 0.74);
}

.footer-links a:hover {
    color: var(--glow-500);
}

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

    .mobile-menu-button {
        display: block;
        margin-left: auto;
    }

    .hero-control {
        display: none;
    }

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

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

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

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

    .site-brand span:last-child {
        max-width: 180px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hero {
        min-height: 78vh;
    }

    .hero-content {
        bottom: 66px;
    }

    .hero-actions,
    .detail-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-cta,
    .primary-button,
    .hero-pill,
    .meta-pill {
        width: 100%;
        justify-content: center;
    }

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

    .movie-grid,
    .movie-grid.trending-grid,
    .movie-grid.featured-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .card-cover,
    .featured-grid .card-cover,
    .trending-grid .card-cover {
        height: 250px;
    }

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

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

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

    .ranking-item {
        grid-template-columns: 46px 72px 1fr;
    }

    .ranking-item img {
        width: 72px;
        height: 96px;
    }

    .ranking-item .primary-button {
        grid-column: 1 / -1;
    }

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

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