:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #eef7ff;
    --text: #172033;
    --muted: #667085;
    --primary: #0891b2;
    --primary-dark: #0369a1;
    --accent: #f97316;
    --danger: #ef4444;
    --line: rgba(15, 23, 42, 0.1);
    --shadow: 0 22px 60px rgba(15, 23, 42, 0.14);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #dbeafe, #cffafe, #fed7aa);
}

img.image-missing {
    opacity: 0;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, #0f5ea8 0%, #0891b2 52%, #14b8a6 100%);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.16);
}

.topbar {
    display: flex;
    align-items: center;
    gap: 22px;
    min-height: 72px;
}

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

.brand-mark {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444);
    box-shadow: 0 10px 22px rgba(239, 68, 68, 0.35);
}

.brand-name {
    white-space: nowrap;
    font-size: 19px;
}

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

.desktop-nav a {
    font-weight: 700;
    opacity: 0.92;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(16px);
}

.header-search input {
    width: 210px;
    border: 0;
    outline: none;
    color: #ffffff;
    background: transparent;
    padding: 8px 10px;
}

.header-search input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.header-search button,
.big-search button,
.search-tool button {
    border: 0;
    cursor: pointer;
    color: #ffffff;
    font-weight: 800;
    border-radius: 999px;
    padding: 9px 18px;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-search button:hover,
.big-search button:hover,
.search-tool button:hover,
.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.28);
}

.menu-toggle {
    display: none;
    border: 0;
    color: #ffffff;
    cursor: pointer;
    font-size: 24px;
    border-radius: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.14);
}

.mobile-panel {
    display: none;
    padding: 0 16px 18px;
    background: rgba(3, 105, 161, 0.96);
}

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

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

.mobile-panel a {
    padding: 9px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
}

.hero {
    position: relative;
    height: min(760px, 72vh);
    min-height: 520px;
    overflow: hidden;
    color: #ffffff;
    background: #07111f;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

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

.hero-slide img {
    position: absolute;
    inset: 0;
    filter: saturate(1.08);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 78% 20%, rgba(20, 184, 166, 0.34), transparent 32%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.54) 48%, rgba(0, 0, 0, 0.05));
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    max-width: 1180px;
}

.hero-content h1 {
    max-width: 760px;
    margin: 16px 0;
    font-size: clamp(40px, 7vw, 82px);
    line-height: 1.03;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 680px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.86);
    font-size: clamp(18px, 2.2vw, 24px);
}

.hero-pill,
.eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    border-radius: 999px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
    background: linear-gradient(135deg, #f97316, #ef4444);
    padding: 8px 14px;
    text-transform: uppercase;
}

.eyebrow {
    color: var(--primary-dark);
    background: rgba(8, 145, 178, 0.1);
}

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

.hero-meta span {
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
}

.hero-meta--light span {
    color: var(--text);
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.72);
}

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

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

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
}

.primary-btn--small {
    min-height: 40px;
    padding: 0 18px;
}

.ghost-btn {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(14px);
}

.hero-controls {
    position: absolute;
    right: 0;
    bottom: 32px;
    left: 0;
    z-index: 4;
    display: flex;
    justify-content: flex-end;
}

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

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

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

.quick-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 24px;
    margin-top: -76px;
    position: relative;
    z-index: 6;
}

.quick-search-card,
.hot-entry,
.category-card-large,
.detail-copy,
.detail-side,
.video-shell {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.quick-search-card {
    padding: 30px;
}

.quick-search-card h2 {
    margin: 14px 0 18px;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.12;
}

.big-search,
.search-tool {
    display: flex;
    gap: 12px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
}

.big-search input,
.search-tool input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    padding: 0 14px;
    font-size: 16px;
    background: transparent;
}

.hot-entry {
    padding: 22px;
}

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

.section-heading--tight {
    margin-bottom: 14px;
}

.section-heading h2 {
    margin: 10px 0 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.15;
}

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

.text-link,
.hot-entry a {
    color: var(--primary-dark);
    font-weight: 900;
}

.hot-list,
.rank-list {
    display: grid;
    gap: 10px;
}

.hot-row,
.rank-line {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(8, 145, 178, 0.08);
    transition: transform 0.2s ease, background 0.2s ease;
}

.hot-row:hover,
.rank-line:hover {
    transform: translateX(4px);
    background: rgba(8, 145, 178, 0.14);
}

.hot-row b,
.rank-line b {
    color: var(--accent);
}

.hot-row small,
.rank-line small {
    color: var(--muted);
}

.content-section {
    padding: 64px 0 0;
}

.category-section {
    margin-top: 64px;
    padding: 64px 0;
    background: linear-gradient(135deg, #e0f2fe, #ecfeff);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #cffafe, #fed7aa);
}

.poster-link img {
    transition: transform 0.35s ease;
}

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

.poster-play,
.rank-badge {
    position: absolute;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.46);
    backdrop-filter: blur(10px);
}

.poster-play {
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
}

.rank-badge {
    top: 12px;
    left: 12px;
    min-width: 38px;
    height: 32px;
    padding: 0 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

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

.meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
}

.meta-line span {
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(2, 132, 199, 0.08);
}

.movie-card h3 {
    margin: 12px 0 8px;
    font-size: 18px;
    line-height: 1.3;
}

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

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

.tag-row span,
.detail-side dd span {
    display: inline-flex;
    margin: 0 6px 6px 0;
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--primary-dark);
    background: rgba(8, 145, 178, 0.1);
    font-size: 12px;
    font-weight: 800;
}

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

.category-tile {
    position: relative;
    min-height: 190px;
    overflow: hidden;
    border-radius: 22px;
    color: #ffffff;
    background: #0f172a;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.16);
}

.category-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.76));
}

.category-tile img {
    position: absolute;
    inset: 0;
    opacity: 0.8;
}

.category-tile span,
.category-tile small {
    position: absolute;
    right: 16px;
    left: 16px;
    z-index: 2;
}

.category-tile span {
    bottom: 48px;
    font-size: 20px;
    font-weight: 900;
}

.category-tile small {
    bottom: 18px;
    color: rgba(255, 255, 255, 0.78);
}

.page-shell {
    padding: 42px 0 70px;
}

.sub-hero {
    padding: 42px;
    border-radius: 30px;
    background:
        radial-gradient(circle at right top, rgba(20, 184, 166, 0.24), transparent 34%),
        linear-gradient(135deg, #ffffff, #eff6ff);
    box-shadow: var(--shadow);
}

.sub-hero h1 {
    margin: 16px 0 10px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.05;
}

.sub-hero p {
    max-width: 820px;
    color: var(--muted);
    font-size: 18px;
}

.category-large-grid {
    display: grid;
    gap: 22px;
    margin-top: 34px;
}

.category-card-large {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 24px;
    padding: 18px;
}

.category-card-cover {
    overflow: hidden;
    border-radius: 18px;
    aspect-ratio: 16 / 10;
}

.inline-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 14px 0 18px;
}

.inline-links a {
    color: var(--primary-dark);
    font-weight: 800;
}

.detail-hero {
    position: relative;
    overflow: hidden;
    color: #ffffff;
    background: #07111f;
}

.detail-bg,
.detail-bg-mask {
    position: absolute;
    inset: 0;
}

.detail-bg {
    opacity: 0.38;
    filter: blur(3px) saturate(1.2);
    transform: scale(1.04);
}

.detail-bg-mask {
    background:
        radial-gradient(circle at 80% 18%, rgba(20, 184, 166, 0.32), transparent 28%),
        linear-gradient(90deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.58));
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 36px;
    align-items: center;
    min-height: 560px;
    padding: 58px 0;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 24px;
    aspect-ratio: 3 / 4;
    box-shadow: 0 26px 60px rgba(0, 0, 0, 0.34);
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.74);
}

.detail-info h1 {
    margin: 16px 0;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.04;
}

.detail-info p {
    max-width: 780px;
    color: rgba(255, 255, 255, 0.84);
    font-size: 20px;
}

.player-section {
    padding-top: 56px;
}

.video-shell {
    position: relative;
    overflow: hidden;
    background: #020617;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    border: 0;
    cursor: pointer;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.68));
}

.play-overlay span {
    display: grid;
    width: 78px;
    height: 78px;
    place-items: center;
    border-radius: 50%;
    font-size: 28px;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 18px 38px rgba(37, 99, 235, 0.36);
}

.play-overlay.is-hidden {
    display: none;
}

.player-note {
    position: absolute;
    right: 18px;
    bottom: 14px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
}

.detail-text-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 24px;
    padding-top: 34px;
}

.detail-copy,
.detail-side {
    padding: 26px;
}

.detail-copy h2,
.detail-side h2 {
    margin: 12px 0;
}

.detail-copy p {
    color: #344054;
    font-size: 17px;
}

.detail-side dl {
    margin: 0;
}

.detail-side dt {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.detail-side dd {
    margin: 4px 0 15px;
    font-weight: 800;
}

.search-tool {
    max-width: 720px;
    margin-top: 20px;
}

.site-footer {
    margin-top: 72px;
    color: rgba(255, 255, 255, 0.78);
    background: #07111f;
}

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

.footer-brand {
    color: #ffffff;
}

.site-footer h3 {
    color: #ffffff;
    margin: 0 0 12px;
}

.site-footer a:not(.brand) {
    display: block;
    margin: 7px 0;
}

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

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

    .quick-panel,
    .detail-text-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

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

    .detail-hero-inner,
    .category-card-large {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 280px;
    }
}

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

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

    .hero {
        height: 640px;
        min-height: 640px;
    }

    .hero-content h1,
    .detail-info h1 {
        font-size: 38px;
    }

    .quick-panel {
        margin-top: -44px;
    }

    .big-search,
    .search-tool {
        flex-direction: column;
        border-radius: 22px;
    }

    .big-search input,
    .search-tool input {
        min-height: 44px;
    }

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

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

    .movie-card p {
        min-height: 42px;
        font-size: 13px;
    }

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

    .sub-hero {
        padding: 26px;
    }

    .hot-row,
    .rank-line {
        grid-template-columns: auto 1fr;
    }

    .hot-row small,
    .rank-line small {
        grid-column: 2;
    }
}
