:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #eef7ff;
    --text: #111827;
    --muted: #64748b;
    --line: #e5e7eb;
    --brand: #0ea5e9;
    --brand-dark: #0369a1;
    --accent: #2563eb;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: blur(16px);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    height: 68px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #0f172a;
}

.brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    color: #ffffff;
    font-size: 15px;
    box-shadow: 0 10px 25px rgba(14, 165, 233, 0.36);
}

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

.site-menu a {
    padding: 10px 14px;
    border-radius: 999px;
    color: #475569;
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease;
}

.site-menu a:hover,
.site-menu a.active {
    color: var(--brand-dark);
    background: #e0f2fe;
}

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

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

.hero-carousel {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    background: #020617;
}

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

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

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.68) 44%, rgba(15, 23, 42, 0.12));
}

.hero-content {
    position: absolute;
    z-index: 2;
    left: max(32px, calc((100% - 1180px) / 2));
    top: 50%;
    width: min(650px, calc(100% - 64px));
    transform: translateY(-50%);
    color: #ffffff;
}

.eyebrow {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: #0284c7;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.eyebrow.dark {
    background: #dbeafe;
    color: #1d4ed8;
}

.hero-content h1,
.page-hero h1,
.detail-info h1 {
    margin: 18px 0 16px;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.055em;
}

.hero-content p,
.page-hero p,
.search-panel p,
.section-heading p,
.category-card p,
.detail-block p,
.footer-shell p {
    color: var(--muted);
    line-height: 1.75;
}

.hero-content p {
    max-width: 620px;
    color: #dbeafe;
    font-size: 18px;
}

.hero-tags,
.detail-meta,
.tag-row,
.category-chips,
.hero-actions,
.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags span,
.detail-meta span,
.detail-meta a,
.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 700;
}

.tag-row span {
    background: #eff6ff;
    color: #1d4ed8;
}

.hero-actions {
    margin-top: 28px;
}

.primary-button,
.ghost-button,
.section-more a,
.category-card span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.section-more a,
.category-card span {
    background: linear-gradient(135deg, var(--brand), var(--accent));
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

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

.primary-button:hover,
.ghost-button:hover,
.section-more a:hover,
.category-card a:hover span {
    transform: translateY(-2px);
}

.hero-controls {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 28px;
    display: flex;
    align-items: center;
    gap: 18px;
    transform: translateX(-50%);
}

.hero-arrow,
.hero-dot {
    border: 0;
    cursor: pointer;
}

.hero-arrow {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 28px;
    line-height: 1;
    backdrop-filter: blur(12px);
}

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

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

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

.search-panel,
.content-section,
.page-hero,
.category-overview,
.detail-main,
.site-footer {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.search-panel {
    margin-top: -56px;
    position: relative;
    z-index: 5;
    padding: 28px;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
    gap: 22px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.search-panel h2 {
    margin: 14px 0 8px;
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.search-box input {
    width: 100%;
    min-height: 54px;
    padding: 0 18px;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    outline: none;
    background: #ffffff;
    color: #0f172a;
    font-size: 15px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.search-box input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.16);
}

.category-chips {
    grid-column: 1 / -1;
}

.category-chips a {
    padding: 9px 14px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-weight: 700;
    transition: color 0.2s ease, background 0.2s ease;
}

.category-chips a:hover {
    background: #dbeafe;
    color: #1d4ed8;
}

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

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

.section-heading h2 {
    margin: 0 0 8px;
    font-size: clamp(26px, 4vw, 38px);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-heading p {
    margin: 0;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(14, 165, 233, 0.45);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
}

.movie-poster {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #e2e8f0;
}

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

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

.poster-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.74);
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    backdrop-filter: blur(8px);
}

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

.movie-meta-line {
    display: flex;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.movie-card h3 {
    min-height: 52px;
    margin: 8px 0;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
    letter-spacing: -0.025em;
}

.movie-card p {
    min-height: 48px;
    margin: 0 0 14px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.65;
}

.movie-card-wide {
    display: grid;
    grid-template-columns: 38% 1fr;
}

.movie-card-wide .movie-poster {
    aspect-ratio: 3 / 4;
}

.movie-card-wide .movie-card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.section-more {
    margin-top: 26px;
    text-align: center;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 42px 56px 1fr;
    align-items: center;
    gap: 12px;
    min-height: 84px;
    padding: 12px;
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: 18px;
    background: #ffffff;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-3px);
    border-color: rgba(14, 165, 233, 0.5);
}

.rank-number {
    font-size: 22px;
    font-weight: 900;
    color: #0ea5e9;
}

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

.rank-text {
    min-width: 0;
}

.rank-text strong,
.rank-text em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-text strong {
    font-weight: 900;
}

.rank-text em {
    margin-top: 4px;
    color: #64748b;
    font-size: 13px;
    font-style: normal;
}

.page-main {
    padding-bottom: 72px;
}

.page-hero {
    margin-top: 36px;
    padding: 54px;
    border-radius: 28px;
    background: radial-gradient(circle at 18% 20%, rgba(14, 165, 233, 0.22), transparent 30%), linear-gradient(135deg, #0f172a, #1e293b 52%, #0c4a6e);
    color: #ffffff;
    box-shadow: var(--shadow);
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: #dbeafe;
    font-size: 17px;
}

.page-search {
    max-width: 520px;
    margin-top: 28px;
}

.category-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    padding-top: 42px;
}

.category-card a {
    display: block;
    height: 100%;
    padding: 18px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.category-cover {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.category-cover img {
    height: 124px;
    width: 100%;
    border-radius: 14px;
    object-fit: cover;
}

.category-card h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 900;
}

.category-card p {
    min-height: 76px;
    margin: 0 0 18px;
}

.detail-main {
    padding: 28px 0 72px;
}

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

.breadcrumb a {
    color: #0369a1;
    font-weight: 700;
}

.detail-hero {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 34px;
    padding: 30px;
    border-radius: 28px;
    background: linear-gradient(135deg, #ffffff, #eef7ff);
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 22px;
    object-fit: cover;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.22);
}

.detail-info {
    align-self: center;
}

.detail-info h1 {
    color: #0f172a;
}

.lead-text {
    max-width: 760px;
    margin: 0 0 22px;
    color: #334155;
    font-size: 18px;
    line-height: 1.8;
}

.detail-meta span,
.detail-meta a {
    background: #e0f2fe;
    color: #075985;
}

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

.player-section {
    margin-top: 34px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.22);
}

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 28px;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.16), rgba(2, 6, 23, 0.82));
    color: #ffffff;
    text-align: center;
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-icon {
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 36px;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(12px);
}

.player-cover strong {
    font-size: clamp(24px, 4vw, 44px);
    font-weight: 900;
    letter-spacing: -0.04em;
}

.player-cover em {
    max-width: 680px;
    color: #dbeafe;
    font-style: normal;
    line-height: 1.7;
}

.detail-content {
    display: grid;
    gap: 20px;
    margin-top: 34px;
}

.detail-block {
    padding: 26px;
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: 24px;
    background: #ffffff;
}

.detail-block h2 {
    margin: 0 0 12px;
    font-size: 24px;
    font-weight: 900;
}

.detail-block p {
    margin: 0;
    color: #334155;
    font-size: 16px;
}

.site-footer {
    padding: 52px 0 42px;
}

.footer-shell {
    padding: 28px;
    border-radius: 24px;
    background: #0f172a;
    color: #ffffff;
}

.footer-shell p {
    max-width: 680px;
    color: #cbd5e1;
}

.footer-links a {
    color: #dbeafe;
    font-weight: 700;
}

.footer-shell small {
    display: block;
    margin-top: 18px;
    color: #94a3b8;
}

.movie-card.is-hidden,
.rank-item.is-hidden {
    display: none;
}

.no-results {
    grid-column: 1 / -1;
    padding: 30px;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    background: #ffffff;
    color: #64748b;
    text-align: center;
}

@media (max-width: 980px) {
    .search-panel,
    .detail-hero {
        grid-template-columns: 1fr;
    }

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

    .rank-list,
    .mini-rank {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 720px) {
    .nav-shell {
        height: auto;
        min-height: 64px;
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .menu-toggle {
        display: block;
    }

    .site-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding: 8px 0;
    }

    .site-menu.is-open {
        display: flex;
    }

    .site-menu a {
        border-radius: 14px;
    }

    .hero-carousel {
        min-height: 620px;
    }

    .hero-content {
        top: 48%;
    }

    .search-panel,
    .page-hero,
    .detail-hero,
    .detail-block {
        padding: 22px;
    }

    .movie-grid,
    .compact-grid,
    .wide-grid,
    .category-overview {
        grid-template-columns: 1fr;
    }

    .movie-card-wide {
        display: block;
    }

    .category-cover img {
        height: 92px;
    }

    .hero-controls {
        bottom: 18px;
    }
}
