:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.78);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(148, 163, 184, 0.18);
    --text: #e5eefb;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --cyan-dark: #0891b2;
    --blue: #3b82f6;
    --gold: #f59e0b;
    --danger: #fb7185;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

html {
    background: var(--bg);
}

body {
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 8%, rgba(34, 211, 238, 0.18), transparent 28rem),
        radial-gradient(circle at 82% 18%, rgba(59, 130, 246, 0.16), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 42%, #020617 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

main {
    overflow: hidden;
}

img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9), rgba(8, 145, 178, 0.28));
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.94), rgba(15, 23, 42, 0.92), rgba(2, 6, 23, 0.94));
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

.header-inner {
    max-width: 1280px;
    height: 72px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

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

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    color: #04111f;
    font-size: 20px;
    font-weight: 900;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 0 32px rgba(34, 211, 238, 0.38);
}

.brand-name {
    font-size: 22px;
    background: linear-gradient(90deg, var(--cyan), #60a5fa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link,
.mobile-link,
.footer-links a,
.section-link {
    color: var(--muted);
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    font-weight: 700;
}

.nav-link:hover,
.nav-link.active {
    color: white;
    background: rgba(34, 211, 238, 0.12);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(15, 23, 42, 0.78);
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 999px;
    background: var(--text);
}

.mobile-nav {
    display: none;
    padding: 0 24px 18px;
    border-top: 1px solid var(--line);
}

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

.mobile-link {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.82);
}

.page-shell,
.section-wrap,
.hero-shell {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
}

.hero {
    position: relative;
    min-height: 760px;
    padding: 112px 0 70px;
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(12px);
    opacity: 0.7;
    pointer-events: none;
}

.hero::before {
    width: 300px;
    height: 300px;
    left: -110px;
    top: 120px;
    background: rgba(34, 211, 238, 0.18);
}

.hero::after {
    width: 340px;
    height: 340px;
    right: -130px;
    bottom: 120px;
    background: rgba(59, 130, 246, 0.16);
}

.hero-carousel {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(15, 23, 42, 0.72));
    box-shadow: var(--shadow);
}

.hero-slide {
    display: none;
    min-height: 590px;
    grid-template-columns: minmax(0, 1.02fr) minmax(320px, 0.76fr);
    gap: 28px;
    padding: 54px;
    align-items: center;
}

.hero-slide.active {
    display: grid;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--cyan);
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
    max-width: 860px;
    color: white;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 1.02;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.hero h1 span,
.gradient-text {
    background: linear-gradient(90deg, var(--cyan), #60a5fa, #c4b5fd);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-desc,
.page-hero p,
.detail-title p {
    max-width: 780px;
    margin-top: 18px;
    color: #cbd5e1;
    font-size: 18px;
    line-height: 1.9;
}

.hero-actions,
.card-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    color: white;
    font-weight: 900;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn.primary {
    color: #03121d;
    background: linear-gradient(135deg, var(--cyan), #60a5fa);
    box-shadow: 0 14px 32px rgba(34, 211, 238, 0.26);
}

.btn:hover,
.section-link:hover,
.category-panel:hover,
.movie-card:hover {
    transform: translateY(-3px);
}

.hero-search,
.search-strip {
    display: flex;
    gap: 10px;
    width: min(640px, 100%);
    margin-top: 30px;
    padding: 8px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.58);
}

.hero-search input,
.search-strip input,
.filter-panel input,
.filter-panel select {
    min-width: 0;
    color: white;
    border: 1px solid rgba(148, 163, 184, 0.2);
    outline: none;
    background: rgba(15, 23, 42, 0.84);
}

.hero-search input,
.search-strip input {
    flex: 1;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
}

.hero-poster {
    position: relative;
    min-height: 480px;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.5);
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 38%, rgba(2, 6, 23, 0.88) 100%);
}

.hero-poster-meta {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 22px;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: end;
}

.hero-poster-meta strong {
    color: white;
    font-size: 22px;
}

.hero-poster-meta span {
    color: var(--cyan);
    font-weight: 800;
}

.hero-controls {
    position: absolute;
    left: 54px;
    right: 54px;
    bottom: 28px;
    z-index: 5;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: none;
}

.hero-dots {
    display: flex;
    gap: 9px;
    pointer-events: auto;
}

.hero-dot {
    width: 30px;
    height: 8px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.32);
}

.hero-dot.active {
    background: linear-gradient(90deg, var(--cyan), var(--blue));
}

.hero-arrows {
    display: flex;
    gap: 10px;
    pointer-events: auto;
}

.hero-arrow {
    width: 42px;
    height: 42px;
    color: white;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(15, 23, 42, 0.72);
}

.section-wrap {
    padding: 52px 0;
}

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

.section-heading h2,
.page-hero h1,
.detail-section h2 {
    color: white;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.12;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.section-heading p {
    max-width: 680px;
    margin-top: 8px;
    color: var(--muted);
    line-height: 1.85;
}

.section-link {
    flex: none;
    padding: 11px 16px;
    border: 1px solid rgba(34, 211, 238, 0.24);
    border-radius: 999px;
    color: var(--cyan);
    font-weight: 900;
    background: rgba(34, 211, 238, 0.08);
}

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

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

.movie-card {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.68);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    border-color: rgba(34, 211, 238, 0.48);
    box-shadow: 0 22px 56px rgba(8, 145, 178, 0.17);
}

.movie-card[hidden] {
    display: none;
}

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.96);
}

.poster-frame img {
    transition: transform 0.35s ease, opacity 0.35s ease;
}

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

.poster-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 46%, rgba(2, 6, 23, 0.88) 100%);
}

.poster-type,
.rank-badge {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.poster-type {
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
    color: #07131f;
    background: linear-gradient(135deg, var(--cyan), #60a5fa);
}

.rank-badge {
    top: 12px;
    left: 12px;
    padding: 6px 9px;
    color: white;
    background: rgba(245, 158, 11, 0.92);
}

.movie-card-body {
    display: grid;
    gap: 8px;
    padding: 15px;
}

.movie-meta-line {
    color: var(--cyan);
    font-size: 12px;
    font-weight: 900;
}

.movie-card strong {
    color: white;
    font-size: 17px;
    line-height: 1.35;
}

.movie-one-line {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-row,
.meta-chips,
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-row span,
.meta-chips span,
.breadcrumbs a,
.breadcrumbs span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 800;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
}

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

.category-panel {
    position: relative;
    min-height: 188px;
    padding: 22px;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background:
        radial-gradient(circle at 80% 12%, rgba(34, 211, 238, 0.18), transparent 12rem),
        rgba(15, 23, 42, 0.74);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-panel:hover {
    border-color: rgba(34, 211, 238, 0.42);
}

.category-panel strong {
    display: block;
    color: white;
    font-size: 22px;
    font-weight: 950;
}

.category-panel p {
    margin-top: 12px;
    color: var(--muted);
    line-height: 1.72;
}

.category-panel span {
    position: absolute;
    left: 22px;
    bottom: 18px;
    color: var(--cyan);
    font-weight: 900;
}

.page-hero {
    padding: 128px 0 48px;
    background:
        radial-gradient(circle at 18% 18%, rgba(34, 211, 238, 0.14), transparent 24rem),
        linear-gradient(180deg, rgba(15, 23, 42, 0.82), transparent);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 14px;
    margin: 26px 0 28px;
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.68);
}

.filter-panel input,
.filter-panel select {
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
}

.filter-selects {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.detail-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 112px 0 58px;
}

.breadcrumbs {
    margin-bottom: 22px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 32px;
    align-items: end;
    padding: 28px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 30px;
    background:
        radial-gradient(circle at 76% 10%, rgba(34, 211, 238, 0.14), transparent 24rem),
        rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 22px;
    aspect-ratio: 2 / 3;
    box-shadow: 0 22px 60px rgba(0, 0, 0, 0.4);
}

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

.player-card,
.detail-section,
.related-section {
    margin-top: 30px;
    padding: 24px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

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

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

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    color: white;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.24), rgba(2, 6, 23, 0.72));
    transition: opacity 0.2s ease;
}

.play-overlay.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.play-button-core {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 22px;
    border-radius: 999px;
    color: #03121d;
    font-size: 18px;
    font-weight: 950;
    background: linear-gradient(135deg, var(--cyan), #60a5fa);
    box-shadow: 0 18px 42px rgba(34, 211, 238, 0.28);
}

.play-icon {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    color: white;
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.86);
}

.detail-section {
    display: grid;
    gap: 20px;
}

.detail-section p {
    color: #cbd5e1;
    font-size: 17px;
    line-height: 2;
}

.related-section h2 {
    margin-bottom: 20px;
    color: white;
    font-size: 28px;
    font-weight: 950;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 70px 96px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    background: rgba(15, 23, 42, 0.72);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.ranking-item:hover {
    transform: translateX(4px);
    border-color: rgba(34, 211, 238, 0.38);
}

.ranking-num {
    color: var(--gold);
    font-size: 22px;
    font-weight: 950;
    text-align: center;
}

.ranking-thumb {
    overflow: hidden;
    border-radius: 14px;
    aspect-ratio: 2 / 3;
}

.ranking-info strong {
    display: block;
    color: white;
    font-size: 19px;
}

.ranking-info p {
    margin-top: 6px;
    color: var(--muted);
    line-height: 1.7;
}

.ranking-action {
    padding: 10px 14px;
    color: #03121d;
    border-radius: 999px;
    font-weight: 950;
    background: linear-gradient(135deg, var(--cyan), #60a5fa);
}

.site-footer {
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(2, 6, 23, 0.72);
}

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

.footer-brand {
    color: white;
    font-size: 24px;
}

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

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

.footer-links a {
    padding: 9px 12px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
}

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

.footer-bottom {
    padding: 18px 16px;
    color: var(--muted);
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

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

    .hero-slide {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        min-height: 360px;
    }
}

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

    .menu-toggle {
        display: block;
    }

    .hero {
        min-height: auto;
        padding-top: 94px;
    }

    .hero-slide {
        padding: 28px;
    }

    .hero-controls {
        left: 28px;
        right: 28px;
    }

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

    .section-heading,
    .footer-inner,
    .filter-panel,
    .detail-hero {
        grid-template-columns: 1fr;
    }

    .section-heading {
        align-items: start;
    }

    .filter-selects,
    .hero-search {
        flex-direction: column;
        border-radius: 24px;
    }

    .detail-poster {
        width: min(280px, 100%);
    }

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

    .ranking-item {
        grid-template-columns: 48px 76px minmax(0, 1fr);
    }

    .ranking-action {
        grid-column: 2 / -1;
        justify-self: start;
    }
}

@media (max-width: 540px) {
    .header-inner {
        height: 64px;
        padding: 0 16px;
    }

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

    .brand-mark {
        width: 36px;
        height: 36px;
        border-radius: 13px;
    }

    .hero-slide {
        min-height: 620px;
        padding: 22px;
    }

    .hero h1,
    .page-hero h1,
    .detail-title h1 {
        font-size: 34px;
    }

    .hero-desc,
    .page-hero p,
    .detail-title p {
        font-size: 15px;
    }

    .movie-grid,
    .movie-grid.compact-grid,
    .category-grid {
        gap: 12px;
    }

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

    .movie-card strong {
        font-size: 15px;
    }
}
