:root {
    --bg: #f7fbf9;
    --surface: #ffffff;
    --surface-2: #ecfdf5;
    --text: #0f172a;
    --muted: #64748b;
    --line: rgba(15, 23, 42, 0.1);
    --brand: #059669;
    --brand-2: #0d9488;
    --brand-3: #14b8a6;
    --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 12px 34px rgba(15, 23, 42, 0.08);
    --radius: 24px;
    --radius-sm: 16px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: linear-gradient(135deg, #ffffff 0%, #ecfdf5 42%, #f0fdfa 100%);
    min-height: 100vh;
}

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.86);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}

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

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

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 12px 30px rgba(5, 150, 105, 0.25);
}

.brand-text {
    font-size: 21px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link,
.watch-entry {
    border-radius: 999px;
    padding: 10px 16px;
    color: #334155;
    font-weight: 700;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.watch-entry:hover {
    color: var(--brand);
    background: rgba(16, 185, 129, 0.1);
}

.watch-entry {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(20, 184, 166, 0.14));
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-toggle {
    display: none;
    border: 0;
    border-radius: 14px;
    width: 44px;
    height: 44px;
    background: #ecfdf5;
    color: var(--brand);
    cursor: pointer;
}

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

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

.mobile-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 10px;
    color: var(--muted);
}

.mobile-cats a {
    padding: 8px 12px;
    border-radius: 999px;
    background: #f1f5f9;
}

.main-wrap,
.section,
.page-hero,
.detail-wrap {
    width: min(1200px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.hero {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    color: #ffffff;
    background: #020617;
}

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

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.05);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.86) 0%, rgba(2, 6, 23, 0.58) 48%, rgba(2, 6, 23, 0.2) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.hero-copy {
    width: min(680px, 100%);
    padding: 82px 0 72px;
}

.eyebrow,
.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    font-weight: 800;
    color: #6ee7b7;
    background: rgba(5, 150, 105, 0.16);
    border: 1px solid rgba(110, 231, 183, 0.25);
}

.hero h1 {
    margin: 20px 0 18px;
    font-size: clamp(38px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.055em;
}

.hero p {
    margin: 0;
    max-width: 640px;
    font-size: 18px;
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.86);
}

.hero-meta,
.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.hero-meta span,
.meta-row span,
.tag-row span {
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 13px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.92);
}

.hero-actions,
.section-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.btn,
.btn-ghost,
.play-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    border: 0;
    font-weight: 900;
    cursor: pointer;
    transition: 0.2s ease;
}

.btn,
.play-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    box-shadow: 0 18px 35px rgba(5, 150, 105, 0.3);
}

.btn:hover,
.play-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 44px rgba(5, 150, 105, 0.4);
}

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

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.2);
}

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

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

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

.quick-search {
    margin: -42px auto 48px;
    position: relative;
    z-index: 6;
    width: min(980px, calc(100% - 32px));
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 16px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.quick-search input,
.filter-input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px 16px;
    outline: none;
    background: #ffffff;
    color: var(--text);
}

.quick-search input:focus,
.filter-input:focus {
    border-color: rgba(5, 150, 105, 0.45);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.section {
    padding: 44px 0;
}

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

.section-head h2,
.page-hero h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    letter-spacing: -0.04em;
}

.section-head p,
.page-hero p,
.detail-title p {
    color: var(--muted);
    line-height: 1.8;
    margin: 10px 0 0;
}

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

.category-card {
    min-height: 150px;
    padding: 22px;
    border-radius: var(--radius);
    color: #ffffff;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.35), transparent 32%), linear-gradient(135deg, #059669, #0d9488);
    box-shadow: var(--shadow-soft);
    transition: 0.2s ease;
}

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

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

.category-card span {
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.6;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.movie-card {
    overflow: hidden;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(15, 23, 42, 0.07);
    box-shadow: var(--shadow-soft);
    transition: 0.2s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #d1fae5, #ccfbf1);
}

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

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

.movie-year,
.movie-type {
    position: absolute;
    top: 10px;
    z-index: 2;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 900;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.68);
    backdrop-filter: blur(8px);
}

.movie-year {
    left: 10px;
}

.movie-type {
    right: 10px;
}

.movie-info {
    padding: 15px;
}

.movie-info h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
}

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

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

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tag-row span {
    color: var(--brand);
    background: rgba(16, 185, 129, 0.1);
}

.rank-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 48px 54px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(15, 23, 42, 0.07);
    box-shadow: var(--shadow-soft);
}

.rank-item:hover {
    color: var(--brand);
}

.rank-num {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

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

.rank-info strong,
.rank-info em {
    display: block;
}

.rank-info em {
    margin-top: 5px;
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.rank-score {
    font-weight: 900;
    color: #f59e0b;
}

.page-hero {
    padding-top: 56px;
    padding-bottom: 28px;
    align-items: center;
}

.filter-bar {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto 28px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chip {
    border: 0;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 800;
    color: #334155;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
    cursor: pointer;
}

.filter-chip.active,
.filter-chip:hover {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
}

.detail-wrap {
    padding: 44px 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    margin-bottom: 20px;
}

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

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

.player-card,
.detail-panel {
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(15, 23, 42, 0.07);
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(2, 6, 23, 0.5);
    cursor: pointer;
    z-index: 3;
}

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

.play-button {
    min-height: 58px;
    padding: 0 28px;
    font-size: 18px;
}

.detail-copy {
    padding: 24px;
}

.detail-copy h2,
.detail-panel h2 {
    margin: 0 0 14px;
    font-size: 25px;
}

.detail-copy p,
.detail-panel p {
    color: #334155;
    line-height: 1.95;
}

.detail-panel {
    padding: 22px;
}

.detail-poster {
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    margin-bottom: 18px;
    background: linear-gradient(135deg, #d1fae5, #ccfbf1);
}

.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.meta-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.meta-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.meta-list span {
    color: var(--muted);
}

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

.footer-grid {
    width: min(1200px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 28px;
}

.site-footer {
    margin-top: 56px;
    padding: 42px 0 24px;
    background: #ffffff;
    border-top: 1px solid var(--line);
}

.site-footer p {
    color: var(--muted);
    line-height: 1.8;
}

.site-footer h3 {
    margin: 0 0 14px;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.footer-links a {
    padding: 8px 12px;
    border-radius: 999px;
    color: #334155;
    background: #f1f5f9;
}

.footer-links a:hover {
    color: var(--brand);
    background: #ecfdf5;
}

.copyright {
    width: min(1200px, calc(100% - 32px));
    margin: 26px auto 0;
    padding-top: 18px;
    color: var(--muted);
    border-top: 1px solid var(--line);
}

.empty-state {
    display: none;
    padding: 34px;
    border-radius: var(--radius);
    text-align: center;
    color: var(--muted);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.empty-state.show {
    display: block;
}

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

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

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

@media (max-width: 780px) {
    .nav-menu,
    .watch-entry {
        display: none;
    }

    .menu-toggle {
        display: inline-grid;
        place-items: center;
    }

    .hero,
    .hero-content {
        min-height: 560px;
    }

    .hero-copy {
        padding-top: 60px;
    }

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

    .section-head,
    .page-hero {
        display: block;
    }

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

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

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

@media (max-width: 520px) {
    .header-inner,
    .main-wrap,
    .section,
    .page-hero,
    .detail-wrap,
    .filter-bar,
    .footer-grid,
    .copyright {
        width: min(100% - 24px, 1200px);
    }

    .brand-text {
        font-size: 18px;
    }

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

    .hero p {
        font-size: 16px;
    }

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

    .movie-grid,
    .related-grid {
        grid-template-columns: 1fr 1fr;
    }

    .movie-info {
        padding: 12px;
    }

    .movie-info h3 {
        font-size: 15px;
    }

    .rank-item {
        grid-template-columns: 38px 44px 1fr;
    }

    .rank-score {
        display: none;
    }
}
