:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --text: #1e293b;
    --muted: #64748b;
    --line: #e2e8f0;
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --accent: #38bdf8;
    --radius: 1rem;
    --shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.container {
    width: min(100% - 2rem, 1280px);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: linear-gradient(90deg, var(--slate-800), var(--slate-950));
    color: white;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.28);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.brand-icon {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--slate-300);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.08);
}

.brand-icon svg,
.header-search svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.brand-text {
    font-size: 1.45rem;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 1.4rem;
}

.nav-link,
.mobile-nav-link {
    color: var(--slate-300);
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    color: #ffffff;
}

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

.header-search {
    position: relative;
    width: min(30vw, 330px);
}

.header-search input,
.mobile-search input,
.filter-controls input,
.filter-controls select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 0.8rem;
    outline: none;
    color: var(--text);
    background: #ffffff;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.header-search input,
.mobile-search input {
    padding: 0.72rem 2.8rem 0.72rem 1rem;
    background: rgba(51, 65, 85, 0.92);
    color: white;
}

.header-search input::placeholder,
.mobile-search input::placeholder {
    color: #94a3b8;
}

.header-search button {
    position: absolute;
    right: 0.55rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    color: var(--slate-300);
    background: transparent;
}

.mobile-toggle {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.08);
    flex-direction: column;
    justify-content: center;
    gap: 0.28rem;
}

.mobile-toggle span {
    width: 1.2rem;
    height: 2px;
    margin: 0 auto;
    background: white;
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    padding: 1rem;
    background: var(--slate-900);
}

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

.mobile-panel nav {
    display: grid;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.mobile-search button,
.primary-button,
.ghost-button,
.section-more,
.filter-heading {
    border: 0;
    border-radius: 0.85rem;
    font-weight: 800;
}

.mobile-search button,
.primary-button {
    color: white;
    background: linear-gradient(135deg, var(--slate-700), var(--slate-950));
}

.mobile-search button {
    padding: 0.72rem 1rem;
}

.hero {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: var(--slate-950);
}

.hero-slide {
    display: none;
    min-height: 70vh;
    position: relative;
}

.hero-slide.is-active {
    display: block;
    animation: fadeIn 0.8s ease both;
}

.hero-image {
    position: absolute;
    inset: 0;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.05) contrast(1.02);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 35%, rgba(56, 189, 248, 0.18), transparent 28%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.92) 0%, rgba(15, 23, 42, 0.72) 45%, rgba(15, 23, 42, 0.28) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.9), rgba(2, 6, 23, 0.08));
}

.hero-content {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding: 5rem 0 8rem;
}

.hero-copy {
    max-width: 720px;
    color: white;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.85rem;
    margin-bottom: 1.2rem;
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
}

.hero h1 {
    font-size: clamp(2.4rem, 7vw, 5.2rem);
    line-height: 1;
    margin: 0 0 1.25rem;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero p {
    margin: 0;
    max-width: 680px;
    color: var(--slate-200);
    font-size: clamp(1rem, 2vw, 1.25rem);
    line-height: 1.85;
}

.hero-tags,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hero-tags {
    margin-top: 1.4rem;
}

.hero-tags span,
.tag-row span,
.info-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.85rem;
    color: #334155;
    background: #e2e8f0;
}

.hero-tags span {
    color: white;
    background: rgba(255, 255, 255, 0.16);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 2rem;
}

.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.9rem 1.35rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button:hover,
.ghost-button:hover,
.movie-card:hover,
.category-card:hover,
.rank-item:hover {
    transform: translateY(-4px);
}

.primary-button:hover {
    box-shadow: 0 20px 44px rgba(15, 23, 42, 0.35);
}

.ghost-button {
    color: white;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.hero-nav {
    position: absolute;
    left: 50%;
    bottom: 7rem;
    z-index: 5;
    transform: translateX(-50%);
    display: flex;
    gap: 0.6rem;
}

.hero-dot {
    width: 2.25rem;
    height: 0.28rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
}

.hero-dot.is-active {
    background: white;
}

.hero-thumb-row {
    position: relative;
    z-index: 6;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: -5rem;
    padding-bottom: 1.5rem;
}

.hero-thumb {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 0.95rem;
    padding: 0.55rem;
    color: white;
    text-align: left;
    background: rgba(15, 23, 42, 0.74);
    backdrop-filter: blur(14px);
}

.hero-thumb.is-active {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.42);
}

.hero-thumb img {
    width: 3.2rem;
    height: 4.15rem;
    border-radius: 0.65rem;
    object-fit: cover;
    background: var(--slate-800);
}

.hero-thumb span {
    overflow: hidden;
    font-weight: 750;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.section-block,
.page-hero,
.detail-hero {
    padding: 4rem 0;
}

.page-hero {
    color: white;
    background:
        radial-gradient(circle at 18% 20%, rgba(56, 189, 248, 0.16), transparent 28%),
        linear-gradient(135deg, var(--slate-800), var(--slate-950));
}

.page-hero h1,
.detail-title h1 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.6rem);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.page-hero p,
.detail-title p {
    max-width: 780px;
    margin: 1rem 0 0;
    color: var(--slate-200);
    line-height: 1.85;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.4rem;
}

.section-heading h2 {
    margin: 0;
    color: var(--slate-800);
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 900;
}

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

.section-more {
    padding: 0.7rem 1rem;
    color: white;
    background: var(--slate-800);
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
    gap: 1.2rem;
}

.movie-card,
.category-card,
.rank-item,
.info-panel,
.filter-panel,
.player-card,
.detail-card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.movie-card,
.category-card,
.rank-item {
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover,
.category-card:hover,
.rank-item:hover {
    box-shadow: 0 26px 54px rgba(15, 23, 42, 0.16);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, var(--slate-800), var(--slate-950));
}

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

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

.poster-type,
.poster-year {
    position: absolute;
    top: 0.7rem;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(10px);
}

.poster-type {
    left: 0.7rem;
}

.poster-year {
    right: 0.7rem;
}

.movie-card-body {
    padding: 0.95rem;
}

.movie-card h3,
.rank-content h3,
.detail-card h2,
.info-panel h2 {
    margin: 0;
    font-weight: 900;
    color: var(--slate-800);
}

.movie-card h3 {
    font-size: 1rem;
    line-height: 1.35;
}

.movie-card p,
.rank-content p,
.info-panel p,
.detail-card p {
    color: var(--muted);
    line-height: 1.72;
}

.movie-card p {
    min-height: 3.3rem;
    margin: 0.55rem 0;
    font-size: 0.9rem;
}

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.65rem 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.movie-meta-line span:not(:last-child)::after {
    content: "·";
    padding-left: 0.45rem;
    color: #94a3b8;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}

.category-card {
    display: block;
    padding: 1.25rem;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
}

.category-card span {
    display: block;
    margin-bottom: 0.65rem;
    color: var(--slate-800);
    font-size: 1.18rem;
    font-weight: 900;
}

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

.filter-panel {
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.filter-heading {
    display: inline-flex;
    margin-bottom: 0.9rem;
    padding: 0.45rem 0.7rem;
    color: white;
    background: var(--slate-800);
}

.filter-controls {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 0.75rem;
}

.filter-controls input,
.filter-controls select {
    padding: 0.78rem 0.9rem;
}

.rank-list {
    display: grid;
    gap: 0.85rem;
}

.rank-item {
    display: grid;
    grid-template-columns: 4rem 5.8rem 1fr;
    gap: 1rem;
    align-items: center;
    padding: 0.85rem;
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 1rem;
    color: white;
    font-weight: 900;
    background: linear-gradient(135deg, var(--slate-700), var(--slate-950));
}

.rank-thumb {
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 0.75rem;
    background: var(--slate-800);
}

.rank-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-hero {
    color: white;
    background:
        radial-gradient(circle at 20% 25%, rgba(56, 189, 248, 0.12), transparent 26%),
        linear-gradient(135deg, var(--slate-800), var(--slate-950));
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 1.2rem;
    color: var(--slate-300);
}

.breadcrumb a:hover {
    color: white;
}

.detail-title .info-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.detail-main {
    padding: 2rem 0 4rem;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.86fr);
    gap: 1.5rem;
    align-items: start;
}

.player-card,
.detail-card,
.info-panel {
    padding: 1rem;
}

.player-stage {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    background: #000000;
    aspect-ratio: 16 / 9;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    color: white;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.72));
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.play-core {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.95rem 1.25rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.76);
    box-shadow: 0 22px 50px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(14px);
}

.play-core svg {
    width: 1.5rem;
    height: 1.5rem;
    fill: currentColor;
}

.detail-card {
    margin-top: 1rem;
}

.detail-card h2,
.info-panel h2 {
    margin-bottom: 0.8rem;
    font-size: 1.35rem;
}

.detail-card p {
    margin: 0 0 1rem;
}

.side-poster {
    overflow: hidden;
    border-radius: 1rem;
    background: var(--slate-800);
    aspect-ratio: 3 / 4;
}

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

.side-meta {
    display: grid;
    gap: 0.7rem;
    margin-top: 1rem;
}

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

.side-meta strong {
    color: var(--slate-800);
}

.empty-state {
    display: none;
    padding: 2rem;
    color: var(--muted);
    text-align: center;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

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

.site-footer {
    color: var(--slate-300);
    background: var(--slate-950);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    padding: 2.5rem 0;
}

.footer-brand {
    color: white;
    font-size: 1.4rem;
}

.site-footer p {
    max-width: 620px;
    margin: 0.75rem 0 0;
    line-height: 1.8;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    gap: 0.8rem 1.4rem;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    padding: 1rem;
    text-align: center;
    color: #94a3b8;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(1.01);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

    .mobile-toggle {
        display: flex;
    }

    .hero-thumb-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: -3rem;
    }

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

@media (max-width: 640px) {
    .container {
        width: min(100% - 1rem, 1280px);
    }

    .header-inner {
        min-height: 64px;
    }

    .brand-text {
        font-size: 1.2rem;
    }

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

    .hero-content {
        padding: 4rem 0 7rem;
    }

    .hero-thumb-row {
        display: none;
    }

    .hero-nav {
        bottom: 2rem;
    }

    .section-block,
    .page-hero,
    .detail-hero {
        padding: 2.6rem 0;
    }

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

    .movie-card-body {
        padding: 0.75rem;
    }

    .rank-item {
        grid-template-columns: 3.4rem 4.2rem 1fr;
        gap: 0.75rem;
    }

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

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