:root {
    color-scheme: light;
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f1f5f9;
    --primary: #0d9488;
    --primary-dark: #0f766e;
    --accent: #0891b2;
    --radius: 1.25rem;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
    --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.06);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

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

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

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.38rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--primary-dark);
}

.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 12px 24px rgba(13, 148, 136, 0.28);
    font-size: 0.9rem;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 22px;
    flex: 1;
    color: #374151;
    font-weight: 700;
    font-size: 0.96rem;
}

.main-nav a {
    transition: color 180ms ease;
    white-space: nowrap;
}

.main-nav a:hover,
.breadcrumb a:hover,
.footer-links a:hover {
    color: var(--primary);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.filter-bar input,
.filter-bar select {
    width: 230px;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 11px 15px;
    font: inherit;
    background: #ffffff;
    outline: none;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.header-search input:focus,
.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.13);
}

.header-search button,
.hero-button,
.section-link,
.player-button,
.empty-action {
    border: 0;
    border-radius: 999px;
    padding: 11px 18px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(13, 148, 136, 0.22);
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.header-search button:hover,
.hero-button:hover,
.section-link:hover,
.player-button:hover,
.empty-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(13, 148, 136, 0.28);
}

.mobile-toggle {
    display: none;
    border: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #eef2f7;
    color: #111827;
    font-size: 1.3rem;
}

.hero {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: #020617;
    color: #ffffff;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 900ms ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.04) contrast(1.02);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.52), rgba(0, 0, 0, 0.12)), linear-gradient(0deg, rgba(0, 0, 0, 0.78), transparent 48%);
}

.hero-content {
    position: absolute;
    left: max(24px, calc((100vw - 1180px) / 2));
    bottom: 88px;
    z-index: 2;
    width: min(650px, calc(100% - 48px));
}

.hero-kicker,
.section-kicker,
.detail-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 7px 12px;
    color: #ecfeff;
    background: rgba(20, 184, 166, 0.28);
    font-weight: 800;
    font-size: 0.9rem;
    backdrop-filter: blur(10px);
}

.hero h1 {
    margin: 20px 0 16px;
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    line-height: 0.95;
    font-weight: 950;
    letter-spacing: -0.08em;
}

.hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.08rem;
    line-height: 1.8;
}

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

.hero-ghost {
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    padding: 10px 18px;
    color: #ffffff;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(12px);
}

.hero-controls {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 90px;
    z-index: 3;
    display: flex;
    gap: 12px;
}

.hero-controls button {
    width: 46px;
    height: 46px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 1.25rem;
    cursor: pointer;
    backdrop-filter: blur(12px);
}

.hero-dots {
    position: absolute;
    left: max(24px, calc((100vw - 1180px) / 2));
    bottom: 44px;
    z-index: 4;
    display: flex;
    gap: 8px;
}

.hero-dots button {
    width: 36px;
    height: 4px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
    cursor: pointer;
}

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

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

.section {
    padding: 64px 0 0;
}

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

.section h2,
.page-title h1,
.detail-title h1 {
    margin: 12px 0 8px;
    font-weight: 950;
    letter-spacing: -0.05em;
    color: #0f172a;
}

.section h2 {
    font-size: clamp(1.7rem, 4vw, 2.7rem);
}

.page-title {
    padding: 56px 0 12px;
}

.page-title h1,
.detail-title h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    line-height: 1.08;
}

.section p,
.page-title p,
.detail-title p {
    max-width: 780px;
    margin: 0;
    color: var(--muted);
    line-height: 1.8;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: var(--radius);
    background: var(--panel);
    box-shadow: var(--shadow-soft);
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(20, 184, 166, 0.45);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #164e63);
}

.poster-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 450ms ease;
}

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

.rank-mark {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    display: grid;
    min-width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444);
    font-style: normal;
    font-weight: 950;
    box-shadow: 0 10px 22px rgba(239, 68, 68, 0.28);
}

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

.meta-line,
.breadcrumb,
.detail-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 0.9rem;
}

.meta-line span,
.detail-meta span,
.rank-meta span {
    border-radius: 999px;
    padding: 4px 9px;
    background: var(--soft);
}

.movie-card h3 {
    margin: 12px 0 8px;
    font-size: 1.08rem;
    line-height: 1.35;
    font-weight: 900;
}

.movie-card h3 a:hover {
    color: var(--primary);
}

.movie-card p {
    min-height: 4.9em;
    margin: 0;
    color: var(--muted);
    line-height: 1.62;
    font-size: 0.94rem;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 14px;
}

.tag-row span {
    border-radius: 999px;
    padding: 5px 9px;
    color: #0f766e;
    background: #ccfbf1;
    font-size: 0.82rem;
    font-weight: 800;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: var(--radius);
    padding: 24px;
    background: linear-gradient(135deg, #ffffff, #f0fdfa);
    box-shadow: var(--shadow-soft);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    font-size: 1.3rem;
    font-weight: 950;
}

.category-card p {
    margin: 0 0 18px;
    color: var(--muted);
    line-height: 1.75;
}

.category-card a {
    color: var(--primary-dark);
    font-weight: 900;
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 22px 0 28px;
    padding: 16px;
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.filter-bar input {
    flex: 1 1 260px;
    width: auto;
}

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

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

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

.rank-row {
    display: grid;
    grid-template-columns: 64px 76px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.rank-index {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, #14b8a6, #0891b2);
    font-weight: 950;
}

.rank-row img {
    width: 76px;
    height: 108px;
    border-radius: 12px;
    object-fit: cover;
    background: linear-gradient(135deg, #0f172a, #164e63);
}

.rank-row h2 {
    margin: 0 0 8px;
    font-size: 1.18rem;
    font-weight: 950;
}

.rank-row p {
    margin: 8px 0 0;
    color: var(--muted);
    line-height: 1.65;
}

.rank-action {
    border-radius: 999px;
    padding: 10px 16px;
    color: #ffffff;
    background: #0f766e;
    font-weight: 900;
}

.breadcrumb {
    padding-top: 28px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.75fr);
    gap: 28px;
    align-items: start;
    padding: 34px 0 0;
}

.player-shell {
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    box-shadow: var(--shadow);
}

.player-stage {
    position: relative;
    background: #000000;
}

.video-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.05));
    pointer-events: none;
}

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

.player-button {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
}

.detail-panel,
.detail-side,
.text-block {
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.detail-panel {
    padding: 26px;
    margin-top: 24px;
}

.text-block {
    padding: 22px;
    margin-top: 18px;
}

.text-block h2,
.detail-side h2 {
    margin: 0 0 12px;
    font-size: 1.35rem;
    font-weight: 950;
}

.text-block p,
.detail-panel p {
    color: #374151;
    line-height: 1.9;
}

.detail-side {
    padding: 18px;
}

.detail-side img {
    width: 100%;
    border-radius: 18px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: linear-gradient(135deg, #0f172a, #164e63);
}

.side-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.side-link {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    background: #f8fafc;
}

.side-link img {
    width: 58px;
    height: 78px;
    border-radius: 10px;
    object-fit: cover;
}

.side-link strong {
    display: block;
    font-size: 0.95rem;
}

.side-link span {
    color: var(--muted);
    font-size: 0.85rem;
}

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

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

.footer-logo {
    color: #67e8f9;
}

.footer-inner p {
    max-width: 580px;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    align-content: start;
    justify-content: end;
}

.footer-links a {
    color: #e2e8f0;
    font-weight: 700;
}

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

    .header-search input {
        width: 180px;
    }
}

@media (max-width: 860px) {
    .header-inner {
        height: auto;
        min-height: 68px;
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .main-nav {
        display: none;
        width: 100%;
        order: 5;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        padding: 14px 0 4px;
        border-top: 1px solid var(--line);
    }

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

    .mobile-toggle {
        display: grid;
        place-items: center;
        margin-left: auto;
    }

    .header-search {
        width: 100%;
        order: 6;
    }

    .header-search input {
        flex: 1;
        width: auto;
    }

    .hero {
        min-height: 76vh;
    }

    .hero-content {
        bottom: 86px;
    }

    .hero-controls {
        right: 20px;
        bottom: 30px;
    }

    .hero-dots {
        bottom: 30px;
    }

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

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

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

    .rank-row {
        grid-template-columns: 48px 66px 1fr;
    }

    .rank-action {
        grid-column: 3;
        justify-self: start;
    }

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

    .footer-links {
        justify-content: start;
    }
}

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

    .hero h1 {
        letter-spacing: -0.05em;
    }

    .hero p {
        font-size: 0.98rem;
    }

    .rank-row {
        grid-template-columns: 42px 1fr;
    }

    .rank-row img {
        display: none;
    }

    .rank-action {
        grid-column: 2;
    }
}
