:root {
    --cyan: #06b6d4;
    --blue: #3b82f6;
    --teal: #14b8a6;
    --ink: #111827;
    --muted: #6b7280;
    --soft: #f8fafc;
    --line: #e5e7eb;
    --card: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
    --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    color: var(--ink);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 38%, #f8fafc 100%);
    line-height: 1.6;
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    user-select: none;
}

.container-custom {
    width: min(1280px, 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 rgba(229, 231, 235, 0.78);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(14px);
}

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

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, var(--cyan), var(--blue), var(--teal));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 8px 22px rgba(6, 182, 212, 0.28);
    font-size: 15px;
}

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

.nav-link {
    position: relative;
    padding: 10px 14px;
    color: #374151;
    font-weight: 650;
    border-radius: 999px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #0891b2;
    background: #ecfeff;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f3f4f6;
    color: #374151;
    font-size: 24px;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
}

.mobile-nav.open {
    display: block;
}

.mobile-panel {
    display: grid;
    gap: 8px;
    padding: 14px 0 18px;
}

.mobile-link {
    padding: 12px 14px;
    border-radius: 12px;
    color: #374151;
    font-weight: 650;
}

.mobile-link:hover {
    background: #f3f4f6;
    color: #0891b2;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 650px;
    padding: 80px 0 72px;
    background: radial-gradient(circle at top left, rgba(6, 182, 212, 0.22), transparent 34%),
                radial-gradient(circle at bottom right, rgba(20, 184, 166, 0.20), transparent 32%),
                linear-gradient(135deg, #ecfeff 0%, #eff6ff 48%, #f0fdfa 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.6;
    background-image: linear-gradient(to right, rgba(15, 23, 42, 0.035) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
    background-size: 24px 24px;
}

.hero-stage {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 36px;
    align-items: center;
}

.hero-copy {
    max-width: 760px;
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid rgba(6, 182, 212, 0.22);
    border-radius: 999px;
    color: #0e7490;
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 8px 30px rgba(6, 182, 212, 0.10);
    font-weight: 700;
}

.hero h1 {
    margin: 22px 0 18px;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.04;
    letter-spacing: -0.055em;
    text-shadow: 0 12px 35px rgba(15, 23, 42, 0.15);
}

.gradient-text {
    background: linear-gradient(90deg, var(--cyan), var(--blue), var(--teal));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-lead {
    max-width: 680px;
    margin: 0 0 28px;
    color: #4b5563;
    font-size: clamp(18px, 2.3vw, 23px);
}

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

.btn-primary,
.btn-secondary,
.btn-light {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 20px;
    border-radius: 14px;
    font-weight: 750;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    box-shadow: 0 12px 26px rgba(59, 130, 246, 0.26);
}

.btn-secondary {
    color: #075985;
    background: #ffffff;
    border: 2px solid #bae6fd;
}

.btn-light {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

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

.hero-search {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 560px;
    margin-top: 30px;
    padding: 10px;
    border: 1px solid rgba(6, 182, 212, 0.20);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 16px 45px rgba(15, 23, 42, 0.08);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
    font-size: 16px;
}

.hero-search a {
    flex: none;
}

.hero-media {
    position: relative;
    min-height: 520px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-rows: 1fr auto;
    overflow: hidden;
    border-radius: 34px;
    background: #0f172a;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
    opacity: 0;
    transform: translateX(22px) scale(0.985);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.active {
    opacity: 1;
    transform: translateX(0) scale(1);
    pointer-events: auto;
}

.hero-slide img {
    min-height: 365px;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.04) 35%, rgba(15, 23, 42, 0.92) 100%);
}

.hero-slide-content {
    position: relative;
    z-index: 2;
    padding: 0 28px 30px;
    color: #ffffff;
    align-self: end;
}

.hero-slide-content h2 {
    margin: 10px 0 10px;
    font-size: clamp(25px, 3.2vw, 40px);
    line-height: 1.15;
}

.hero-slide-content p {
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.82);
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.chip-row span,
.detail-tags span,
.meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 650;
}

.hero-tags span {
    color: #ecfeff;
    background: rgba(255, 255, 255, 0.16);
}

.hero-dots {
    position: absolute;
    left: 28px;
    bottom: 22px;
    z-index: 3;
    display: flex;
    gap: 8px;
}

.hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    cursor: pointer;
}

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

.section {
    padding: 70px 0;
}

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

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

.section-head h1,
.section-head h2,
.page-hero h1,
.detail-title h1 {
    margin: 0 0 10px;
    color: #111827;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.12;
    letter-spacing: -0.035em;
}

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

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

.stat-card,
.category-card,
.info-card {
    padding: 22px;
    border: 1px solid rgba(229, 231, 235, 0.92);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
}

.stat-card strong {
    display: block;
    margin-bottom: 4px;
    font-size: 30px;
    color: #0891b2;
}

.stat-card span {
    color: #4b5563;
    font-weight: 650;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 24px;
    background: var(--card);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

.card-hover {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    border-color: #a5f3fc;
    box-shadow: var(--shadow);
}

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

.poster-link img {
    transition: transform 0.4s ease;
}

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

.poster-year {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.74);
    font-size: 12px;
    font-weight: 750;
}

.movie-card-body {
    padding: 18px;
}

.movie-meta {
    margin-bottom: 8px;
    color: #0891b2;
    font-size: 13px;
    font-weight: 800;
}

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

.movie-card h2 a:hover,
.ranking-item:hover strong,
.text-link:hover {
    color: #0891b2;
}

.movie-card p {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 14px;
    overflow: hidden;
    color: #6b7280;
    font-size: 14px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

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

.chip-row span,
.detail-tags span {
    color: #0e7490;
    background: #ecfeff;
}

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

.category-card {
    display: grid;
    gap: 14px;
}

.category-card h2 {
    margin: 0;
    font-size: 20px;
}

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

.category-card .mini-posters {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.category-card .mini-posters img {
    aspect-ratio: 3 / 4;
    border-radius: 14px;
    background: #e0f2fe;
}

.catalog-toolbar {
    display: grid;
    gap: 16px;
    margin: 0 0 28px;
    padding: 18px;
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 0 16px;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    color: #9ca3af;
    transition: border-color 0.2s ease;
}

.search-box:focus-within {
    border-color: var(--cyan);
}

.search-box input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 16px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    min-height: 38px;
    padding: 8px 14px;
    border: 0;
    border-radius: 12px;
    color: #374151;
    background: #f3f4f6;
    font-weight: 700;
    cursor: pointer;
}

.filter-chip:hover,
.filter-chip.active {
    color: #ffffff;
    background: var(--cyan);
}

.page-hero {
    padding: 62px 0 34px;
    background: radial-gradient(circle at top right, rgba(6, 182, 212, 0.16), transparent 30%),
                linear-gradient(135deg, #f8fafc, #ecfeff);
    border-bottom: 1px solid rgba(229, 231, 235, 0.76);
}

.breadcrumb {
    margin-bottom: 16px;
    color: #6b7280;
    font-size: 14px;
}

.breadcrumb a {
    color: #0891b2;
    font-weight: 700;
}

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

.ranking-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border: 1px solid rgba(229, 231, 235, 0.86);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.045);
}

.rank-num {
    display: grid;
    flex: none;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    font-weight: 900;
}

.rank-main {
    display: grid;
    min-width: 0;
    flex: 1;
}

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

.rank-main em {
    color: #6b7280;
    font-size: 13px;
    font-style: normal;
}

.rank-heat {
    color: #0891b2;
    font-weight: 900;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 28px;
    align-items: start;
}

.panel {
    border: 1px solid rgba(229, 231, 235, 0.92);
    border-radius: 26px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.panel-pad {
    padding: 24px;
}

.detail-hero {
    padding: 34px 0 70px;
    background: linear-gradient(135deg, #f8fafc, #ecfeff);
}

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

.detail-poster {
    overflow: hidden;
    border-radius: 28px;
    aspect-ratio: 3 / 4;
    background: #e0f2fe;
    box-shadow: var(--shadow);
}

.detail-title h1 {
    margin-top: 0;
    font-size: clamp(34px, 4.8vw, 58px);
}

.detail-title .summary {
    margin: 0 0 20px;
    color: #4b5563;
    font-size: 18px;
}

.meta-pill {
    color: #075985;
    background: #e0f2fe;
}

.player-section {
    margin-top: -40px;
    padding-bottom: 70px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    aspect-ratio: 16 / 9;
    background: #020617;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 10px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.64));
    cursor: pointer;
    z-index: 4;
}

.play-overlay.is-hidden {
    display: none;
}

.play-overlay span {
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    padding-left: 5px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: 0 18px 40px rgba(59, 130, 246, 0.35);
    font-size: 34px;
}

.play-overlay strong {
    font-size: 18px;
    letter-spacing: 0.08em;
}

.article-content {
    display: grid;
    gap: 24px;
}

.article-content h2,
.sidebar h2,
.panel h2 {
    margin: 0 0 12px;
    font-size: 24px;
    letter-spacing: -0.02em;
}

.article-content p {
    margin: 0;
    color: #374151;
    font-size: 17px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.no-result {
    padding: 30px;
    color: #6b7280;
    text-align: center;
    border: 1px dashed #cbd5e1;
    border-radius: 20px;
    background: #ffffff;
}

.back-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    display: none;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--blue));
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    z-index: 45;
}

.back-top.show {
    display: block;
}

.site-footer {
    margin-top: 40px;
    padding-top: 54px;
    color: #4b5563;
    background: linear-gradient(180deg, #f8fafc, #f3f4f6);
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 28px;
    padding-bottom: 40px;
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: #111827;
    font-size: 17px;
}

.footer-grid p {
    margin: 12px 0 0;
}

.footer-grid a {
    display: block;
    margin: 8px 0;
    color: #4b5563;
}

.footer-grid a:hover {
    color: #0891b2;
}

.footer-bottom {
    padding: 18px 0;
    color: #6b7280;
    text-align: center;
    border-top: 1px solid var(--line);
}

@media (max-width: 1120px) {
    .hero-stage,
    .split-layout,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .hero-media {
        min-height: 470px;
    }

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

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

    .footer-grid,
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

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

    .site-logo,
    .footer-logo {
        font-size: 21px;
    }

    .hero {
        min-height: auto;
        padding: 52px 0 52px;
    }

    .hero-media {
        min-height: 430px;
    }

    .hero-search {
        display: grid;
    }

    .section-head {
        display: grid;
    }

    .movie-grid,
    .category-grid,
    .related-grid,
    .stats-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 320px;
    }

    .player-section {
        margin-top: 0;
    }

    .ranking-item {
        align-items: flex-start;
    }

    .rank-heat {
        display: none;
    }
}
