:root {
    --page-bg: #f8fafc;
    --surface: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --soft: #e2e8f0;
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --teal: #0f766e;
    --cyan: #06b6d4;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(18px);
}

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

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

.logo-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--cyan));
    border-radius: 14px;
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.28);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-text strong {
    font-size: 20px;
    letter-spacing: -0.02em;
}

.logo-text em {
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    font-weight: 500;
}

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

.nav-link,
.mobile-nav-link {
    color: #334155;
    font-weight: 650;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    color: var(--brand);
}

.nav-link:hover {
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    padding: 10px 14px;
    color: var(--brand);
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    font-weight: 700;
}

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

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

.hero-section {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 52%, #06b6d4 100%);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.26;
    background-image: radial-gradient(circle at 18px 18px, rgba(255, 255, 255, 0.28) 2px, transparent 0);
    background-size: 54px 54px;
}

.hero-inner {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 86px 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
    gap: 46px;
    align-items: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: #dffbff;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.page-hero .eyebrow,
.detail-hero .eyebrow {
    color: var(--brand);
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin: 0;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.hero-copy p,
.page-hero p,
.lead-text {
    max-width: 760px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: clamp(16px, 2vw, 20px);
}

.page-hero p,
.lead-text {
    color: #475569;
}

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

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

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

.btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.28);
}

.hero-section .btn.primary {
    color: var(--brand);
    background: #ffffff;
}

.btn.ghost {
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.76);
}

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

.hero-tags {
    margin-top: 26px;
}

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

.hero-tags span {
    color: #ecfeff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.hero-stage {
    position: relative;
    min-height: 520px;
    border-radius: 30px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.hero-slide {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 30px;
    opacity: 0;
    transform: scale(0.96) translateY(10px);
    transition: opacity 0.55s ease, transform 0.55s ease;
    pointer-events: none;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #155e75, #0f766e);
}

.hero-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.06) 20%, rgba(15, 23, 42, 0.86) 100%);
}

.hero-slide-copy {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
    display: grid;
    gap: 12px;
}

.hero-slide-copy strong {
    font-size: 28px;
    line-height: 1.2;
}

.hero-slide-copy em {
    color: rgba(255, 255, 255, 0.84);
    font-style: normal;
}

.hero-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -28px;
    display: flex;
    justify-content: center;
    gap: 9px;
}

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

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

.feature-strip,
.content-section,
.page-hero,
.detail-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.feature-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    padding: 36px 0 10px;
}

.feature-card,
.category-card,
.movie-card,
.rank-panel,
.filter-panel,
.text-panel,
.player-shell {
    background: var(--surface);
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: var(--radius);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.feature-card {
    padding: 26px;
}

.feature-card strong {
    display: block;
    font-size: 22px;
}

.feature-card span {
    display: block;
    margin-top: 8px;
    color: var(--muted);
}

.content-section {
    padding: 48px 0;
}

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

.section-title h2,
.rank-panel-head h2,
.text-panel h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.18;
}

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

.section-title a,
.rank-panel-head a {
    color: var(--brand);
    font-weight: 800;
}

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

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

.category-card {
    min-height: 180px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

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

.category-card strong {
    margin-top: 18px;
    font-size: 20px;
}

.category-card em {
    margin: 10px 0 18px;
    color: var(--muted);
    font-size: 14px;
    font-style: normal;
}

.category-card > span:last-child {
    color: var(--brand);
    font-weight: 800;
}

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

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

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

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

.movie-card {
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: linear-gradient(135deg, #155e75, #0f766e);
}

.movie-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.cover-shade {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0);
    transition: background 0.25s ease;
}

.movie-card:hover .cover-shade {
    background: rgba(15, 23, 42, 0.26);
}

.play-hover {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.86);
    border-radius: 50%;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.84);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.type-badge,
.year-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    color: #ffffff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.type-badge {
    left: 12px;
    background: var(--brand);
}

.year-badge {
    right: 12px;
    background: rgba(15, 23, 42, 0.72);
}

.rank-badge {
    left: 12px;
    top: auto;
    bottom: 12px;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.movie-info {
    padding: 18px;
}

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

.movie-info h2 a:hover {
    color: var(--brand);
}

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

.movie-meta {
    margin-bottom: 12px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.movie-meta span + span::before {
    content: "·";
    margin-right: 8px;
    color: #94a3b8;
}

.tag-row span {
    color: #475569;
    background: #f1f5f9;
}

.tag-row.wide span {
    color: var(--brand-dark);
    background: #dbeafe;
}

.rank-panel {
    position: sticky;
    top: 96px;
    padding: 22px;
}

.rank-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 34px 72px 1fr;
    gap: 12px;
    align-items: center;
    padding: 10px;
    background: #f8fafc;
    border-radius: 16px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-item:hover {
    background: #eff6ff;
    transform: translateX(3px);
}

.rank-number {
    color: var(--brand);
    font-weight: 900;
    text-align: center;
}

.rank-item img {
    width: 72px;
    height: 48px;
    object-fit: cover;
    border-radius: 12px;
    background: linear-gradient(135deg, #155e75, #0f766e);
}

.rank-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

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

.rank-copy em {
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-hero {
    padding: 66px 0 18px;
}

.page-hero > div {
    padding: 42px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: 30px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.filter-panel {
    margin-bottom: 24px;
    padding: 22px;
}

.filter-panel label {
    display: block;
    margin-bottom: 10px;
    color: #334155;
    font-weight: 900;
}

.filter-panel input {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    color: var(--ink);
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

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

.chip-row {
    margin-top: 14px;
}

.chip-row button {
    color: #334155;
    background: #f1f5f9;
    border: 0;
}

.chip-row button:hover,
.chip-row button.is-active {
    color: #ffffff;
    background: var(--brand);
}

.detail-hero {
    padding: 34px 0 0;
}

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

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

.detail-grid {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 32px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: 30px;
    box-shadow: var(--shadow);
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.18);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: linear-gradient(135deg, #155e75, #0f766e);
}

.detail-copy h1 {
    color: var(--ink);
}

.detail-meta {
    margin: 22px 0;
}

.detail-meta span {
    color: #0f172a;
    background: #f1f5f9;
}

.player-section {
    padding-top: 28px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    background: #020617;
    aspect-ratio: 16 / 9;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 14px;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(37, 99, 235, 0.16), rgba(2, 6, 23, 0.68));
    border: 0;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-play-ring {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    padding-left: 4px;
    background: linear-gradient(135deg, var(--brand), var(--cyan));
    border-radius: 50%;
    box-shadow: 0 20px 48px rgba(37, 99, 235, 0.38);
    font-size: 32px;
}

.player-cover strong {
    font-size: 22px;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.text-panel {
    padding: 28px;
}

.text-panel p {
    margin: 14px 0 0;
    color: #475569;
    font-size: 16px;
}

[hidden] {
    display: none !important;
}

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

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 44px 0;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 36px;
}

.footer-logo {
    color: #ffffff;
    font-size: 20px;
}

.site-footer p {
    max-width: 460px;
    color: #94a3b8;
}

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

.site-footer a {
    display: block;
    margin: 8px 0;
    color: #cbd5e1;
}

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 26px;
    color: #94a3b8;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    font-size: 14px;
}

@media (max-width: 1100px) {
    .hero-inner,
    .split-section,
    .detail-grid {
        grid-template-columns: 1fr;
    }

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

    .rank-panel {
        position: static;
    }

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

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

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

    .nav-toggle {
        display: inline-flex;
    }

    .site-header-inner {
        height: 68px;
    }

    .logo-text strong {
        max-width: 190px;
        overflow: hidden;
        font-size: 16px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hero-inner {
        padding: 54px 0 74px;
    }

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

    .feature-strip,
    .footer-grid,
    .detail-content {
        grid-template-columns: 1fr;
    }

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

    .page-hero > div,
    .detail-grid {
        padding: 24px;
    }
}

@media (max-width: 540px) {
    .site-header-inner,
    .feature-strip,
    .content-section,
    .page-hero,
    .detail-hero,
    .footer-grid,
    .footer-bottom,
    .hero-inner {
        width: min(100% - 22px, 1180px);
    }

    .hero-copy h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 32px;
    }

    .hero-actions {
        flex-direction: column;
    }

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

    .category-grid,
    .category-grid.overview,
    .movie-grid,
    .compact-grid,
    .rank-grid {
        grid-template-columns: 1fr;
    }

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

    .rank-item {
        grid-template-columns: 30px 64px 1fr;
    }
}
