:root {
    --page-bg: #f8fafc;
    --text-main: #172033;
    --text-muted: #657188;
    --brand: #0f766e;
    --brand-2: #0891b2;
    --brand-3: #f59e0b;
    --surface: #ffffff;
    --surface-soft: #ecfeff;
    --line: rgba(15, 23, 42, 0.10);
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text-main);
    background: var(--page-bg);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(115deg, #0f766e, #0891b2);
    box-shadow: 0 12px 32px rgba(8, 145, 178, 0.24);
}

.header-inner {
    height: 68px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #111827;
    background: linear-gradient(135deg, #fde68a, #f59e0b);
    border-radius: 12px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.55);
}

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

.nav a,
.nav button {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 700;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.nav a:hover,
.nav button:hover {
    color: #fde68a;
}

.dropdown {
    position: relative;
}

.dropdown-panel {
    position: absolute;
    right: 0;
    top: 34px;
    width: 220px;
    padding: 10px;
    visibility: hidden;
    opacity: 0;
    transform: translateY(8px);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
    transition: 0.2s ease;
}

.dropdown:hover .dropdown-panel,
.dropdown:focus-within .dropdown-panel {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-panel a {
    display: block;
    padding: 10px 12px;
    color: #1f2937;
    border-radius: 12px;
}

.dropdown-panel a:hover {
    color: var(--brand);
    background: #ecfeff;
}

.header-search {
    width: 260px;
    position: relative;
}

.header-search input,
.local-search input {
    width: 100%;
    border: 0;
    outline: 0;
    color: #1f2937;
    background: #ffffff;
    border-radius: 999px;
    padding: 11px 44px 11px 18px;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.header-search button,
.local-search button {
    position: absolute;
    right: 6px;
    top: 6px;
    width: 34px;
    height: 34px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    border-radius: 999px;
    cursor: pointer;
}

.mobile-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    padding: 10px 12px;
}

.mobile-menu {
    display: none;
    padding: 0 0 18px;
}

.mobile-menu a {
    display: block;
    padding: 10px 0;
    color: rgba(255, 255, 255, 0.93);
    font-weight: 700;
}

.hero {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    color: #ffffff;
    background: radial-gradient(circle at 18% 20%, rgba(245, 158, 11, 0.75), transparent 32%), linear-gradient(120deg, #f97316, #e11d48 48%, #0f766e);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
    gap: 44px;
    align-items: center;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    opacity: 0;
    pointer-events: none;
    transform: translateX(26px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.18));
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-top: 36px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 13px;
    border-radius: 999px;
    color: #fff7ed;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    font-size: 14px;
    font-weight: 800;
}

.hero h1,
.hero h2 {
    margin: 18px 0 16px;
    font-size: clamp(40px, 5.6vw, 68px);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.hero h2 {
    font-size: clamp(34px, 4.8vw, 58px);
}

.hero p {
    max-width: 720px;
    margin: 0 0 26px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 19px;
    line-height: 1.75;
}

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

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

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.22);
}

.btn-primary {
    color: #be123c;
    background: #ffffff;
}

.btn-secondary {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.hero-poster {
    position: relative;
    z-index: 2;
    border-radius: 34px;
    overflow: hidden;
    box-shadow: 0 38px 70px rgba(15, 23, 42, 0.42);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.04));
    aspect-ratio: 16 / 10;
}

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

.hero-poster-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 28px;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.88), transparent);
}

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

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

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

.section {
    padding: 58px 0;
}

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

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

.section-title {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 950;
    letter-spacing: -0.03em;
}

.section-desc {
    margin: 8px 0 0;
    color: var(--text-muted);
}

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

.movie-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    color: inherit;
    overflow: hidden;
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #ccfbf1, #cffafe);
}

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

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

.poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(15, 23, 42, 0.65));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.movie-card:hover .poster::after {
    opacity: 1;
}

.badge,
.rank-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    color: #ffffff;
    background: #f97316;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 900;
}

.rank-badge {
    left: 12px;
    right: auto;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.card-body {
    padding: 16px;
}

.card-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 900;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta,
.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: var(--text-muted);
    font-size: 13px;
}

.card-desc {
    margin: 10px 0 0;
    color: var(--text-muted);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    color: #0f766e;
    background: #ccfbf1;
    font-size: 12px;
    font-weight: 800;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 150px;
    color: #ffffff;
    padding: 24px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #0f766e, #0891b2 60%, #f59e0b);
    box-shadow: 0 16px 36px rgba(8, 145, 178, 0.2);
}

.category-card::after {
    content: "";
    position: absolute;
    right: -28px;
    bottom: -36px;
    width: 128px;
    height: 128px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

.category-card h3 {
    position: relative;
    z-index: 1;
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 950;
}

.category-card p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.7;
}

.page-hero {
    padding: 72px 0;
    color: #ffffff;
    background: linear-gradient(135deg, #0891b2, #0f766e 58%, #f59e0b);
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(36px, 5vw, 58px);
    font-weight: 950;
    letter-spacing: -0.04em;
}

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

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding: 18px;
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}

.local-search {
    position: relative;
    width: min(420px, 100%);
}

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

.chip {
    border: 0;
    color: #0f766e;
    background: #ccfbf1;
    border-radius: 999px;
    padding: 9px 13px;
    font-weight: 800;
    cursor: pointer;
}

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

.detail-hero {
    padding: 34px 0 54px;
    background: radial-gradient(circle at 18% 0, rgba(245, 158, 11, 0.18), transparent 34%), linear-gradient(180deg, #0f172a, #111827 72%, #f8fafc 72%);
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
}

.breadcrumbs a {
    color: #fde68a;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    background: #000000;
    border-radius: 28px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.35);
    cursor: pointer;
}

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.72));
}

.player-shell.is-playing .player-overlay {
    display: none;
}

.play-button {
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #e11d48);
    border-radius: 999px;
    font-size: 34px;
    cursor: pointer;
    box-shadow: 0 20px 40px rgba(225, 29, 72, 0.38);
}

.detail-card,
.content-card {
    background: #ffffff;
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.detail-card {
    overflow: hidden;
}

.detail-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: linear-gradient(135deg, #ccfbf1, #cffafe);
}

.detail-card-body {
    padding: 20px;
}

.detail-card h1 {
    margin: 0 0 14px;
    color: #111827;
    font-size: 28px;
    line-height: 1.25;
    font-weight: 950;
}

.content-card {
    padding: 28px;
    margin-top: 28px;
}

.content-card h2 {
    margin: 0 0 14px;
    font-size: 25px;
    font-weight: 950;
}

.content-card p {
    color: #334155;
    line-height: 1.9;
    font-size: 17px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.tag {
    color: #1d4ed8;
    background: #dbeafe;
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 800;
    font-size: 13px;
}

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

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

.rank-row {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 16px;
    align-items: center;
    color: inherit;
    padding: 12px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
}

.rank-row img {
    width: 88px;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 14px;
    background: linear-gradient(135deg, #ccfbf1, #cffafe);
}

.rank-row h3 {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 950;
}

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

.empty-state {
    display: none;
    padding: 48px 20px;
    text-align: center;
    color: var(--text-muted);
}

.empty-state.is-visible {
    display: block;
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(180deg, #1f2937, #111827);
    padding: 48px 0 36px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 28px;
}

.site-footer h2,
.site-footer h3 {
    color: #ffffff;
    margin: 0 0 14px;
    font-weight: 950;
}

.site-footer p,
.site-footer a {
    color: #cbd5e1;
    line-height: 1.8;
}

.site-footer a:hover {
    color: #fbbf24;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin-top: 28px;
    padding-top: 22px;
    color: #94a3b8;
    text-align: center;
}

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

    .mobile-toggle {
        display: inline-flex;
    }

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

    .hero {
        min-height: 720px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 24px;
    }

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

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

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

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

    .header-inner {
        height: 62px;
    }

    .logo {
        font-size: 20px;
    }

    .hero {
        min-height: 760px;
    }

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

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

    .section-head,
    .toolbar {
        align-items: stretch;
        flex-direction: column;
    }

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

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