:root {
    color-scheme: dark;
    --bg: #020617;
    --panel: rgba(15, 23, 42, 0.72);
    --panel-strong: rgba(15, 23, 42, 0.94);
    --line: rgba(59, 130, 246, 0.22);
    --line-soft: rgba(148, 163, 184, 0.16);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-strong: #cbd5e1;
    --blue: #3b82f6;
    --cyan: #22d3ee;
    --green: #22c55e;
    --yellow: #eab308;
    --radius: 18px;
    --shadow: 0 30px 80px rgba(2, 6, 23, 0.55);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at 10% -10%, rgba(37, 99, 235, 0.18), transparent 32rem),
        radial-gradient(circle at 92% 8%, rgba(34, 211, 238, 0.12), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 46%, #000000 100%);
    color: var(--text);
}

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

img {
    max-width: 100%;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    border-bottom: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.88);
    backdrop-filter: blur(14px);
}

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

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

.brand-icon,
.footer-brand span {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.35);
}

.brand-text {
    font-size: 24px;
    background: linear-gradient(90deg, #60a5fa, #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

.nav-link {
    color: #cbd5e1;
    font-weight: 650;
    font-size: 15px;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link.active,
.mobile-link:hover {
    color: #60a5fa;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-search,
.mobile-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select,
.search-hero input {
    width: 280px;
    color: #e5e7eb;
    background: rgba(30, 41, 59, 0.72);
    border: 1px solid rgba(30, 64, 175, 0.35);
    border-radius: 999px;
    padding: 11px 15px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus,
.search-hero input:focus {
    border-color: rgba(59, 130, 246, 0.75);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
    background: rgba(15, 23, 42, 0.96);
}

.header-search button,
.mobile-search button,
.search-hero button,
.primary-btn,
.secondary-btn,
.filter-panel button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    color: #ffffff;
    font-weight: 750;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    cursor: pointer;
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.search-hero button:hover,
.primary-btn:hover,
.secondary-btn:hover,
.filter-panel button:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
    box-shadow: 0 20px 42px rgba(37, 99, 235, 0.34);
}

.secondary-btn {
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: none;
}

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

.mobile-nav {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 16px 0 22px;
    border-top: 1px solid rgba(59, 130, 246, 0.18);
}

.mobile-link {
    display: block;
    padding: 12px 14px;
    border-radius: 14px;
    color: #cbd5e1;
    font-weight: 700;
}

.mobile-link:hover,
.mobile-link.active {
    background: rgba(30, 58, 138, 0.45);
}

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

.hero {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    border-radius: 0 0 30px 30px;
    box-shadow: var(--shadow);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 36px;
    align-items: center;
    padding: 70px 56px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.55s ease;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.95) 0%, rgba(2, 6, 23, 0.78) 42%, rgba(2, 6, 23, 0.34) 100%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.72), transparent 48%);
    z-index: 1;
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05) contrast(1.05);
}

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

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #93c5fd;
    background: rgba(37, 99, 235, 0.18);
    border: 1px solid rgba(59, 130, 246, 0.34);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 800;
}

.hero h1 {
    max-width: 760px;
    margin: 22px 0 18px;
    font-size: clamp(36px, 6vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero h2 {
    margin: 0 0 18px;
    font-size: clamp(26px, 4vw, 52px);
    line-height: 1.1;
}

.hero p {
    max-width: 680px;
    color: #d1d5db;
    font-size: 18px;
    line-height: 1.8;
}

.hero-tags,
.detail-tags,
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 22px 0;
}

.hero-tags span,
.detail-tags span,
.card-tags span {
    color: #cbd5e1;
    background: rgba(51, 65, 85, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 13px;
}

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

.hero-poster-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(59, 130, 246, 0.28);
    border-radius: 28px;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.38);
}

.hero-poster-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.hero-poster-card div {
    padding: 18px;
}

.hero-poster-card strong {
    display: block;
    margin-bottom: 7px;
    font-size: 18px;
}

.hero-poster-card span {
    color: #94a3b8;
}

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

.hero-dots,
.hero-arrows {
    display: flex;
    align-items: center;
    gap: 10px;
    pointer-events: auto;
}

.hero-dot,
.hero-arrow {
    border: 0;
    cursor: pointer;
    color: #e2e8f0;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.18);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-dot {
    width: 34px;
    height: 6px;
    border-radius: 999px;
    padding: 0;
}

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

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 50%;
}

.hero-arrow:hover,
.hero-dot:hover {
    transform: translateY(-1px);
    background: rgba(37, 99, 235, 0.45);
}

.section {
    padding: 56px 0 0;
}

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

.section-title h2,
.page-title h1,
.detail-title h1 {
    margin: 10px 0 8px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.section-title p,
.page-title p,
.detail-title p,
.category-card p {
    color: var(--muted);
    line-height: 1.8;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 18px 45px rgba(2, 6, 23, 0.28);
    transition: transform 0.24s ease, border-color 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(59, 130, 246, 0.56);
    box-shadow: 0 22px 55px rgba(30, 58, 138, 0.28);
}

.movie-cover {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #0f172a;
}

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

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

.movie-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(0, 0, 0, 0.78) 100%);
}

.duration,
.cover-badge {
    position: absolute;
    z-index: 2;
    padding: 5px 8px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 800;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
}

.duration {
    top: 10px;
    right: 10px;
}

.cover-badge {
    left: 10px;
    bottom: 10px;
    background: rgba(37, 99, 235, 0.86);
}

.movie-body {
    padding: 16px;
}

.movie-body h2 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 17px;
    line-height: 1.35;
}

.movie-body h2 a:hover {
    color: #60a5fa;
}

.movie-body p {
    min-height: 44px;
    margin: 0 0 14px;
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.58;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    color: #94a3b8;
    font-size: 13px;
}

.movie-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(51, 65, 85, 0.48);
    padding: 4px 8px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    padding: 24px;
    border: 1px solid rgba(59, 130, 246, 0.22);
    border-radius: 22px;
    background:
        radial-gradient(circle at 80% 10%, rgba(34, 211, 238, 0.18), transparent 12rem),
        rgba(15, 23, 42, 0.72);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.58);
}

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

.category-card .mini-list {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 18px 0 0;
    color: #cbd5e1;
    font-size: 14px;
}

.rank-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.44fr);
    gap: 28px;
}

.rank-list,
.side-panel,
.filter-panel,
.detail-card,
.player-card,
.related-panel,
.search-hero {
    border: 1px solid var(--line-soft);
    border-radius: 22px;
    background: var(--panel);
    box-shadow: 0 22px 55px rgba(2, 6, 23, 0.24);
}

.rank-list {
    overflow: hidden;
}

.rank-item {
    display: grid;
    grid-template-columns: 56px 112px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    transition: background 0.2s ease;
}

.rank-item:hover {
    background: rgba(51, 65, 85, 0.34);
}

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

.rank-num {
    color: #67e8f9;
    font-size: 20px;
    font-weight: 900;
}

.rank-info strong,
.rank-info em {
    display: block;
}

.rank-info strong {
    color: #ffffff;
    margin-bottom: 6px;
}

.rank-info em {
    color: #94a3b8;
    font-style: normal;
    font-size: 13px;
}

.rank-score {
    color: #facc15;
    font-weight: 850;
}

.page-title {
    padding: 54px 0 20px;
}

.filter-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 16px;
    margin-bottom: 24px;
}

.filter-panel input,
.filter-panel select {
    width: auto;
    min-width: 190px;
    border-radius: 14px;
}

.filter-panel button {
    border-radius: 14px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.38fr);
    gap: 28px;
    padding: 34px 0 58px;
}

.player-card {
    overflow: hidden;
    margin-bottom: 22px;
    background: #000000;
}

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

.player-stage video,
.player-stage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-stage video {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(2, 6, 23, 0.82));
    cursor: pointer;
}

.player-overlay.is-hidden {
    display: none;
}

.play-button {
    display: inline-grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    color: #ffffff;
    font-size: 34px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.92), rgba(6, 182, 212, 0.92));
    box-shadow: 0 18px 48px rgba(37, 99, 235, 0.45);
}

.playback-message {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    z-index: 4;
    display: none;
    color: #fecaca;
    text-align: center;
    font-weight: 700;
}

.playback-message.is-visible {
    display: block;
}

.detail-card {
    padding: 24px;
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: #93c5fd;
    font-size: 14px;
}

.detail-title h1 {
    margin-top: 0;
}

.detail-lead {
    color: #d1d5db;
    font-size: 18px;
    line-height: 1.8;
}

.detail-summary,
.detail-review {
    color: #cbd5e1;
    line-height: 1.9;
    white-space: pre-line;
}

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

.detail-meta span {
    border-radius: 999px;
    padding: 7px 11px;
    color: #e2e8f0;
    background: rgba(51, 65, 85, 0.68);
}

.related-panel {
    position: sticky;
    top: 92px;
    padding: 18px;
}

.related-panel h2,
.side-panel h2 {
    margin: 0 0 16px;
    font-size: 22px;
}

.related-item {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    transition: background 0.2s ease;
}

.related-item:hover {
    background: rgba(51, 65, 85, 0.42);
}

.related-item img {
    width: 116px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
}

.related-item strong {
    display: block;
    margin-bottom: 5px;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.42;
}

.related-item span {
    color: #94a3b8;
    font-size: 12px;
}

.search-hero {
    padding: 26px;
    margin: 44px 0 28px;
}

.search-hero form {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

.search-hero input {
    width: min(640px, 100%);
    border-radius: 16px;
}

.no-results {
    display: none;
    padding: 22px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.72);
}

.no-results.is-visible {
    display: block;
}

.site-footer {
    margin-top: 62px;
    padding: 46px 0 26px;
    border-top: 1px solid rgba(30, 64, 175, 0.28);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 28px;
}

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 17px;
}

.footer-grid p,
.footer-links a,
.footer-bottom {
    color: #94a3b8;
    line-height: 1.75;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

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

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

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

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        padding: 52px 24px 82px;
    }

    .hero-poster {
        display: none;
    }

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

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

    .related-panel {
        position: static;
    }

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

@media (max-width: 640px) {
    .brand-text {
        font-size: 20px;
    }

    .hero {
        min-height: 560px;
    }

    .hero h1 {
        font-size: 40px;
    }

    .section-head,
    .footer-bottom,
    .search-hero form {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .rank-item {
        grid-template-columns: 42px 88px minmax(0, 1fr);
    }

    .rank-score {
        display: none;
    }

    .rank-item img {
        width: 88px;
        height: 54px;
    }

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

    .mobile-search {
        align-items: stretch;
        flex-direction: column;
    }

    .mobile-search input {
        width: 100%;
    }
}
