:root {
    --bg: #f6f8fb;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --dark: #0f172a;
    --dark-soft: #111827;
    --blue: #2563eb;
    --cyan: #06b6d4;
    --gold: #f59e0b;
    --card: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(15, 23, 42, 0.94);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.4);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.site-nav a {
    color: #d1d5db;
    padding: 10px 13px;
    border-radius: 999px;
    font-size: 14px;
    transition: color 0.2s ease, background 0.2s ease;
}

.site-nav a:hover,
.site-nav a.is-active {
    color: #ffffff;
    background: rgba(37, 99, 235, 0.28);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

main {
    min-height: 70vh;
}

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

.hero-carousel {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: var(--dark);
}

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

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

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

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.74) 45%, rgba(15, 23, 42, 0.25) 100%),
        linear-gradient(0deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0) 42%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) 360px;
    align-items: center;
    gap: 48px;
    padding: 78px 0 92px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    color: #bfdbfe;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
    font-size: 14px;
    margin-bottom: 18px;
}

.hero-copy h1,
.hero-copy h2 {
    max-width: 780px;
    margin: 0 0 18px;
    color: #ffffff;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-copy h2 {
    font-size: clamp(32px, 4.5vw, 58px);
}

.hero-copy p {
    max-width: 720px;
    margin: 0 0 24px;
    color: #dbeafe;
    font-size: 17px;
    line-height: 1.85;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 0 0 26px;
}

.hero-tags span,
.tag-row span,
.badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #1e3a8a;
    background: #dbeafe;
    font-size: 13px;
    font-weight: 700;
}

.hero-actions,
.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 11px 18px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    font-weight: 800;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.4);
}

.btn.secondary {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.btn.light {
    color: #1d4ed8;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

.hero-poster {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 26px 70px rgba(2, 6, 23, 0.55);
    transform: rotate(1.5deg);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.5), transparent 48%);
}

.hero-card-meta {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 20px;
    z-index: 2;
    padding: 16px;
    border-radius: 18px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(18px);
}

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

.hero-card-meta span {
    color: #bfdbfe;
    font-size: 13px;
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 11px;
    height: 11px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.section {
    padding: 64px 0;
}

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

.section.dark {
    color: #ffffff;
    background: linear-gradient(135deg, #0f172a, #1e3a8a 60%, #0891b2);
}

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

.section-title {
    margin: 0;
    color: #111827;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.16;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section.dark .section-title,
.section.dark .section-lead {
    color: #ffffff;
}

.section-lead {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.75;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(37, 99, 235, 0.35);
    box-shadow: var(--shadow);
}

.card-cover {
    position: relative;
    display: block;
    overflow: hidden;
    background: #0f172a;
}

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

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

.card-ribbon,
.rank-number {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    min-width: 34px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--gold), #ef4444);
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.28);
}

.card-body {
    padding: 15px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.32;
    font-weight: 850;
}

.card-body h3 a:hover {
    color: var(--blue);
}

.card-body p {
    min-height: 44px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #4b5563;
    font-size: 12px;
}

.card-meta span {
    padding: 4px 7px;
    border-radius: 999px;
    background: #f3f4f6;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 12px;
    margin: 0 0 28px;
    padding: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 44px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    background: #ffffff;
    color: #111827;
    padding: 0 12px;
    outline: none;
}

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

.page-hero {
    padding: 62px 0;
    color: #ffffff;
    background:
        radial-gradient(circle at 14% 18%, rgba(59, 130, 246, 0.34), transparent 32%),
        linear-gradient(135deg, #0f172a 0%, #1e3a8a 58%, #0891b2 100%);
}

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 54px);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 820px;
    margin: 0;
    color: #dbeafe;
    font-size: 17px;
    line-height: 1.8;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 230px;
    padding: 28px;
    border-radius: 24px;
    color: #ffffff;
    background: linear-gradient(135deg, #1d4ed8, #0891b2);
    box-shadow: var(--shadow);
}

.category-card:nth-child(2n) {
    background: linear-gradient(135deg, #7c3aed, #2563eb);
}

.category-card:nth-child(3n) {
    background: linear-gradient(135deg, #059669, #0ea5e9);
}

.category-card h2 {
    margin: 0 0 10px;
    font-size: 28px;
    font-weight: 900;
}

.category-card p {
    max-width: 620px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.75;
}

.category-samples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.category-samples a {
    max-width: 210px;
    padding: 7px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.ranking-item {
    display: grid;
    grid-template-columns: 78px 110px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.07);
}

.ranking-index {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--gold), #ef4444);
    font-size: 20px;
    font-weight: 900;
}

.ranking-cover img {
    width: 90px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 14px;
}

.ranking-info h2,
.ranking-info h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 900;
}

.ranking-info p {
    margin: 0 0 10px;
    color: var(--muted);
    line-height: 1.65;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 24px 0;
    color: #6b7280;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--blue);
}

.watch-section {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.55fr);
    gap: 28px;
    align-items: stretch;
    margin-bottom: 46px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #020617;
    box-shadow: 0 28px 70px rgba(2, 6, 23, 0.32);
    aspect-ratio: 16 / 9;
}

.player-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    background: #020617;
    cursor: pointer;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.player-cover.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.68;
}

.player-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.18));
}

.play-circle {
    position: relative;
    z-index: 2;
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    font-size: 34px;
    box-shadow: 0 22px 48px rgba(37, 99, 235, 0.46);
}

.watch-copy {
    padding: 28px;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.watch-copy h1 {
    margin: 0 0 14px;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.16;
    font-weight: 900;
    letter-spacing: -0.03em;
}

.watch-copy p {
    color: var(--muted);
    line-height: 1.8;
}

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

.content-panel,
.side-panel {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.content-panel {
    padding: 30px;
}

.content-panel h2,
.side-panel h2 {
    margin: 0 0 16px;
    font-size: 24px;
    font-weight: 900;
}

.content-panel p {
    margin: 0 0 18px;
    color: #374151;
    line-height: 1.95;
}

.info-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 22px 0 0;
}

.info-list div {
    padding: 12px;
    border-radius: 14px;
    background: #f8fafc;
    color: #374151;
}

.info-list strong {
    display: block;
    color: #111827;
    margin-bottom: 4px;
}

.side-panel {
    padding: 20px;
}

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

.related-item {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.related-item img {
    width: 68px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
}

.related-item strong {
    display: block;
    margin-bottom: 5px;
    line-height: 1.35;
}

.related-item span {
    color: var(--muted);
    font-size: 12px;
}

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

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

.footer-title {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 12px;
}

.footer-inner p {
    margin: 0;
    color: #9ca3af;
    line-height: 1.75;
}

.footer-links {
    display: grid;
    gap: 8px;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 0;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
}

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

@media (max-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .hero-inner,
    .watch-section,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .hero-poster {
        display: none;
    }

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

    .ranking-item .btn {
        grid-column: 3;
        width: fit-content;
    }
}

@media (max-width: 760px) {
    .header-inner {
        min-height: 62px;
    }

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

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 70px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border-radius: 18px;
        background: rgba(15, 23, 42, 0.98);
        box-shadow: var(--shadow);
    }

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

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

    .hero-carousel,
    .hero-inner {
        min-height: 580px;
    }

    .hero-inner {
        padding: 56px 0 88px;
    }

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

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

    .category-grid,
    .footer-inner,
    .info-list {
        grid-template-columns: 1fr;
    }

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

    .ranking-index {
        width: 48px;
        height: 48px;
        border-radius: 14px;
    }

    .ranking-cover img {
        width: 76px;
    }

    .watch-copy,
    .content-panel {
        padding: 22px;
    }
}

@media (max-width: 460px) {
    .card-grid {
        grid-template-columns: 1fr;
    }

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

    .btn {
        width: 100%;
    }
}
