* {
    box-sizing: border-box;
}

:root {
    --bg: #020617;
    --bg-soft: #0f172a;
    --panel: rgba(15, 23, 42, 0.88);
    --panel-light: rgba(30, 41, 59, 0.78);
    --line: rgba(148, 163, 184, 0.18);
    --text: #ffffff;
    --muted: #cbd5e1;
    --subtle: #94a3b8;
    --blue: #3b82f6;
    --cyan: #22d3ee;
    --yellow: #facc15;
    --red: #f87171;
    --green: #4ade80;
    --radius: 18px;
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 10% 0%, rgba(37, 99, 235, 0.28), transparent 32rem),
        radial-gradient(circle at 90% 8%, rgba(34, 211, 238, 0.18), transparent 30rem),
        linear-gradient(180deg, #020617 0%, #0f172a 52%, #020617 100%);
}

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

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96), rgba(30, 58, 138, 0.92), rgba(15, 23, 42, 0.96));
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
}

.logo-mark {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.35);
}

.logo-text {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #60a5fa, #67e8f9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 26px;
    color: var(--muted);
    font-size: 15px;
}

.main-nav a {
    transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
    color: #93c5fd;
    transform: translateY(-1px);
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    padding: 10px;
    border: 0;
    border-radius: 12px;
    color: var(--text);
    background: rgba(15, 23, 42, 0.7);
}

.menu-button span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 5px 0;
    background: #e2e8f0;
    border-radius: 999px;
}

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

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

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

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(0deg, #020617 0%, rgba(2, 6, 23, 0.78) 34%, rgba(2, 6, 23, 0.16) 100%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.86) 0%, rgba(2, 6, 23, 0.45) 48%, rgba(2, 6, 23, 0.12) 100%);
}

.hero-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 0 0 78px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #67e8f9;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 850px;
    margin: 0 0 18px;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.98;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero p {
    max-width: 690px;
    margin: 0 0 26px;
    color: var(--muted);
    font-size: 19px;
    line-height: 1.7;
}

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

.hero-meta {
    margin-bottom: 30px;
}

.hero-meta span,
.detail-meta span,
.card-meta span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(30, 41, 59, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.18);
    color: #e2e8f0;
}

.hero-meta span {
    padding: 8px 14px;
    font-weight: 700;
}

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

.btn,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn {
    background: linear-gradient(135deg, var(--blue), #06b6d4);
    color: #fff;
    box-shadow: 0 16px 38px rgba(37, 99, 235, 0.32);
}

.btn:hover,
.btn-ghost:hover {
    transform: translateY(-2px);
}

.btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(15, 23, 42, 0.54);
    color: #e2e8f0;
}

.hero-control {
    position: absolute;
    z-index: 5;
    top: 50%;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.48);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.72);
    transform: translateY(-2px);
}

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

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

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

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

.hero-dots button.is-active {
    width: 34px;
    background: #fff;
}

main {
    min-height: 70vh;
}

.section {
    padding: 70px 0;
}

.section.compact {
    padding: 42px 0;
}

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

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

.section-head p,
.page-title p,
.detail-title p {
    max-width: 720px;
    margin: 12px 0 0;
    color: var(--subtle);
    line-height: 1.8;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(96, 165, 250, 0.45);
    box-shadow: 0 26px 60px rgba(37, 99, 235, 0.18);
}

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

.movie-card-small .poster-link {
    aspect-ratio: 16 / 10;
}

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

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

.rating-badge {
    position: absolute;
    right: 10px;
    top: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #111827;
    background: var(--yellow);
    font-size: 13px;
    font-weight: 900;
}

.card-body {
    padding: 16px;
}

.card-meta {
    gap: 6px;
    margin-bottom: 10px;
}

.card-meta span {
    padding: 4px 8px;
    color: #bfdbfe;
    font-size: 12px;
}

.movie-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card p {
    min-height: 48px;
    margin: 0;
    color: var(--subtle);
    font-size: 14px;
    line-height: 1.65;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.tag-list span {
    padding: 4px 8px;
    border-radius: 999px;
    color: #a5f3fc;
    background: rgba(8, 145, 178, 0.14);
    border: 1px solid rgba(34, 211, 238, 0.18);
    font-size: 12px;
}

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

.category-card {
    min-height: 160px;
    padding: 22px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.78));
    border: 1px solid var(--line);
    transition: transform 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: rgba(34, 211, 238, 0.42);
}

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

.category-card p {
    margin: 0;
    color: var(--subtle);
    line-height: 1.7;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 16px;
    align-items: center;
    margin: 28px 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.72);
}

.search-input {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    padding: 0 18px;
    outline: 0;
    color: #fff;
    background: rgba(2, 6, 23, 0.74);
}

.search-input:focus {
    border-color: rgba(96, 165, 250, 0.75);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.filter-buttons button {
    min-height: 40px;
    padding: 0 14px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    color: #e2e8f0;
    background: rgba(30, 41, 59, 0.74);
    cursor: pointer;
}

.filter-buttons button.is-active,
.filter-buttons button:hover {
    border-color: rgba(34, 211, 238, 0.52);
    background: rgba(14, 116, 144, 0.35);
}

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

.rank-item {
    display: grid;
    grid-template-columns: 64px 132px minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 23, 42, 0.78);
    transition: transform 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    background: rgba(30, 41, 59, 0.88);
}

.rank-num {
    color: rgba(148, 163, 184, 0.5);
    font-size: 34px;
    font-weight: 900;
    text-align: center;
}

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

.rank-copy h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.rank-copy p {
    margin: 0;
    color: var(--subtle);
    line-height: 1.6;
}

.rank-score {
    color: var(--yellow);
    font-size: 18px;
    font-weight: 900;
    white-space: nowrap;
}

.page-hero {
    padding: 74px 0 34px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 20px;
    color: var(--subtle);
    font-size: 14px;
}

.breadcrumb a {
    color: #93c5fd;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.9fr) minmax(280px, 0.8fr);
    gap: 30px;
    align-items: start;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #000;
    box-shadow: var(--shadow);
}

.player-shell video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.28), rgba(2, 6, 23, 0.78));
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.play-overlay span {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 20px 50px rgba(37, 99, 235, 0.45);
    font-size: 34px;
    padding-left: 5px;
}

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

.detail-card {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--panel);
}

.detail-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 18px;
}

.detail-meta {
    gap: 8px;
}

.detail-meta span {
    padding: 6px 10px;
    color: #dbeafe;
    font-size: 13px;
}

.detail-title {
    margin: 26px 0 24px;
}

.detail-title p {
    font-size: 18px;
}

.content-panel {
    margin-top: 26px;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(15, 23, 42, 0.74);
}

.content-panel h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.content-panel p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.9;
}

.site-footer {
    margin-top: 70px;
    border-top: 1px solid var(--line);
    background: rgba(2, 6, 23, 0.72);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 0;
    color: var(--subtle);
}

.footer-brand {
    color: #e2e8f0;
    font-weight: 800;
}

.footer-links {
    display: flex;
    gap: 18px;
}

[hidden] {
    display: none !important;
}

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

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

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

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

    .menu-button {
        display: block;
    }

    .main-nav {
        position: absolute;
        left: 12px;
        right: 12px;
        top: 68px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.96);
    }

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

    .main-nav a {
        padding: 12px;
        border-radius: 12px;
    }

    .main-nav a:hover {
        background: rgba(30, 41, 59, 0.82);
        transform: none;
    }

    .hero {
        min-height: 620px;
    }

    .hero-content {
        padding-bottom: 86px;
    }

    .hero-control {
        top: auto;
        bottom: 26px;
        width: 42px;
        height: 42px;
    }

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

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

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

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

    .filter-buttons {
        justify-content: flex-start;
    }

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

    .card-body {
        padding: 13px;
    }

    .movie-card h3 {
        font-size: 16px;
    }

    .movie-card p {
        min-height: auto;
        font-size: 13px;
    }

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

    .rank-item img {
        width: 92px;
        height: 64px;
    }

    .rank-score {
        grid-column: 3;
        justify-self: start;
    }
}

@media (max-width: 520px) {
    .movie-grid,
    .movie-grid.six,
    .category-grid {
        grid-template-columns: 1fr;
    }

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

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

    .rank-item {
        grid-template-columns: 36px 1fr;
    }

    .rank-item img {
        display: none;
    }

    .rank-score {
        grid-column: 2;
    }
}
