:root {
    --color-primary: #0891b2;
    --color-primary-dark: #0e7490;
    --color-secondary: #0f766e;
    --color-accent: #10b981;
    --color-text: #111827;
    --color-muted: #6b7280;
    --color-soft: #f8fafc;
    --color-line: #e5e7eb;
    --shadow-soft: 0 16px 40px rgba(15, 23, 42, 0.08);
    --shadow-hover: 0 24px 60px rgba(15, 23, 42, 0.16);
    --radius-xl: 1.25rem;
    --radius-lg: 0.9rem;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--color-text);
    background: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(229, 231, 235, 0.85);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
    backdrop-filter: blur(16px);
}

.nav-wrap {
    width: min(var(--container), calc(100% - 32px));
    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;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--color-primary-dark);
    white-space: nowrap;
}

.brand-icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    box-shadow: 0 10px 24px rgba(8, 145, 178, 0.32);
}

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

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

.desktop-nav a:hover,
.mobile-nav a:hover,
.desktop-nav a.is-active,
.mobile-nav a.is-active {
    color: #ffffff;
    background: var(--color-primary);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    color: var(--color-primary-dark);
    background: #ecfeff;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 16px;
}

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

main {
    min-height: 70vh;
}

.hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.95), transparent 34%), linear-gradient(135deg, #0891b2 0%, #0f766e 52%, #059669 100%);
}

.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    filter: blur(4px);
}

.hero::before {
    width: 320px;
    height: 320px;
    top: -120px;
    right: 12%;
}

.hero::after {
    width: 220px;
    height: 220px;
    bottom: -80px;
    left: 8%;
}

.hero-inner {
    position: relative;
    z-index: 1;
    width: min(var(--container), calc(100% - 32px));
    min-height: 620px;
    margin: 0 auto;
    padding: 74px 0;
    display: grid;
    grid-template-columns: 1.03fr 0.97fr;
    gap: 48px;
    align-items: center;
}

.eyebrow {
    margin: 0 0 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #cffafe;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(2.4rem, 5vw, 4.4rem);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-lead,
.page-hero p,
.detail-title p {
    margin: 22px 0 0;
    max-width: 760px;
    color: #ecfeff;
    font-size: 1.15rem;
}

.hero-actions {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 22px;
    border: 0;
    border-radius: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: var(--color-primary-dark);
    background: #ffffff;
    box-shadow: 0 18px 34px rgba(8, 145, 178, 0.24);
}

.btn-primary:hover {
    background: #ecfeff;
}

.btn-outline {
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.08);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.16);
}

.hero-search {
    margin-top: 28px;
    max-width: 640px;
    display: flex;
    gap: 10px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(16px);
}

.hero-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    color: #ffffff;
    background: transparent;
    padding: 0 14px;
}

.hero-search input::placeholder {
    color: rgba(255, 255, 255, 0.78);
}

.hero-search button {
    border: 0;
    border-radius: 12px;
    color: var(--color-primary-dark);
    background: #ffffff;
    padding: 12px 20px;
    font-weight: 800;
    cursor: pointer;
}

.hero-stage {
    position: relative;
    min-height: 510px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transform: translateX(18px) scale(0.98);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

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

.hero-slide-card {
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 28px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.26);
    backdrop-filter: blur(18px);
}

.hero-slide-image {
    position: relative;
    height: 310px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.2);
}

.hero-slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.hero-slide-card:hover img {
    transform: scale(1.05);
}

.hero-slide-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 28%, rgba(15, 23, 42, 0.78));
}

.hero-slide-content {
    padding: 26px;
}

.hero-slide-content h2 {
    margin: 0 0 10px;
    font-size: 1.65rem;
    line-height: 1.25;
}

.hero-slide-content p {
    margin: 0;
    color: #e0f2fe;
}

.hero-tags {
    margin: 16px 0 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--color-primary-dark);
    background: #ecfeff;
    font-size: 0.82rem;
    font-weight: 800;
}

.hero-dots {
    position: absolute;
    right: 24px;
    bottom: 24px;
    display: flex;
    gap: 8px;
    z-index: 3;
}

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

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

.stats-grid {
    margin-top: 26px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.stat-card {
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
}

.stat-card strong {
    display: block;
    font-size: 1.45rem;
    line-height: 1.2;
}

.stat-card span {
    color: #cffafe;
    font-size: 0.9rem;
}

.page-hero,
.detail-hero {
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 52%, var(--color-accent) 100%);
}

.page-hero-inner,
.detail-hero-inner,
.section-inner {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
}

.page-hero-inner,
.detail-hero-inner {
    padding: 58px 0;
}

.section {
    padding: 72px 0;
}

.section-light {
    background: var(--color-soft);
}

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

.section-heading h2 {
    margin: 0;
    color: #111827;
    font-size: clamp(1.65rem, 3vw, 2.2rem);
    line-height: 1.2;
}

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

.more-link {
    color: var(--color-primary-dark);
    font-weight: 800;
    white-space: nowrap;
}

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

.category-card {
    display: block;
    padding: 24px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(8, 145, 178, 0.35);
    box-shadow: var(--shadow-hover);
}

.category-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    font-weight: 900;
}

.category-card h2,
.category-card h3 {
    margin: 0 0 8px;
    font-size: 1.15rem;
}

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

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

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

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

.movie-card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.92);
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card-link:hover {
    transform: translateY(-6px);
    border-color: rgba(8, 145, 178, 0.4);
    box-shadow: var(--shadow-hover);
}

.poster-wrap {
    position: relative;
    height: 230px;
    overflow: hidden;
    background: linear-gradient(135deg, #e0f2fe, #ccfbf1);
}

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

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

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(15, 23, 42, 0.45));
    opacity: 0;
    transition: opacity 0.22s ease;
}

.movie-card-link:hover .poster-wrap::after {
    opacity: 1;
}

.year-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(8, 145, 178, 0.92);
    font-size: 0.82rem;
    font-weight: 900;
}

.rank-badge {
    left: 12px;
    right: auto;
    background: rgba(15, 23, 42, 0.82);
}

.play-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--color-primary-dark);
    background: rgba(255, 255, 255, 0.94);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.9);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.movie-card-link:hover .play-badge {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

.movie-meta-line {
    margin-bottom: 8px;
    color: var(--color-primary-dark);
    font-size: 0.88rem;
    font-weight: 800;
}

.movie-card h3 {
    margin: 0 0 8px;
    min-height: 3.05em;
    color: #111827;
    font-size: 1.08rem;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-card p {
    margin: 0 0 14px;
    min-height: 3.1em;
    color: var(--color-muted);
    font-size: 0.94rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.watch-link {
    color: var(--color-primary-dark);
    font-weight: 900;
}

.filter-panel {
    margin: 0 0 30px;
    padding: 18px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 0.75fr);
    gap: 12px;
}

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

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.12);
}

.filter-status {
    margin: -14px 0 24px;
    color: var(--color-muted);
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 80px 96px 1fr auto;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ranking-row:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-soft);
}

.ranking-number {
    color: var(--color-primary-dark);
    font-size: 1.7rem;
    font-weight: 900;
    text-align: center;
}

.ranking-cover {
    width: 96px;
    height: 128px;
    overflow: hidden;
    border-radius: 16px;
    background: #ecfeff;
}

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

.ranking-row h2,
.ranking-row h3 {
    margin: 0 0 8px;
    font-size: 1.2rem;
}

.ranking-row p {
    margin: 0;
    color: var(--color-muted);
}

.ranking-action {
    color: #ffffff;
    background: var(--color-primary);
    padding: 10px 16px;
    border-radius: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.breadcrumb {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #dffcff;
    font-size: 0.95rem;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.detail-title {
    max-width: 920px;
}

.detail-tags {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.player-section {
    background: #0f172a;
    padding: 52px 0;
}

.player-shell {
    position: relative;
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 30px 80px rgba(2, 6, 23, 0.45);
    aspect-ratio: 16 / 9;
}

.site-player,
.player-cover,
.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.site-player {
    z-index: 1;
    background: #020617;
}

.player-cover {
    z-index: 2;
    border: 0;
    padding: 0;
    cursor: pointer;
    color: #ffffff;
    background: #020617;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-cover img {
    object-fit: cover;
    opacity: 0.58;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(8, 145, 178, 0.2), rgba(2, 6, 23, 0.72));
}

.player-start {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 3;
    width: 96px;
    height: 96px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    color: var(--color-primary-dark);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.26);
    transform: translate(-50%, -50%);
    cursor: pointer;
    font-size: 2rem;
}

.detail-layout {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 60px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 30px;
}

.detail-content,
.detail-side-card {
    border: 1px solid var(--color-line);
    border-radius: var(--radius-xl);
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.detail-content {
    padding: 30px;
}

.detail-content h2,
.detail-side-card h2 {
    margin: 0 0 14px;
    font-size: 1.45rem;
}

.detail-content p {
    margin: 0 0 22px;
    color: #374151;
    font-size: 1.03rem;
}

.detail-side-card {
    padding: 24px;
    align-self: start;
    position: sticky;
    top: 92px;
}

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

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px dashed var(--color-line);
    padding-bottom: 10px;
}

.info-list span {
    color: var(--color-muted);
}

.info-list strong {
    text-align: right;
}

.related-section {
    padding-top: 0;
}

.site-footer {
    color: #d1d5db;
    background: #111827;
}

.footer-inner {
    width: min(var(--container), calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0;
    display: grid;
    grid-template-columns: 1.3fr 0.7fr 0.7fr 1fr;
    gap: 32px;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 900;
}

.site-footer p {
    margin: 14px 0 0;
    color: #9ca3af;
}

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

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

.footer-links a {
    color: #cbd5e1;
}

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

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

.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 55;
    width: 46px;
    height: 46px;
    display: none;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: var(--color-primary);
    box-shadow: 0 16px 34px rgba(8, 145, 178, 0.35);
    cursor: pointer;
}

.back-to-top.is-visible {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.empty-state {
    display: none;
    padding: 50px 20px;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-xl);
    color: var(--color-muted);
    text-align: center;
    background: #ffffff;
}

.empty-state.is-visible {
    display: block;
}

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

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

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

    .hero-stage {
        min-height: 560px;
    }

    .detail-side-card {
        position: static;
    }
}

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

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

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

    .hero-search,
    .filter-panel {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

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

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

    .ranking-row {
        grid-template-columns: 58px 82px 1fr;
    }

    .ranking-action {
        grid-column: 2 / 4;
        text-align: center;
    }

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

@media (max-width: 560px) {
    .brand {
        font-size: 1.05rem;
    }

    .hero h1,
    .page-hero h1,
    .detail-title h1 {
        font-size: 2.15rem;
    }

    .hero-stage {
        min-height: 520px;
    }

    .hero-slide-image {
        height: 255px;
    }

    .hero-actions,
    .hero-search {
        width: 100%;
    }

    .btn,
    .hero-search button {
        width: 100%;
    }

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

    .poster-wrap {
        height: 250px;
    }

    .section {
        padding: 52px 0;
    }

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

    .player-start {
        width: 74px;
        height: 74px;
    }

    .detail-content {
        padding: 22px;
    }
}
