:root {
    --bg: #f9fafb;
    --surface: #ffffff;
    --surface-soft: #f3f4f6;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --teal: #0d9488;
    --teal-dark: #0f766e;
    --cyan: #06b6d4;
    --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(16px);
}

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

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

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

.brand-name {
    font-size: 24px;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: auto;
}

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

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

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

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select {
    border: 1px solid var(--line);
    background: #f9fafb;
    border-radius: 999px;
    padding: 10px 16px;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

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

.header-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    background: #ffffff;
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(20, 184, 166, 0.14);
}

.header-search button,
.mobile-search button {
    border: 0;
    color: #ffffff;
    background: var(--teal);
    border-radius: 999px;
    padding: 10px 16px;
    cursor: pointer;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    background: #f3f4f6;
    border-radius: 12px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: #374151;
    border-radius: 99px;
}

.mobile-nav {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 16px 0 20px;
    border-top: 1px solid #f3f4f6;
}

.mobile-link {
    display: block;
    padding: 10px 14px;
    color: #374151;
    font-weight: 700;
    border-radius: 12px;
}

.mobile-link.sub {
    color: #64748b;
    font-weight: 600;
}

.mobile-link:hover,
.mobile-link.active {
    color: var(--teal);
    background: #f0fdfa;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: center;
    gap: 48px;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

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

.hero-bg,
.detail-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(16px) saturate(1.25);
    transform: scale(1.06);
    opacity: 0.35;
}

.hero-shade,
.detail-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, rgba(13, 148, 136, 0.92), rgba(6, 182, 212, 0.72) 45%, rgba(15, 23, 42, 0.82));
}

.hero-content {
    position: relative;
    z-index: 2;
    color: #ffffff;
    max-width: 720px;
    padding-top: 32px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--teal);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-content .eyebrow,
.detail-info .eyebrow,
.page-hero .eyebrow {
    color: #ccfbf1;
}

.hero h1 {
    margin: 0;
    font-size: clamp(40px, 7vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.hero-text {
    max-width: 650px;
    margin: 22px 0 0;
    color: #ecfeff;
    font-size: 20px;
}

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

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

.hero-tags span,
.detail-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 14px;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    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(--teal), var(--cyan));
    box-shadow: 0 16px 28px rgba(13, 148, 136, 0.28);
}

.btn.ghost {
    color: var(--teal-dark);
    background: #ecfeff;
}

.btn.ghost.light {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
}

.btn.text {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.hero-poster {
    position: relative;
    z-index: 2;
    display: block;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transform: rotate(2deg);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 5;
    display: flex;
    gap: 10px;
    transform: translateX(-50%);
}

.hero-dot {
    width: 42px;
    height: 5px;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
}

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

.quick-panel,
.page-wrap,
.detail-wrap,
.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.quick-panel {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 16px;
    transform: translateY(-42px);
    position: relative;
    z-index: 8;
}

.quick-card {
    min-height: 136px;
    padding: 24px;
    color: #0f172a;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-card:hover,
.movie-card:hover,
.category-card:hover,
.rank-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.quick-card span {
    display: block;
    color: var(--teal);
    font-weight: 800;
    margin-bottom: 8px;
}

.quick-card h2,
.quick-card strong {
    display: block;
    margin: 0;
    font-size: 22px;
}

.quick-card p {
    margin: 10px 0 0;
    color: var(--muted);
}

.page-wrap {
    padding: 22px 0 60px;
}

.home-section {
    margin-bottom: 56px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.section-heading.plain {
    margin-bottom: 16px;
}

.section-heading h2 {
    margin: 0;
    font-size: 28px;
    line-height: 1.2;
}

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

.section-heading a span {
    margin-left: 6px;
}

.movie-grid {
    display: grid;
    gap: 20px;
}

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

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

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

.movie-card {
    position: relative;
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-link {
    position: relative;
    display: block;
    background: #e5e7eb;
    overflow: hidden;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.category-badge,
.year-badge,
.rank-badge {
    position: absolute;
    top: 12px;
    z-index: 2;
    color: #ffffff;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
}

.category-badge {
    left: 12px;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
}

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

.rank-badge {
    left: 12px;
    top: 48px;
    min-width: 34px;
    text-align: center;
    background: rgba(245, 158, 11, 0.94);
}

.movie-body {
    padding: 15px;
}

.movie-title {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.25;
}

.movie-title.compact {
    font-size: 16px;
}

.movie-title a {
    transition: color 0.2s ease;
}

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

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

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #4b5563;
    font-size: 13px;
}

.movie-meta span {
    background: #f3f4f6;
    border-radius: 999px;
    padding: 4px 8px;
}

.tag-row {
    margin-top: 12px;
}

.tag-row span {
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #edf2f7;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 12px;
}

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

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

.category-card {
    display: block;
    padding: 20px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card.large {
    padding: 24px;
}

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 18px;
}

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

.category-thumbs img {
    width: 100%;
    aspect-ratio: 2 / 3;
    border-radius: 14px;
    object-fit: cover;
}

.category-card h2,
.category-card h3 {
    margin: 0 0 8px;
}

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

.category-card span {
    display: inline-flex;
    margin-top: 14px;
    color: var(--teal);
    font-weight: 800;
}

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

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

.rank-num {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    border-radius: 12px;
    font-weight: 900;
}

.rank-item img {
    width: 66px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 12px;
}

.rank-item strong {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.rank-item p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.page-hero {
    min-height: 260px;
    display: flex;
    align-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
}

.page-hero > div {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 54px 0;
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.1;
}

.page-hero p:last-child {
    max-width: 720px;
    margin: 18px 0 0;
    color: #ecfeff;
    font-size: 18px;
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 22px;
    color: #64748b;
    font-size: 14px;
}

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

.crumbs.light {
    color: #d1fae5;
}

.crumbs.light a {
    color: #ffffff;
}

.filter-panel {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
    padding: 18px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    border-radius: 16px;
}

.empty-state {
    padding: 40px;
    margin-bottom: 24px;
    text-align: center;
    color: var(--muted);
    background: #ffffff;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.detail-hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    background: #0f172a;
}

.detail-wrap {
    position: relative;
    z-index: 2;
    padding: 36px 0 56px;
}

.detail-main {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 42px;
    align-items: end;
    min-height: 420px;
}

.detail-poster {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 28px;
    box-shadow: var(--shadow-lg);
}

.detail-info {
    color: #ffffff;
    padding-bottom: 14px;
}

.detail-info h1 {
    margin: 0;
    font-size: clamp(38px, 6vw, 66px);
    line-height: 1.06;
}

.detail-one-line {
    max-width: 760px;
    margin: 20px 0 0;
    color: #ecfeff;
    font-size: 20px;
}

.detail-tags {
    margin-top: 24px;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
    gap: 24px;
    align-items: start;
}

.watch-card,
.article-card,
.related-section {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 22px;
}

.watch-card {
    grid-column: 1 / -1;
}

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

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
}

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

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

.play-icon {
    width: 78px;
    height: 78px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--teal), var(--cyan));
    border-radius: 999px;
    box-shadow: 0 16px 30px rgba(13, 148, 136, 0.38);
    font-size: 30px;
}

.article-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
}

.article-card h2:not(:first-child) {
    margin-top: 26px;
}

.article-card p {
    margin: 0;
    color: #374151;
}

.movie-detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0 0;
}

.movie-detail-list div {
    padding: 12px;
    background: #f8fafc;
    border-radius: 16px;
}

.movie-detail-list dt {
    color: var(--muted);
    font-size: 13px;
}

.movie-detail-list dd {
    margin: 3px 0 0;
    font-weight: 800;
}

.related-section {
    margin: 0;
}

.site-footer {
    margin-top: 40px;
    color: #d1d5db;
    background: linear-gradient(135deg, #111827, #1f2937);
}

.footer-inner {
    display: grid;
    grid-template-columns: minmax(0, 2fr) 1fr 1fr;
    gap: 36px;
    padding: 44px 0;
}

.footer-brand {
    color: #ffffff;
    font-size: 24px;
}

.footer-about p {
    max-width: 520px;
    margin: 18px 0 0;
    color: #9ca3af;
}

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

.footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-col li + li {
    margin-top: 9px;
}

.footer-col a {
    color: #9ca3af;
    transition: color 0.2s ease;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px;
    text-align: center;
    color: #9ca3af;
}

@media (max-width: 1080px) {
    .desktop-nav,
    .header-search {
        display: none;
    }

    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .mobile-nav.is-open {
        display: block;
    }

    .hero-slide {
        grid-template-columns: minmax(0, 1fr) 260px;
    }

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

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

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

    .detail-content,
    .footer-inner,
    .filter-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .header-inner {
        height: 62px;
    }

    .brand-name {
        font-size: 20px;
    }

    .hero {
        min-height: 720px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 22px;
        align-content: center;
        padding: 30px 0 70px;
    }

    .hero-poster {
        width: min(230px, 62vw);
        margin: 0 auto;
        transform: none;
    }

    .hero h1 {
        font-size: 42px;
    }

    .hero-text,
    .detail-one-line {
        font-size: 17px;
    }

    .quick-panel,
    .movie-grid.six,
    .movie-grid.four,
    .movie-grid.three,
    .movie-grid.rank-grid,
    .category-grid,
    .category-grid.large,
    .rank-strip {
        grid-template-columns: 1fr;
    }

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

    .detail-poster {
        width: min(260px, 70vw);
    }

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

    .page-wrap {
        padding-bottom: 38px;
    }
}
