:root {
    --teal: #0f766e;
    --teal-bright: #14b8a6;
    --cyan: #0891b2;
    --ink: #0f172a;
    --text: #334155;
    --muted: #64748b;
    --line: #e2e8f0;
    --soft: #f8fafc;
    --card: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

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

.nav-shell {
    height: 64px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 15px;
    background: linear-gradient(135deg, var(--teal-bright), var(--cyan));
    box-shadow: 0 12px 26px rgba(20, 184, 166, 0.28);
}

.brand-text {
    font-size: 22px;
    background: linear-gradient(90deg, var(--teal), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

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

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

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #f1f5f9;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--ink);
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    border-top: 1px solid var(--line);
    padding: 14px 20px 20px;
}

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

.mobile-link {
    display: block;
    font-weight: 700;
    color: #475569;
    padding: 10px 0;
}

.hero-section {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    background: linear-gradient(135deg, #0f3b3a, #0f172a);
}

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.32;
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(20, 184, 166, 0.28), transparent 35%), linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.36));
}

.hero-shell {
    position: relative;
    z-index: 1;
    max-width: 1180px;
    min-height: 560px;
    margin: 0 auto;
    padding: 70px 20px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) 420px;
    align-items: center;
    gap: 52px;
}

.hero-copy {
    max-width: 700px;
}

.hero-pill,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border-radius: 999px;
    color: #fff;
    background: rgba(20, 184, 166, 0.9);
    font-weight: 800;
    font-size: 14px;
    margin-bottom: 18px;
}

.hero-copy h1,
.page-hero h1 {
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(36px, 5vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.hero-desc,
.page-hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 20px;
    max-width: 680px;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 30px 0;
}

.hero-meta span,
.detail-meta span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
}

.hero-meta span {
    color: #ecfeff;
    background: rgba(15, 118, 110, 0.72);
}

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

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

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--teal-bright), var(--cyan));
    box-shadow: 0 16px 30px rgba(8, 145, 178, 0.26);
}

.btn-primary:hover,
.btn-ghost:hover,
.movie-card:hover {
    transform: translateY(-3px);
}

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

.hero-panel {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 26px;
    padding: 24px;
    color: #fff;
    background: rgba(15, 23, 42, 0.46);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(18px);
}

.hero-panel h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.hero-panel p {
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.78);
}

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

.hero-mini-list a {
    display: grid;
    grid-template-columns: 58px 1fr;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.1);
    transition: background 0.2s ease;
}

.hero-mini-list a:hover {
    background: rgba(255, 255, 255, 0.18);
}

.hero-mini-list img {
    width: 58px;
    height: 76px;
    object-fit: cover;
    border-radius: 12px;
}

.hero-mini-list span {
    color: #fff;
    font-weight: 750;
}

.content-section,
.category-section,
.ranking-strip {
    padding: 64px 0;
}

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

.section-shell,
.footer-shell,
.detail-layout,
.breadcrumb {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

.narrow-shell {
    max-width: 1180px;
}

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

.block-head {
    margin-bottom: 18px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title h2 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(26px, 3vw, 34px);
    letter-spacing: -0.03em;
}

.section-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--teal-bright), var(--cyan));
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #0f172a;
}

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

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

.poster-badge,
.poster-year {
    position: absolute;
    top: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(15, 118, 110, 0.86);
    backdrop-filter: blur(8px);
}

.poster-badge {
    left: 12px;
}

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

.card-body {
    padding: 16px;
}

.card-body h3 {
    margin: 0 0 8px;
    color: var(--ink);
    font-size: 17px;
    line-height: 1.35;
}

.card-body h3 a:hover {
    color: var(--teal);
}

.card-body p {
    margin: 0 0 14px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.55;
    min-height: 44px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #64748b;
    font-size: 12px;
}

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

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

.category-tile {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    border-radius: 24px;
    background: var(--ink);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.12);
}

.category-tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.62;
    transition: transform 0.35s ease;
}

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

.category-title,
.category-desc {
    position: absolute;
    left: 20px;
    right: 20px;
    color: #fff;
}

.category-title {
    bottom: 62px;
    font-size: 23px;
    font-weight: 900;
}

.category-desc {
    bottom: 22px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 42px 56px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.rank-number {
    font-size: 18px;
    font-weight: 900;
    color: #94a3b8;
}

.rank-number.highlight {
    color: var(--teal);
}

.rank-item img {
    width: 56px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-title {
    color: var(--ink);
    font-weight: 800;
}

.rank-meta {
    color: #64748b;
    font-size: 13px;
}

.page-main,
.detail-main {
    background: var(--soft);
    min-height: 70vh;
}

.page-hero {
    min-height: 320px;
    background-size: cover;
    background-position: center;
    background-color: #0f766e;
}

.compact-hero {
    background: linear-gradient(135deg, #0f766e, #0891b2);
}

.page-hero-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 72px 20px;
}

.page-hero h1 {
    font-size: clamp(34px, 4vw, 52px);
}

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

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 170px 170px;
    gap: 14px;
    margin: 0 0 28px;
}

.filter-input,
.filter-select {
    width: 100%;
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 16px;
    color: var(--ink);
    background: #fff;
    outline: none;
    font: inherit;
}

.filter-input:focus,
.filter-select:focus {
    border-color: var(--teal-bright);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.12);
}

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

.ranking-card {
    position: relative;
}

.ranking-no {
    position: absolute;
    z-index: 2;
    left: 14px;
    top: 14px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--teal-bright), var(--cyan));
    box-shadow: 0 10px 24px rgba(8, 145, 178, 0.26);
}

.breadcrumb {
    padding-top: 28px;
    padding-bottom: 18px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: #64748b;
    font-weight: 650;
}

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

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

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #020617;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    background: radial-gradient(circle at 50% 45%, rgba(20, 184, 166, 0.22), rgba(2, 6, 23, 0.72));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-orb {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--teal-bright), var(--cyan));
    box-shadow: 0 18px 38px rgba(8, 145, 178, 0.34);
}

.detail-content,
.aside-card {
    margin-top: 24px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.detail-content {
    padding: 30px;
}

.detail-content h1 {
    margin: 0 0 16px;
    color: var(--ink);
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.detail-content h2,
.aside-card h2 {
    margin: 28px 0 12px;
    color: var(--ink);
    font-size: 22px;
}

.detail-content p {
    color: #475569;
    font-size: 16px;
}

.lead-text {
    font-size: 18px;
    color: var(--ink);
}

.detail-meta,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.detail-meta span {
    color: #0f766e;
    background: #ccfbf1;
}

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

.detail-aside {
    position: sticky;
    top: 88px;
}

.aside-card {
    padding: 18px;
}

.poster-card img {
    width: 100%;
    border-radius: 18px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.full-btn {
    width: 100%;
    margin-top: 16px;
}

.player-start {
    border: 0;
    cursor: pointer;
    font: inherit;
}

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

.aside-list a {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 12px;
    align-items: center;
    padding: 8px;
    border-radius: 14px;
    transition: background 0.2s ease;
}

.aside-list a:hover {
    background: #f8fafc;
}

.aside-list img {
    width: 58px;
    height: 76px;
    object-fit: cover;
    border-radius: 12px;
}

.aside-list span {
    display: grid;
    gap: 3px;
    color: var(--ink);
    font-weight: 800;
}

.aside-list small {
    color: #64748b;
    font-weight: 600;
}

.detail-related {
    padding-top: 44px;
}

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

.footer-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 32px;
    padding-top: 44px;
    padding-bottom: 44px;
}

.footer-brand {
    color: #fff;
    font-size: 22px;
}

.footer-shell p {
    max-width: 560px;
    margin: 12px 0 0;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 12px 24px;
    align-content: start;
}

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

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

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

    .menu-toggle {
        display: block;
    }

    .hero-shell {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .hero-panel {
        max-width: 620px;
    }

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

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

    .detail-aside {
        position: static;
    }

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

@media (max-width: 720px) {
    .hero-section,
    .hero-shell {
        min-height: auto;
    }

    .hero-shell {
        padding-top: 54px;
        padding-bottom: 54px;
    }

    .hero-desc,
    .page-hero p {
        font-size: 17px;
    }

    .movie-grid,
    .ranking-page-grid,
    .category-grid,
    .category-grid.large {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .content-section,
    .category-section,
    .ranking-strip {
        padding: 42px 0;
    }

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

    .filter-bar {
        grid-template-columns: 1fr;
    }

    .rank-item {
        grid-template-columns: 36px 50px 1fr;
    }

    .rank-meta {
        display: none;
    }

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

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

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

@media (max-width: 430px) {
    .nav-shell,
    .section-shell,
    .footer-shell,
    .detail-layout,
    .breadcrumb,
    .page-hero-shell,
    .hero-shell {
        padding-left: 14px;
        padding-right: 14px;
    }

    .movie-grid,
    .ranking-page-grid {
        gap: 12px;
    }

    .card-body {
        padding: 12px;
    }

    .card-body h3 {
        font-size: 15px;
    }

    .card-body p {
        display: none;
    }

    .poster-badge,
    .poster-year {
        font-size: 11px;
        padding: 4px 8px;
    }

    .category-tile {
        min-height: 168px;
    }
}
