:root {
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --panel: #ffffff;
    --blue: #2563eb;
    --cyan: #06b6d4;
    --teal: #14b8a6;
    --soft: #eff6ff;
    --dark: #020617;
    --radius: 1.25rem;
    --shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    color: var(--ink);
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 48%, #ecfeff 100%);
    -webkit-font-smoothing: antialiased;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.nav-wrap {
    max-width: 1280px;
    height: 4.5rem;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.brand-mark {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 0.9rem;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.34);
}

.brand-text {
    font-size: 1.35rem;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    position: relative;
    font-size: 0.94rem;
    font-weight: 700;
    color: #334155;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.55rem;
    height: 0.16rem;
    border-radius: 999px;
    background: var(--blue);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--blue);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.menu-toggle {
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 0.9rem;
    background: #f1f5f9;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}

.menu-toggle span {
    width: 1.2rem;
    height: 0.13rem;
    background: #334155;
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    border-top: 1px solid var(--line);
    padding: 0.75rem 1.25rem 1rem;
}

.mobile-panel.open {
    display: grid;
    gap: 0.5rem;
}

.mobile-link {
    padding: 0.8rem 1rem;
    border-radius: 0.9rem;
    font-weight: 700;
    color: #334155;
}

.mobile-link.active,
.mobile-link:hover {
    color: var(--blue);
    background: #eff6ff;
}

.hero {
    position: relative;
    background: linear-gradient(135deg, #1d4ed8 0%, #0891b2 52%, #14b8a6 100%);
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.22;
    background-image: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.45) 0 0.45rem, transparent 0.5rem), radial-gradient(circle at 76% 50%, rgba(255, 255, 255, 0.28) 0 0.32rem, transparent 0.37rem);
    background-size: 4.4rem 4.4rem;
}

.hero-slider {
    position: relative;
    min-height: 620px;
    max-width: 1440px;
    margin: 0 auto;
}

.hero-slide {
    position: absolute;
    inset: 0;
    padding: 5rem 1.25rem 6.5rem;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.52fr);
    align-items: center;
    gap: 3rem;
    background-size: cover;
    background-position: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
}

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

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

.hero-copy {
    max-width: 760px;
    margin-left: max(0px, calc((100vw - 1280px) / 2));
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.42rem 0.8rem;
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    backdrop-filter: blur(10px);
    font-size: 0.85rem;
    font-weight: 800;
}

.hero h1 {
    margin: 1.35rem 0 0;
    color: #ffffff;
    font-size: clamp(2.6rem, 7vw, 5.8rem);
    line-height: 1.02;
    letter-spacing: -0.07em;
}

.hero h2 {
    margin: 1rem 0 0;
    color: #ffffff;
    font-size: clamp(1.65rem, 3vw, 2.5rem);
    line-height: 1.12;
}

.hero p {
    max-width: 700px;
    margin: 1.3rem 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1.05rem, 1.8vw, 1.35rem);
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.2rem;
    padding: 0 1.45rem;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn.primary {
    color: var(--blue);
    background: #ffffff;
    box-shadow: 0 18px 36px rgba(255, 255, 255, 0.22);
}

.btn.ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.48);
    backdrop-filter: blur(10px);
}

.btn.subtle {
    color: #ffffff;
    background: rgba(15, 23, 42, 0.24);
}

.hero-poster {
    width: min(88%, 360px);
    justify-self: center;
    aspect-ratio: 2 / 3;
    border-radius: 2rem;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.45), rgba(6, 182, 212, 0.32));
    box-shadow: 0 40px 90px rgba(2, 6, 23, 0.36);
    transform: rotate(2deg);
}

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

.hero-poster:hover img {
    transform: scale(1.08);
}

.hero-poster span {
    position: absolute;
    right: 1.1rem;
    bottom: 1.1rem;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.9);
    box-shadow: 0 18px 42px rgba(37, 99, 235, 0.45);
}

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

.hero-dot {
    width: 0.72rem;
    height: 0.72rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
}

.hero-dot.is-active {
    width: 2.4rem;
    background: #ffffff;
}

.hero-strip {
    position: relative;
    z-index: 5;
    max-width: 1280px;
    margin: -4.2rem auto 0;
    padding: 0 1.25rem 2rem;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
}

.hero-mini {
    min-height: 7rem;
    display: grid;
    grid-template-columns: 4.6rem minmax(0, 1fr);
    gap: 0.85rem;
    align-items: center;
    padding: 0.8rem;
    border-radius: 1.25rem;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.38);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(16px);
}

.hero-mini img {
    width: 4.6rem;
    height: 5.6rem;
    border-radius: 0.85rem;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.12);
}

.hero-mini span {
    font-weight: 800;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.content-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 4rem 1.25rem;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.7rem;
}

.section-head h2,
.detail-text h2 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.35rem);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.section-head p {
    margin: 0.55rem 0 0;
    color: var(--muted);
}

.section-more {
    white-space: nowrap;
    color: var(--blue);
    font-weight: 900;
}

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

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

.movie-card {
    min-width: 0;
}

.card-link {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card-link:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #cffafe);
}

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

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

.play-dot,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 900;
}

.play-dot {
    right: 0.8rem;
    bottom: 0.8rem;
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(37, 99, 235, 0.92);
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.32);
}

.rank-badge {
    left: 0.7rem;
    top: 0.7rem;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.55rem;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.card-body {
    display: grid;
    gap: 0.55rem;
    padding: 1rem;
}

.card-body strong {
    font-size: 1.05rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.meta-line,
.card-desc {
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row,
.detail-meta,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-row em,
.detail-meta span,
.tag-cloud span {
    font-style: normal;
    border-radius: 999px;
    color: #1e40af;
    background: #dbeafe;
    padding: 0.35rem 0.65rem;
    font-size: 0.78rem;
    font-weight: 800;
}

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

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

.category-tile,
.category-card {
    display: grid;
    gap: 0.45rem;
    padding: 1.25rem;
    border-radius: 1.25rem;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card {
    min-height: 9.5rem;
    padding: 1.5rem;
}

.category-tile:hover,
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 26px 58px rgba(37, 99, 235, 0.25);
}

.category-tile strong,
.category-card span {
    font-size: 1.25rem;
    font-weight: 900;
}

.category-tile span,
.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.7;
}

.page-hero,
.detail-hero {
    max-width: 1280px;
    margin: 1.5rem auto 0;
    padding: 3.2rem 1.25rem;
}

.small-hero {
    border-radius: 0 0 2rem 2rem;
    color: #ffffff;
    background: linear-gradient(135deg, #1d4ed8 0%, #0891b2 58%, #14b8a6 100%);
}

.small-hero h1 {
    margin: 1rem 0 0.8rem;
    font-size: clamp(2.2rem, 6vw, 4.6rem);
    line-height: 1.05;
    letter-spacing: -0.06em;
}

.small-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.08rem;
    line-height: 1.85;
}

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 13rem;
    gap: 0.9rem;
    margin-bottom: 1.5rem;
}

.large-filter {
    grid-template-columns: minmax(0, 1fr) 13rem 13rem;
}

.filter-input,
.filter-year,
.filter-category {
    width: 100%;
    min-height: 3.25rem;
    padding: 0 1rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    color: var(--ink);
    background: #ffffff;
    outline: none;
    font: inherit;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.filter-input:focus,
.filter-year:focus,
.filter-category:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
}

.rank-panel {
    background: rgba(255, 255, 255, 0.62);
    border-radius: 2rem;
}

.rank-list {
    display: grid;
    gap: 0.75rem;
}

.rank-list.two-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rank-row {
    display: grid;
    grid-template-columns: 2.4rem 4rem minmax(0, 1fr) 1.2rem;
    align-items: center;
    gap: 0.9rem;
    padding: 0.75rem;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.rank-num {
    font-size: 1.1rem;
    color: var(--blue);
    font-weight: 900;
    text-align: center;
}

.rank-row img {
    width: 4rem;
    height: 5.2rem;
    border-radius: 0.75rem;
    object-fit: cover;
    background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.rank-info {
    min-width: 0;
    display: grid;
    gap: 0.25rem;
}

.rank-info strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-info em {
    color: var(--muted);
    font-style: normal;
    font-size: 0.88rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-arrow {
    color: var(--muted);
    font-size: 1.6rem;
}

.detail-hero {
    padding-bottom: 1.2rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--muted);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--blue);
    font-weight: 800;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
    gap: 1.5rem;
    align-items: stretch;
}

.player-card,
.detail-info,
.detail-text {
    border-radius: 1.8rem;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
}

.player-card {
    padding: 0.75rem;
}

.video-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 1.45rem;
    overflow: hidden;
    background: #020617;
}

.video-shell video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #020617;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    border: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.28), rgba(2, 6, 23, 0.54));
}

.play-overlay span {
    width: clamp(4rem, 8vw, 6rem);
    height: clamp(4rem, 8vw, 6rem);
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 24px 60px rgba(37, 99, 235, 0.42);
}

.video-shell.is-playing .play-overlay {
    display: none;
}

.detail-info {
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-info .eyebrow {
    align-self: flex-start;
    color: #1e40af;
    background: #dbeafe;
    border: 0;
}

.detail-info h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.lead-text {
    margin: 0;
    color: #334155;
    font-size: 1.05rem;
    line-height: 1.8;
}

.detail-text {
    display: grid;
    gap: 0.8rem;
    padding: 2rem;
}

.detail-text p {
    margin: 0 0 1.2rem;
    color: #334155;
    line-height: 1.95;
    font-size: 1.05rem;
}

.compact-card .card-body strong {
    font-size: 0.98rem;
}

.site-footer {
    margin-top: 2.5rem;
    color: #e2e8f0;
    background: linear-gradient(135deg, #020617, #0f172a 55%, #111827);
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 1.25rem;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 2rem;
}

.footer-brand {
    font-size: 1.2rem;
    color: #ffffff;
}

.footer-about p,
.footer-group p,
.footer-group a {
    color: #94a3b8;
    line-height: 1.8;
    font-size: 0.94rem;
}

.footer-about p {
    max-width: 420px;
}

.footer-group {
    display: grid;
    align-content: start;
    gap: 0.45rem;
}

.footer-group h3 {
    margin: 0 0 0.65rem;
    color: #ffffff;
}

.footer-group a:hover {
    color: #67e8f9;
}

.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.25rem;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    color: #94a3b8;
    font-size: 0.9rem;
}

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

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

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

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

    .hero-mini:nth-child(n + 4) {
        display: none;
    }
}

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

    .menu-toggle {
        display: flex;
    }

    .hero-slider {
        min-height: 720px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding-top: 4.2rem;
        padding-bottom: 7.5rem;
    }

    .hero-copy {
        margin-left: 0;
    }

    .hero-poster {
        width: min(72%, 290px);
        justify-self: start;
        transform: rotate(0deg);
    }

    .hero-strip {
        grid-template-columns: 1fr;
        margin-top: -5rem;
    }

    .hero-mini:nth-child(n + 2) {
        display: none;
    }

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

    .detail-layout,
    .footer-inner,
    .rank-list.two-column {
        grid-template-columns: 1fr;
    }

    .large-filter,
    .filter-bar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .nav-wrap {
        height: 4rem;
    }

    .brand-text {
        font-size: 1.12rem;
    }

    .hero-slider {
        min-height: 660px;
    }

    .hero-slide {
        padding: 3.2rem 1rem 7rem;
    }

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

    .btn {
        width: 100%;
    }

    .content-section,
    .page-hero,
    .detail-hero {
        padding-left: 1rem;
        padding-right: 1rem;
    }

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

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

    .card-body {
        padding: 0.8rem;
    }

    .meta-line,
    .card-desc,
    .tag-row em {
        font-size: 0.78rem;
    }

    .rank-row {
        grid-template-columns: 2rem 3.5rem minmax(0, 1fr) 1rem;
    }

    .rank-row img {
        width: 3.5rem;
        height: 4.6rem;
    }
}
