:root {
    --color-teal: #0d9488;
    --color-teal-dark: #0f766e;
    --color-cyan: #0891b2;
    --color-bg: #f8fafc;
    --color-soft: #f1f5f9;
    --color-text: #0f172a;
    --color-muted: #64748b;
    --color-line: #e2e8f0;
    --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 18px 40px rgba(15, 23, 42, 0.12);
    --radius-lg: 22px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

.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.8);
    backdrop-filter: blur(16px);
}

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

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

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: #ffffff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--color-teal), var(--color-cyan));
    box-shadow: 0 10px 24px rgba(13, 148, 136, 0.24);
}

.brand-text {
    font-size: 1.3rem;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, var(--color-teal), var(--color-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
}

.nav-link {
    color: #334155;
    font-weight: 700;
    transition: color 0.2s ease;
}

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

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    border: 0;
    border-radius: 12px;
    background: #f8fafc;
    cursor: pointer;
}

.menu-toggle span {
    width: 22px;
    height: 2px;
    background: #0f172a;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

.mobile-panel.is-open {
    display: grid;
    gap: 12px;
}

.hero-slider {
    position: relative;
    min-height: 580px;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #134e4a, #164e63);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.35;
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 75% 15%, rgba(20, 184, 166, 0.38), transparent 36%), linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.58), rgba(15, 23, 42, 0.22));
}

.hero-content {
    position: absolute;
    top: 50%;
    left: max(24px, calc((100vw - 1180px) / 2));
    width: min(680px, calc(100% - 48px));
    transform: translateY(-50%);
}

.hero-pill,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-teal);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero-pill {
    color: #ffffff;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(13, 148, 136, 0.88);
}

.hero-content h1 {
    margin: 18px 0 14px;
    font-size: clamp(2.4rem, 7vw, 5rem);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.hero-content p {
    width: min(620px, 100%);
    margin: 0 0 24px;
    color: #dbeafe;
    font-size: clamp(1rem, 2vw, 1.3rem);
}

.hero-info,
.hero-tags,
.detail-meta,
.detail-tags,
.tag-row,
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-info span,
.hero-tags span,
.detail-tags span,
.tag-row span,
.filter-chips button {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
}

.hero-info span {
    padding: 6px 12px;
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.16);
}

.hero-tags span,
.detail-tags span,
.tag-row span {
    padding: 5px 10px;
    color: #0f766e;
    background: #ccfbf1;
    font-size: 0.82rem;
    font-weight: 700;
}

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

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

.btn-primary,
.watch-link {
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-teal), var(--color-cyan));
    box-shadow: 0 14px 30px rgba(13, 148, 136, 0.26);
}

.btn-ghost {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.12);
}

.btn-primary:hover,
.btn-ghost:hover,
.watch-link:hover {
    transform: translateY(-2px);
}

.btn-primary.full {
    width: 100%;
}

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

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

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

.search-panel,
.section,
.page-hero,
.breadcrumb,
.detail-layout {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.search-panel {
    margin-top: -36px;
    position: relative;
    z-index: 5;
    padding: 22px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-md);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 16px;
    border: 1px solid var(--color-line);
    border-radius: 16px;
    background: #ffffff;
}

.search-box span {
    color: var(--color-teal);
    font-size: 1.4rem;
    font-weight: 900;
}

.site-search {
    width: 100%;
    min-height: 52px;
    border: 0;
    outline: 0;
    color: #0f172a;
    background: transparent;
}

.filter-chips {
    margin-top: 14px;
}

.filter-chips button {
    padding: 8px 14px;
    color: #0f766e;
    border: 1px solid #99f6e4;
    background: #f0fdfa;
    cursor: pointer;
}

.filter-chips button:hover,
.filter-chips button.is-active {
    color: #ffffff;
    background: var(--color-teal);
}

.section {
    padding: 72px 0;
}

.section-white,
.section-soft,
.section-highlight {
    width: 100%;
    max-width: none;
    padding-left: max(16px, calc((100vw - 1180px) / 2));
    padding-right: max(16px, calc((100vw - 1180px) / 2));
}

.section-white {
    background: #ffffff;
}

.section-soft {
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
}

.section-highlight {
    background: linear-gradient(135deg, #ecfeff, #f0fdfa);
}

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

.section-head h2,
.page-hero h1,
.detail-article h1 {
    margin: 6px 0 0;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-head a {
    color: var(--color-teal);
    font-weight: 800;
}

.movie-grid,
.category-grid,
.editor-grid {
    display: grid;
    gap: 22px;
}

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

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

.ranking-strip {
    display: grid;
    gap: 18px;
}

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

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

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

.movie-card,
.category-tile,
.side-card,
.summary-box,
.ranking-row {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: var(--radius-md);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

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

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

.card-link {
    display: block;
    height: 100%;
}

.poster-frame {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #e2e8f0;
}

.is-compact .poster-frame {
    aspect-ratio: 16 / 11;
}

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

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

.play-mark {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: #ffffff;
    border-radius: 999px;
    background: rgba(13, 148, 136, 0.92);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.22);
}

.rank-badge {
    position: absolute;
    left: 10px;
    top: 10px;
    padding: 5px 9px;
    color: #ffffff;
    border-radius: 999px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    font-size: 0.76rem;
    font-weight: 900;
}

.card-body {
    padding: 16px;
}

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--color-muted);
    font-size: 0.86rem;
}

.card-body h3 {
    display: -webkit-box;
    min-height: 2.8em;
    margin: 8px 0 6px;
    overflow: hidden;
    color: #0f172a;
    font-size: 1.05rem;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-body p {
    display: -webkit-box;
    min-height: 3em;
    margin: 0 0 12px;
    overflow: hidden;
    color: #64748b;
    font-size: 0.92rem;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.is-compact .card-body h3 {
    min-height: 0;
    font-size: 0.98rem;
}

.is-compact .card-body p {
    display: none;
}

.category-tile a {
    display: grid;
    grid-template-columns: 160px 1fr;
    min-height: 170px;
}

.category-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.category-tile div {
    padding: 24px;
}

.category-tile h3 {
    margin: 0 0 10px;
    font-size: 1.3rem;
}

.category-tile p {
    margin: 0 0 18px;
    color: var(--color-muted);
}

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mini-links a {
    padding: 6px 10px;
    color: var(--color-teal-dark);
    border-radius: 999px;
    background: #ccfbf1;
    font-size: 0.78rem;
    font-weight: 800;
}

.page-hero {
    display: grid;
    min-height: 280px;
    align-items: center;
    margin-top: 34px;
    margin-bottom: 46px;
    padding: 42px;
    color: #ffffff;
    border-radius: 28px;
    background: radial-gradient(circle at 80% 18%, rgba(45, 212, 191, 0.5), transparent 28%), linear-gradient(135deg, #134e4a, #164e63);
    box-shadow: var(--shadow-md);
}

.page-hero p {
    max-width: 760px;
    margin: 16px 0 0;
    color: #dbeafe;
    font-size: 1.08rem;
}

.page-hero .eyebrow {
    color: #99f6e4;
}

.small-actions {
    margin-top: 22px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
    margin-bottom: 28px;
    color: var(--color-muted);
    font-weight: 700;
}

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

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.9fr);
    gap: 28px;
    padding-bottom: 72px;
}

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

.player-shell video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: #ffffff;
    border: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.16), rgba(15, 23, 42, 0.62));
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.player-shell.is-playing .player-overlay {
    opacity: 0;
    pointer-events: none;
}

.play-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 78px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--color-teal), var(--color-cyan));
    box-shadow: 0 20px 48px rgba(13, 148, 136, 0.34);
    font-size: 2rem;
}

.player-message {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    display: none;
    padding: 12px 14px;
    color: #ffffff;
    border-radius: 12px;
    background: rgba(220, 38, 38, 0.9);
}

.player-message.is-visible {
    display: block;
}

.detail-article {
    margin-top: 26px;
}

.detail-article h1 {
    margin-bottom: 14px;
}

.detail-meta span {
    padding: 7px 12px;
    border-radius: 999px;
    background: #f1f5f9;
}

.detail-tags {
    margin: 18px 0;
}

.summary-box {
    margin-top: 18px;
    padding: 24px;
}

.summary-box h2,
.side-card h2 {
    margin: 0 0 12px;
    font-size: 1.28rem;
}

.summary-box p {
    margin: 0;
    color: #334155;
}

.lead-box {
    background: #f8fafc;
}

.review-box {
    background: linear-gradient(135deg, #f0fdfa, #ecfeff);
}

.detail-side {
    display: grid;
    align-content: start;
    gap: 20px;
}

.side-card {
    padding: 18px;
}

.poster-side img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    margin-bottom: 16px;
    border-radius: 16px;
}

.side-related {
    display: grid;
    gap: 14px;
}

.side-related .movie-card {
    box-shadow: none;
}

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

.ranking-row {
    box-shadow: none;
}

.ranking-row a {
    display: grid;
    grid-template-columns: 64px 110px 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
}

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

.ranking-row img {
    width: 110px;
    aspect-ratio: 16 / 11;
    object-fit: cover;
    border-radius: 14px;
}

.ranking-info h2 {
    margin: 0 0 6px;
    font-size: 1.18rem;
}

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

.site-footer {
    color: #cbd5e1;
    background: #0f172a;
}

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

.footer-brand {
    color: #ffffff;
    font-size: 1.2rem;
}

.footer-main p {
    max-width: 560px;
    color: #94a3b8;
}

.footer-col {
    display: grid;
    align-content: start;
    gap: 10px;
}

.footer-col h3 {
    margin: 0 0 8px;
    color: #ffffff;
}

.footer-col a:hover {
    color: #5eead4;
}

.is-hidden {
    display: none !important;
}

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

    .menu-toggle {
        display: flex;
    }

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

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

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

    .ranking-row a {
        grid-template-columns: 44px 88px 1fr;
    }

    .ranking-row .watch-link {
        grid-column: 2 / -1;
        width: fit-content;
    }
}

@media (max-width: 640px) {
    .site-nav,
    .mobile-panel,
    .search-panel,
    .section,
    .page-hero,
    .breadcrumb,
    .detail-layout {
        width: min(100% - 24px, 1180px);
    }

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

    .hero-info,
    .hero-tags {
        gap: 8px;
    }

    .hero-dots {
        right: 18px;
        bottom: 22px;
    }

    .search-panel {
        margin-top: -24px;
        padding: 16px;
    }

    .section,
    .section-white,
    .section-soft,
    .section-highlight {
        padding-top: 48px;
        padding-bottom: 48px;
    }

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

    .movie-grid,
    .compact-grid,
    .ranking-strip,
    .editor-grid,
    .category-grid,
    .category-grid.wide {
        grid-template-columns: 1fr;
    }

    .category-tile a {
        grid-template-columns: 1fr;
    }

    .category-tile img {
        height: 220px;
    }

    .page-hero {
        padding: 28px;
    }

    .ranking-row a {
        grid-template-columns: 38px 74px 1fr;
        gap: 12px;
    }

    .ranking-row img {
        width: 74px;
    }

    .watch-link {
        min-height: 38px;
        padding: 0 16px;
    }
}
