:root {
    --primary: 14 165 233;
    --primary-dark: 3 105 161;
    --secondary: 6 182 212;
    --accent: 34 211 238;
    --text: 15 23 42;
    --muted: 100 116 139;
    --line: 226 232 240;
    --bg: 248 250 252;
    --card: 255 255 255;
    --shadow: 15 23 42;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: rgb(var(--text));
    background:
        radial-gradient(circle at top left, rgba(var(--accent), 0.16), transparent 32rem),
        linear-gradient(180deg, #ffffff 0%, rgb(var(--bg)) 58%, #ffffff 100%);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgb(var(--line));
    box-shadow: 0 10px 28px rgba(var(--shadow), 0.06);
    backdrop-filter: blur(16px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #ffffff;
    font-weight: 900;
    font-size: 22px;
    background: linear-gradient(135deg, rgb(var(--primary)), rgb(var(--secondary)));
    box-shadow: 0 16px 35px rgba(var(--primary), 0.32);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.12;
}

.brand-text strong,
.gradient-text {
    background: linear-gradient(135deg, rgb(var(--primary-dark)), rgb(var(--secondary)));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text strong {
    font-size: 22px;
    letter-spacing: -0.03em;
}

.brand-text em {
    margin-top: 4px;
    color: rgb(var(--muted));
    font-style: normal;
    font-size: 12px;
}

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

.nav-link {
    padding: 10px 16px;
    border-radius: 12px;
    color: #334155;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover {
    color: rgb(var(--primary-dark));
    background: rgba(var(--primary), 0.08);
    transform: translateY(-1px);
}

.nav-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgb(var(--primary)), rgb(var(--secondary)));
    box-shadow: 0 12px 24px rgba(var(--primary), 0.28);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: rgba(var(--primary), 0.1);
    color: rgb(var(--primary-dark));
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 4px;
    background: currentColor;
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    background: #07111f;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(7, 17, 31, 0.94) 0%, rgba(7, 17, 31, 0.78) 40%, rgba(7, 17, 31, 0.35) 100%),
        radial-gradient(circle at 75% 20%, rgba(var(--accent), 0.35), transparent 26rem);
}

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

.hero-slide {
    display: none;
    grid-template-columns: minmax(0, 1.02fr) minmax(280px, 0.72fr);
    align-items: center;
    gap: 44px;
    min-height: 620px;
    padding: 60px 0;
}

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

.hero-content {
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: #bae6fd;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    font-size: 14px;
    font-weight: 700;
}

.hero h1,
.hero h2 {
    margin: 22px 0 16px;
    max-width: 760px;
    color: #ffffff;
    font-size: clamp(42px, 7vw, 82px);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.hero p {
    max-width: 680px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(16px, 2.1vw, 20px);
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0 30px;
}

.hero-tags span,
.tag-row span,
.detail-tags span {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.hero-tags span {
    color: #cffafe;
    background: rgba(var(--accent), 0.16);
    border: 1px solid rgba(var(--accent), 0.28);
}

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

.btn-primary,
.btn-secondary,
.btn-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, rgb(var(--primary)), rgb(var(--secondary)));
    box-shadow: 0 18px 36px rgba(var(--primary), 0.32);
}

.btn-secondary {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.btn-soft {
    color: rgb(var(--primary-dark));
    background: rgba(var(--primary), 0.1);
    border-color: rgba(var(--primary), 0.16);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-soft:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    isolation: isolate;
}

.hero-poster::before {
    content: "";
    position: absolute;
    inset: 8% -8% -8% 8%;
    z-index: -1;
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(var(--primary), 0.38), rgba(var(--secondary), 0.2));
    filter: blur(2px);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 34px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.42);
}

.hero-card-note {
    position: absolute;
    right: -18px;
    bottom: 28px;
    width: min(250px, 78%);
    padding: 18px;
    border-radius: 22px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
    backdrop-filter: blur(18px);
}

.hero-card-note strong {
    display: block;
    margin-bottom: 6px;
    font-size: 16px;
}

.hero-card-note span {
    display: block;
    color: rgba(255, 255, 255, 0.74);
    font-size: 13px;
}

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

.hero-dot {
    width: 38px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    transition: width 0.2s ease, background 0.2s ease;
}

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

.section {
    padding: 72px 0;
}

.section.tight {
    padding-top: 46px;
}

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

.section-kicker {
    color: rgb(var(--primary-dark));
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section h1,
.section h2,
.page-title h1,
.detail-main h1 {
    margin: 0;
    color: #0f172a;
    letter-spacing: -0.045em;
    line-height: 1.08;
}

.section h1,
.page-title h1 {
    font-size: clamp(34px, 5vw, 56px);
}

.section h2,
.detail-main h1 {
    font-size: clamp(28px, 4vw, 42px);
}

.section-head p,
.page-title p {
    max-width: 680px;
    margin: 10px 0 0;
    color: rgb(var(--muted));
}

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

.category-tile,
.panel-card {
    border: 1px solid rgb(var(--line));
    border-radius: 24px;
    background: rgba(var(--card), 0.82);
    box-shadow: 0 18px 38px rgba(var(--shadow), 0.07);
    backdrop-filter: blur(14px);
}

.category-tile {
    min-height: 166px;
    padding: 22px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--primary), 0.35);
    box-shadow: 0 24px 54px rgba(var(--primary), 0.14);
}

.category-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    border-radius: 16px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, rgb(var(--primary)), rgb(var(--secondary)));
}

.category-tile h2,
.category-tile h3 {
    margin: 0 0 8px;
    font-size: 20px;
    letter-spacing: -0.025em;
}

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

.filter-block {
    margin: 0 0 28px;
    padding: 18px;
    border: 1px solid rgb(var(--line));
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 16px 34px rgba(var(--shadow), 0.06);
}

.search-line {
    display: flex;
    gap: 12px;
}

.search-input {
    width: 100%;
    min-height: 50px;
    padding: 0 16px;
    border: 1px solid rgb(var(--line));
    border-radius: 16px;
    color: #0f172a;
    background: #ffffff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
    border-color: rgba(var(--primary), 0.55);
    box-shadow: 0 0 0 4px rgba(var(--primary), 0.12);
}

.search-clear,
.filter-button {
    border: 0;
    border-radius: 14px;
    color: #334155;
    background: #f1f5f9;
    font-weight: 800;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.search-clear {
    min-width: 86px;
    padding: 0 16px;
}

.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.filter-button {
    padding: 9px 14px;
}

.filter-button:hover,
.search-clear:hover {
    color: rgb(var(--primary-dark));
    background: rgba(var(--primary), 0.1);
}

.filter-button.active {
    color: #ffffff;
    background: linear-gradient(135deg, rgb(var(--primary)), rgb(var(--secondary)));
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgb(var(--line));
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 16px 36px rgba(var(--shadow), 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(var(--shadow), 0.13);
}

.movie-card.is-hidden {
    display: none;
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #e0f2fe, #f8fafc);
}

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.play-dot {
    position: absolute;
    right: 13px;
    bottom: 13px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(14, 165, 233, 0.92);
    box-shadow: 0 12px 26px rgba(14, 165, 233, 0.35);
}

.rank-badge {
    position: absolute;
    left: 13px;
    top: 13px;
    min-width: 38px;
    height: 34px;
    display: grid;
    place-items: center;
    padding: 0 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.82);
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.movie-info {
    padding: 16px;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    color: rgb(var(--muted));
    font-size: 12px;
    font-weight: 800;
}

.movie-info h2,
.movie-info h3 {
    margin: 0;
    font-size: 18px;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.movie-info h2 a,
.movie-info h3 a {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-info p {
    display: -webkit-box;
    min-height: 66px;
    margin: 10px 0 14px;
    overflow: hidden;
    color: rgb(var(--muted));
    font-size: 14px;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.tag-row,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-row span,
.detail-tags span {
    color: rgb(var(--primary-dark));
    background: rgba(var(--primary), 0.1);
}

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

.rank-row {
    display: grid;
    grid-template-columns: auto 84px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgb(var(--line));
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(var(--shadow), 0.07);
}

.rank-index {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, rgb(var(--primary)), rgb(var(--secondary)));
    font-weight: 900;
}

.rank-row img {
    width: 84px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 14px;
}

.rank-row h2,
.rank-row h3 {
    margin: 0 0 6px;
    font-size: 17px;
}

.rank-row p {
    margin: 0;
    color: rgb(var(--muted));
    font-size: 13px;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: rgb(var(--muted));
    font-size: 14px;
}

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

.detail-hero {
    padding: 44px 0 70px;
    background:
        radial-gradient(circle at 20% 0%, rgba(var(--accent), 0.22), transparent 30rem),
        linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    background: #020617;
    box-shadow: 0 28px 70px rgba(2, 6, 23, 0.25);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.68));
    pointer-events: none;
}

.play-button {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, rgb(var(--primary)), rgb(var(--secondary)));
    box-shadow: 0 18px 42px rgba(var(--primary), 0.38);
    font-size: 32px;
    pointer-events: auto;
    transition: transform 0.2s ease;
}

.play-button:hover {
    transform: scale(1.06);
}

.player-shell.is-playing .player-cover {
    opacity: 0;
    visibility: hidden;
}

.detail-main {
    padding: 26px 0 0;
}

.detail-main p {
    color: rgb(var(--muted));
}

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

.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    color: #334155;
    background: #f1f5f9;
    font-weight: 800;
    font-size: 13px;
}

.detail-poster-card {
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid rgb(var(--line));
    background: #ffffff;
    box-shadow: 0 20px 50px rgba(var(--shadow), 0.1);
}

.detail-poster-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

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

.detail-poster-card h2 {
    margin: 0 0 8px;
    font-size: 20px;
}

.detail-content {
    display: grid;
    gap: 22px;
    margin-top: 28px;
}

.panel-card {
    padding: 24px;
}

.panel-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
    letter-spacing: -0.035em;
}

.panel-card p {
    margin: 0;
    color: #475569;
}

.site-footer {
    margin-top: 60px;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
    padding: 54px 0;
}

.footer-logo {
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
}

.site-footer p {
    max-width: 520px;
    margin: 0;
    color: #94a3b8;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 18px;
}

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

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
    background: rgba(var(--primary), 0.3);
}

.footer-bottom {
    padding: 18px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.09);
    color: #94a3b8;
    text-align: center;
    font-size: 14px;
}

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

    .menu-toggle {
        display: inline-block;
    }

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

    .mobile-nav .nav-link {
        display: block;
        width: 100%;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        min-height: auto;
        padding: 54px 0 84px;
    }

    .hero-poster {
        max-width: 420px;
        margin: 0 auto;
    }

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

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

    .detail-poster-card {
        max-width: 360px;
    }

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

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

    .header-inner {
        height: 66px;
    }

    .brand-mark {
        width: 40px;
        height: 40px;
        border-radius: 14px;
    }

    .brand-text strong {
        font-size: 18px;
    }

    .brand-text em {
        display: none;
    }

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

    .hero-card-note {
        right: 12px;
        bottom: 12px;
    }

    .section {
        padding: 50px 0;
    }

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

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

    .search-line {
        flex-direction: column;
    }

    .rank-row {
        grid-template-columns: auto 72px minmax(0, 1fr);
    }
}
