
:root {
    --sky: #0284c7;
    --sky-dark: #0369a1;
    --sky-soft: #e0f2fe;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --card: #ffffff;
    --page: #f8fafc;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background: linear-gradient(180deg, rgba(240, 249, 255, 0.85), #ffffff 360px);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(226, 232, 240, 0.86);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    box-shadow: 0 14px 28px rgba(14, 165, 233, 0.32);
}

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

.brand-text strong {
    font-size: 18px;
    letter-spacing: 0.02em;
}

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

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

.desktop-nav a,
.mobile-nav a {
    padding: 10px 16px;
    border-radius: 12px;
    color: #475569;
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--sky-dark);
    background: var(--sky-soft);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    color: var(--sky-dark);
    background: var(--sky-soft);
    font-size: 22px;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

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

main {
    padding-bottom: 72px;
}

.home-hero {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    height: 600px;
    margin: 32px auto 44px;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
}

.home-hero > h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: none;
    min-height: 100%;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.88), rgba(2, 6, 23, 0.58), rgba(2, 6, 23, 0.10));
}

.hero-content {
    position: absolute;
    top: 50%;
    left: clamp(24px, 7vw, 86px);
    width: min(640px, calc(100% - 48px));
    transform: translateY(-50%);
    color: #ffffff;
}

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

.hero-badges span,
.hero-tags span {
    border-radius: 999px;
    padding: 7px 14px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 14px;
    backdrop-filter: blur(8px);
}

.hero-badges span:first-child {
    background: #0ea5e9;
}

.hero-content h2 {
    margin: 18px 0 14px;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 620px;
    margin: 0 0 20px;
    color: #e2e8f0;
    font-size: 18px;
    line-height: 1.75;
}

.hero-meta {
    margin-bottom: 22px;
    color: #cbd5e1;
    font-weight: 650;
}

.hero-actions {
    margin-top: 28px;
}

.primary-button,
.ghost-button,
.text-link,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 13px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.primary-button {
    padding: 12px 24px;
    color: #ffffff;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.28);
}

.primary-button:hover,
.ghost-button:hover,
.text-link:hover,
.section-link:hover {
    transform: translateY(-2px);
}

.ghost-button {
    padding: 11px 18px;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.46);
    font-size: 38px;
    line-height: 1;
    transform: translateY(-50%);
    backdrop-filter: blur(10px);
}

.hero-prev {
    left: 18px;
}

.hero-next {
    right: 18px;
}

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

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

.hero-dots button.is-active {
    width: 32px;
    background: #ffffff;
}

.quick-search {
    margin-bottom: 32px;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 170px 170px;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.07);
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 14px;
    color: #334155;
    background: #ffffff;
    outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.16);
}

.content-section {
    margin-top: 52px;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(25px, 3vw, 34px);
    font-weight: 900;
    letter-spacing: -0.03em;
}

.section-heading p {
    margin: 6px 0 0;
    color: var(--muted);
}

.section-link,
.text-link {
    color: var(--sky-dark);
    font-weight: 800;
}

.horizontal-cards {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 220px;
    gap: 18px;
    overflow-x: auto;
    padding: 4px 4px 20px;
    scroll-snap-type: x proximity;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
    transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card:hover {
    border-color: rgba(14, 165, 233, 0.35);
    transform: translateY(-6px);
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.14);
}

.card-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #e2e8f0;
}

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

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

.card-type {
    position: absolute;
    right: 10px;
    top: 10px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.66);
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

.card-body {
    padding: 16px;
}

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

.card-body h3 a:hover,
.rank-content h3 a:hover {
    color: var(--sky-dark);
}

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

.card-meta {
    margin-bottom: 12px;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
}

.card-tags span,
.detail-tags span {
    border-radius: 999px;
    padding: 5px 9px;
    color: var(--sky-dark);
    background: #f0f9ff;
    font-size: 12px;
    font-weight: 750;
}

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

.category-tile,
.category-card {
    display: block;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.category-tile {
    min-height: 160px;
    padding: 24px;
    background: linear-gradient(135deg, #ffffff, #f0f9ff);
}

.category-tile:hover,
.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 42px rgba(15, 23, 42, 0.12);
}

.category-tile span,
.category-card h2 {
    display: block;
    margin: 0 0 10px;
    color: var(--ink);
    font-size: 22px;
    font-weight: 900;
}

.category-tile p,
.category-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.category-cover {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 8px;
    background: #e0f2fe;
}

.category-cover img {
    height: 130px;
    object-fit: cover;
    border-radius: 14px;
}

.category-card-body {
    padding: 22px;
}

.page-hero,
.ranking-hero {
    margin-top: 32px;
    padding: clamp(26px, 5vw, 48px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 28px;
    background: linear-gradient(135deg, #ffffff, #eff6ff);
    box-shadow: var(--shadow);
}

.page-hero h1,
.ranking-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(34px, 4vw, 52px);
    font-weight: 950;
    letter-spacing: -0.04em;
}

.page-hero p,
.ranking-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.75;
}

.category-hero .filter-bar {
    margin-top: 24px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
}

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

.detail-layout {
    margin-top: 32px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: var(--shadow);
    aspect-ratio: 16 / 9;
}

.video-player {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.78));
    text-align: center;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 86px;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    box-shadow: 0 20px 42px rgba(37, 99, 235, 0.36);
    font-size: 34px;
    text-indent: 5px;
}

.player-cover strong {
    max-width: min(760px, calc(100% - 32px));
    font-size: clamp(22px, 3vw, 36px);
}

.player-status {
    position: absolute;
    left: 18px;
    bottom: 18px;
    z-index: 4;
    color: #ffffff;
    font-size: 14px;
}

.player-status:empty {
    display: none;
}

.detail-card {
    margin-top: 26px;
    padding: clamp(24px, 5vw, 42px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 28px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.detail-meta span {
    border-radius: 999px;
    padding: 8px 13px;
    color: #0369a1;
    background: #e0f2fe;
    font-weight: 800;
    font-size: 14px;
}

.detail-card h1 {
    margin: 20px 0 12px;
    font-size: clamp(34px, 4vw, 52px);
    font-weight: 950;
    letter-spacing: -0.04em;
}

.detail-one-line {
    margin: 0 0 20px;
    color: #475569;
    font-size: 18px;
    line-height: 1.8;
}

.detail-tags {
    margin-bottom: 26px;
}

.detail-card section {
    padding-top: 24px;
    margin-top: 24px;
    border-top: 1px solid var(--line);
}

.detail-card h2 {
    margin: 0 0 12px;
    font-size: 22px;
    font-weight: 900;
}

.detail-card section p {
    margin: 0;
    color: #334155;
    font-size: 16px;
    line-height: 1.9;
    white-space: pre-line;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 46px 116px 1fr;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    font-weight: 900;
}

.rank-thumb {
    display: block;
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 2 / 3;
    background: #e2e8f0;
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rank-content h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 900;
}

.rank-content p {
    display: -webkit-box;
    margin: 0 0 10px;
    overflow: hidden;
    color: var(--muted);
    line-height: 1.65;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.rank-meta {
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}

.ranking-hero {
    display: grid;
    grid-template-columns: 1fr 260px;
    align-items: center;
    gap: 32px;
}

.eyebrow {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 7px 12px;
    border-radius: 999px;
    color: var(--sky-dark);
    background: #e0f2fe;
    font-weight: 900;
}

.ranking-main .primary-button {
    margin-top: 24px;
}

.ranking-poster {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.ranking-poster img {
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.ranking-poster strong {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 44px 18px 18px;
    color: #ffffff;
    background: linear-gradient(180deg, transparent, rgba(2, 6, 23, 0.84));
    font-size: 20px;
}

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

.site-footer {
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.footer-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 34px 0;
}

.footer-brand {
    color: var(--ink);
    font-size: 20px;
}

.site-footer p {
    margin: 8px 0 0;
    color: var(--muted);
}

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

.footer-links a {
    padding: 8px 13px;
    border-radius: 999px;
    color: #475569;
    background: #f8fafc;
    font-weight: 750;
}

.footer-links a:hover {
    color: var(--sky-dark);
    background: var(--sky-soft);
}

.footer-bottom {
    padding: 18px 0;
    border-top: 1px solid var(--line);
    color: #64748b;
    text-align: center;
    font-size: 14px;
}

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

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

    .home-hero {
        height: 560px;
    }
}

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

    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .home-hero {
        height: 540px;
        margin-top: 18px;
        border-radius: 22px;
    }

    .hero-content {
        left: 20px;
        width: calc(100% - 40px);
    }

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

    .hero-arrow {
        display: none;
    }

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

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

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

    .card-body {
        padding: 13px;
    }

    .card-body h3 {
        font-size: 15px;
    }

    .category-cover img {
        height: 96px;
    }

    .rank-item {
        grid-template-columns: 38px 88px 1fr;
        gap: 12px;
        padding: 12px;
    }

    .rank-number {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }

    .rank-content h3 {
        font-size: 16px;
    }

    .ranking-hero {
        grid-template-columns: 1fr;
    }

    .ranking-poster {
        max-width: 240px;
    }

    .footer-grid {
        align-items: flex-start;
        flex-direction: column;
    }
}

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

    .horizontal-cards {
        grid-auto-columns: 78%;
    }

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

    .hero-actions a {
        width: 100%;
    }
}
