:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-strong: #f1f5f9;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --teal: #0d9488;
    --teal-dark: #0f766e;
    --teal-soft: #ccfbf1;
    --cyan-soft: #ecfeff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
    --shadow-soft: 0 12px 28px rgba(15, 23, 42, 0.08);
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--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 {
    display: block;
    max-width: 100%;
}

button,
input,
select {
    font: inherit;
}

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

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

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 24px;
}

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

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

.brand-name {
    font-size: 1.3rem;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-link,
.mobile-nav-link {
    padding: 10px 13px;
    border-radius: 999px;
    color: #334155;
    font-size: 0.96rem;
    font-weight: 650;
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--teal-dark);
    background: var(--teal-soft);
}

.nav-link-soft {
    color: #475569;
    background: rgba(241, 245, 249, 0.8);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--text);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.mobile-nav.open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.hero {
    position: relative;
    overflow: hidden;
    min-height: 630px;
    background: radial-gradient(circle at top left, rgba(20, 184, 166, 0.18), transparent 34%), linear-gradient(135deg, #0f172a 0%, #164e63 48%, #0f766e 100%);
    color: #ffffff;
}

.hero:before,
.hero:after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(6px);
    opacity: 0.45;
}

.hero:before {
    width: 360px;
    height: 360px;
    right: -90px;
    top: 88px;
    background: rgba(45, 212, 191, 0.38);
}

.hero:after {
    width: 260px;
    height: 260px;
    left: -70px;
    bottom: 72px;
    background: rgba(103, 232, 249, 0.24);
}

.hero-inner {
    position: relative;
    z-index: 1;
    padding: 76px 0 62px;
}

.hero-slider {
    position: relative;
}

.hero-slide {
    display: none;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 48px;
    align-items: center;
}

.hero-slide.active {
    display: grid;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    color: #a7f3d0;
    background: rgba(15, 23, 42, 0.38);
    border: 1px solid rgba(153, 246, 228, 0.28);
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 700;
}

.hero h1 {
    margin: 22px 0 18px;
    font-size: clamp(2.4rem, 7vw, 5.2rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

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

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--teal);
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(13, 148, 136, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    background: var(--teal-dark);
    box-shadow: 0 18px 34px rgba(13, 148, 136, 0.3);
}

.btn.secondary {
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn.light {
    color: var(--teal-dark);
    background: #ffffff;
}

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

.hero-tags span,
.tag-row span,
.info-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
}

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

.hero-visual {
    position: relative;
}

.hero-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10.5;
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow);
}

.hero-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
}

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

.hero-card {
    position: absolute;
    left: 26px;
    right: 26px;
    bottom: 24px;
    z-index: 1;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 22px;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(18px);
}

.hero-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.15rem;
}

.hero-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
}

.hero-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    cursor: pointer;
}

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

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

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

.search-panel {
    margin-top: -34px;
    position: relative;
    z-index: 3;
}

.search-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px 150px;
    gap: 12px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
}

.search-box input,
.search-box select {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    color: var(--text);
    background: var(--surface-strong);
    border: 1px solid transparent;
    border-radius: 16px;
    outline: none;
}

.search-box input:focus,
.search-box select:focus {
    border-color: var(--teal);
    background: #ffffff;
}

.section {
    padding: 64px 0;
}

.section.tight {
    padding-top: 34px;
}

.section-alt {
    background: linear-gradient(180deg, #ffffff, #f1f5f9);
}

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

.section-head h1,
.section-head h2 {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.7rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.section-head p,
.page-intro p {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--muted);
}

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

.movie-card {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(13, 148, 136, 0.35);
    box-shadow: var(--shadow-soft);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #e2e8f0, #f8fafc);
}

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

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

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(15, 23, 42, 0.74));
}

.play-chip {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 6px 12px;
    color: #ffffff;
    background: rgba(13, 148, 136, 0.92);
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444);
    border-radius: 999px;
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.26);
}

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

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.movie-card h2,
.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 1.1rem;
    line-height: 1.35;
}

.movie-card h2 a:hover,
.movie-card h3 a:hover,
.related-card:hover strong {
    color: var(--teal-dark);
}

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

.tag-row span {
    color: #0f766e;
    background: #f0fdfa;
}

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

.category-card {
    display: flex;
    min-height: 180px;
    flex-direction: column;
    justify-content: space-between;
    padding: 22px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(13, 148, 136, 0.35);
    box-shadow: var(--shadow-soft);
}

.category-card strong {
    display: block;
    margin-bottom: 8px;
    font-size: 1.2rem;
}

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

.category-card span {
    margin-top: 18px;
    color: var(--teal-dark);
    font-weight: 800;
}

.page-hero {
    padding: 64px 0 36px;
    background: linear-gradient(135deg, #ecfeff, #ffffff 45%, #f8fafc);
    border-bottom: 1px solid var(--line);
}

.page-intro h1 {
    max-width: 900px;
    margin: 0;
    font-size: clamp(2.1rem, 5vw, 4.4rem);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 0.92rem;
}

.breadcrumb a {
    color: var(--teal-dark);
    font-weight: 700;
}

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

.detail-main,
.detail-side,
.info-card {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.04);
}

.detail-main {
    overflow: hidden;
}

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

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

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.74));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.player-start {
    width: 88px;
    height: 88px;
    color: #ffffff;
    background: rgba(13, 148, 136, 0.92);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 900;
    box-shadow: 0 20px 42px rgba(13, 148, 136, 0.35);
}

.player-start:hover {
    background: var(--teal-dark);
    transform: scale(1.04);
}

.player-status {
    position: absolute;
    left: 18px;
    bottom: 14px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.88rem;
}

.detail-content {
    padding: 28px;
}

.detail-content h1 {
    margin: 0 0 16px;
    font-size: clamp(2rem, 5vw, 3.3rem);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 22px;
}

.info-chip {
    color: #0f766e;
    background: #f0fdfa;
}

.detail-section {
    margin-top: 28px;
}

.detail-section h2 {
    margin: 0 0 12px;
    font-size: 1.35rem;
}

.detail-section p {
    margin: 0;
    color: #334155;
}

.review-box {
    padding: 20px;
    color: #164e63;
    background: linear-gradient(135deg, #ecfeff, #f0fdfa);
    border-radius: 18px;
}

.detail-side {
    position: sticky;
    top: 94px;
    padding: 20px;
}

.detail-side h2 {
    margin: 0 0 16px;
    font-size: 1.25rem;
}

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

.related-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 16px;
    transition: background 0.2s ease;
}

.related-card:hover {
    background: #f8fafc;
}

.related-card img {
    width: 112px;
    height: 72px;
    object-fit: cover;
    background: #e2e8f0;
    border-radius: 12px;
}

.related-card strong {
    display: -webkit-box;
    overflow: hidden;
    line-height: 1.35;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.related-card em {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.84rem;
    font-style: normal;
}

.info-card {
    padding: 22px;
}

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

.info-list div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 10px;
}

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

.info-list dd {
    margin: 0;
    font-weight: 800;
    text-align: right;
}

.empty-hint {
    display: none;
    padding: 24px;
    color: var(--muted);
    background: #ffffff;
    border: 1px dashed var(--line);
    border-radius: 18px;
    text-align: center;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 34px;
}

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

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

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

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

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

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

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

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

    .menu-toggle {
        display: block;
    }

    .hero {
        min-height: auto;
    }

    .hero-slide {
        grid-template-columns: 1fr;
    }

    .hero-inner {
        padding: 48px 0 72px;
    }

    .search-box {
        grid-template-columns: 1fr;
    }

    .section-head {
        display: block;
    }

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

    .detail-side {
        position: static;
    }
}

@media (max-width: 560px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

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

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

    .movie-card p {
        display: none;
    }

    .hero-card {
        position: static;
        margin-top: 12px;
    }

    .hero-poster {
        border-radius: 24px;
    }

    .related-card {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .related-card img {
        width: 96px;
        height: 64px;
    }
}
