:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --text: #111827;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #2563eb;
    --brand-deep: #1d4ed8;
    --accent: #f97316;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input {
    font: inherit;
}

.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);
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(18px);
}

.nav-shell {
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.brand-mark {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand), #7c3aed);
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.35);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
    color: #334155;
    font-size: 15px;
    font-weight: 700;
}

.main-nav a {
    position: relative;
    padding: 8px 0;
}

.main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    height: 2px;
    border-radius: 999px;
    background: var(--brand);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

.main-nav a:hover::after {
    transform: scaleX(1);
}

.top-search {
    width: 260px;
    display: flex;
    align-items: center;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
}

.top-search input,
.wide-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
}

.top-search input {
    padding: 8px 10px;
}

.top-search button,
.wide-search button,
.primary-button,
.ghost-button,
.watch-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search button,
.wide-search button,
.primary-button,
.watch-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-deep));
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}

.top-search button {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
}

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

.hero {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    background: #0f172a;
}

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: -28px;
    background-image: var(--hero-bg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    filter: blur(22px) brightness(0.48);
    transform: scale(1.08);
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.72) 48%, rgba(15, 23, 42, 0.22) 100%), linear-gradient(0deg, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.1));
}

.hero-inner {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 70vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 54px;
    padding: 82px 0 118px;
}

.hero-kicker,
.eyebrow {
    margin: 0 0 12px;
    color: #60a5fa;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 760px;
    margin: 0;
    color: #ffffff;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-summary {
    max-width: 740px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
}

.hero-meta,
.detail-meta,
.badge-row,
.filter-bar,
.tag-cloud,
.hero-actions,
.footer-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-meta {
    margin-top: 22px;
}

.hero-meta span,
.detail-meta span,
.badge-row span,
.tag-cloud span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.hero-meta span {
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.16);
}

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

.primary-button,
.ghost-button,
.watch-button {
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
}

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

.primary-button:hover,
.ghost-button:hover,
.watch-button:hover,
.wide-search button:hover,
.top-search button:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.45);
    transform: rotate(2deg);
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: inherit;
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

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

.hero-arrow,
.hero-dot {
    border: 0;
    cursor: pointer;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    font-size: 30px;
    line-height: 1;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    padding: 0;
    border-radius: 999px;
}

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

.hero-thumbs {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 36px;
    z-index: 5;
    display: flex;
    gap: 12px;
}

.hero-thumb {
    width: 96px;
    overflow: hidden;
    border-radius: 18px;
    opacity: 0.72;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.hero-thumb.is-active {
    opacity: 1;
    outline: 3px solid rgba(255, 255, 255, 0.7);
}

.hero-thumb img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.hero-thumb span {
    display: block;
    padding: 7px;
    color: #ffffff;
    overflow: hidden;
    font-size: 12px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.search-panel {
    position: relative;
    z-index: 8;
    margin-top: -38px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 480px);
    align-items: center;
    gap: 24px;
    padding: 28px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.search-panel h2,
.section-heading h2,
.page-hero h1,
.detail-copy h1,
.detail-content h2 {
    margin: 0;
    color: #0f172a;
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.search-panel h2,
.section-heading h2 {
    font-size: clamp(26px, 4vw, 38px);
}

.search-panel p,
.section-heading p,
.page-hero p,
.detail-content p,
.movie-card-body p,
.rank-card p,
.category-overview-card p {
    color: var(--muted);
}

.wide-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
}

.wide-search input {
    padding: 12px 14px;
}

.wide-search button {
    min-height: 46px;
    padding: 0 20px;
    border-radius: 999px;
    white-space: nowrap;
}

.category-strip,
.content-section {
    padding: 72px 0 0;
}

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

.compact-heading {
    align-items: center;
}

.section-more,
.text-link {
    color: var(--brand-deep);
    font-weight: 900;
}

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

.category-card {
    position: relative;
    min-height: 220px;
    overflow: hidden;
    padding: 20px;
    border-radius: var(--radius);
    color: #ffffff;
    background: linear-gradient(145deg, #0f172a, #1e293b);
    box-shadow: var(--shadow);
}

.category-card strong,
.category-card em {
    position: relative;
    z-index: 2;
    display: block;
}

.category-card strong {
    font-size: 22px;
    font-style: normal;
    font-weight: 900;
}

.category-card em {
    max-width: 92%;
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 13px;
    font-style: normal;
}

.category-card img {
    position: absolute;
    right: -16px;
    bottom: -26px;
    width: 112px;
    height: 150px;
    object-fit: cover;
    border-radius: 18px;
    transform: rotate(10deg);
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.28);
}

.category-glow {
    position: absolute;
    inset: auto -35% -55% auto;
    width: 180px;
    height: 180px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.75), rgba(37, 99, 235, 0));
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.14);
}

.poster-link {
    position: relative;
    display: block;
    overflow: hidden;
    background: #e2e8f0;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.play-chip {
    position: absolute;
    left: 14px;
    bottom: 14px;
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    padding: 0 13px;
    color: #ffffff;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(10px);
    font-size: 13px;
    font-weight: 900;
}

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

.badge-row {
    gap: 6px;
}

.badge-row span,
.detail-meta span,
.tag-cloud span {
    color: #1e3a8a;
    background: #dbeafe;
}

.small-badges span {
    min-height: 24px;
    font-size: 12px;
}

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

.movie-card-body p {
    min-height: 3.2em;
    margin: 0 0 14px;
    font-size: 14px;
}

.page-main,
.detail-main {
    padding: 34px 0 80px;
}

.page-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 460px);
    align-items: center;
    gap: 26px;
    margin-bottom: 34px;
    padding: 40px;
    border-radius: 30px;
    color: #ffffff;
    background: radial-gradient(circle at top right, rgba(96, 165, 250, 0.5), transparent 32%), linear-gradient(135deg, #0f172a, #1d4ed8);
    box-shadow: var(--shadow);
}

.slim-hero {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
}

.page-hero h1 {
    color: #ffffff;
    font-size: clamp(36px, 6vw, 58px);
}

.page-hero p {
    max-width: 740px;
    color: rgba(255, 255, 255, 0.78);
}

.filter-bar {
    margin: 0 0 24px;
}

.filter-button {
    min-height: 36px;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    cursor: pointer;
    color: #334155;
    background: #ffffff;
    font-weight: 900;
}

.filter-button.is-active {
    color: #ffffff;
    border-color: var(--brand);
    background: var(--brand);
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 22px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.07);
}

.category-cover img {
    width: 160px;
    height: 214px;
    border-radius: 18px;
    object-fit: cover;
}

.mini-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
}

.mini-links a {
    padding: 6px 10px;
    color: #1e3a8a;
    border-radius: 999px;
    background: #eff6ff;
    font-size: 13px;
    font-weight: 800;
}

.ranking-list {
    display: grid;
    gap: 16px;
}

.rank-card {
    display: grid;
    grid-template-columns: 58px 100px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.rank-num {
    width: 48px;
    height: 48px;
    display: inline-grid;
    place-items: center;
    color: #ffffff;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent), #ef4444);
    font-size: 22px;
    font-weight: 1000;
}

.rank-poster img {
    width: 100px;
    height: 132px;
    border-radius: 14px;
    object-fit: cover;
}

.rank-card h2 {
    margin: 10px 0 6px;
    font-size: 22px;
}

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

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

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

.detail-poster img {
    width: 300px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 26px;
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.18);
}

.detail-copy h1 {
    font-size: clamp(34px, 6vw, 62px);
}

.lead {
    margin: 18px 0;
    color: #475569;
    font-size: 19px;
}

.detail-meta,
.tag-cloud {
    margin: 18px 0;
}

.player-section {
    margin-top: 34px;
    padding: 20px;
    border-radius: 30px;
    background: #0f172a;
    box-shadow: var(--shadow);
}

.player-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #020617;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
    padding: 0;
    border: 0;
    cursor: pointer;
    color: #ffffff;
    background: #020617;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.42);
}

.play-large {
    position: relative;
    z-index: 2;
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.92);
    box-shadow: 0 20px 44px rgba(37, 99, 235, 0.35);
    font-size: 34px;
}

.player-cover strong {
    position: relative;
    z-index: 2;
    margin-top: 126px;
    font-size: 22px;
}

.player-wrap.is-playing .player-cover {
    display: none;
}

.watch-button {
    margin-top: 18px;
}

.detail-content {
    margin-top: 34px;
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: #ffffff;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.06);
}

.detail-content h2 {
    margin-top: 18px;
    font-size: 30px;
}

.detail-content h2:first-child {
    margin-top: 0;
}

.detail-content p {
    font-size: 17px;
}

.related-section {
    width: 100%;
}

.site-footer {
    margin-top: 80px;
    color: #cbd5e1;
    background: #0f172a;
}

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

.footer-brand {
    color: #ffffff;
    font-size: 22px;
    font-weight: 1000;
}

.footer-links {
    margin: 18px 0;
}

.footer-links a {
    color: #e2e8f0;
    font-weight: 800;
}

.copyright {
    color: #94a3b8;
    font-size: 14px;
}

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

.no-result-note {
    padding: 26px;
    border-radius: var(--radius);
    color: #475569;
    background: #f8fafc;
    text-align: center;
    font-weight: 800;
}

@media (max-width: 1060px) {
    .top-search {
        display: none;
    }

    .hero-inner {
        grid-template-columns: minmax(0, 1fr) 280px;
    }

    .hero-thumbs {
        display: none;
    }

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

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

@media (max-width: 820px) {
    .nav-shell {
        min-height: 64px;
        flex-wrap: wrap;
    }

    .nav-toggle {
        display: block;
    }

    .main-nav {
        width: 100%;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 0 0 16px;
    }

    .site-header.is-open .main-nav {
        display: flex;
    }

    .hero-inner,
    .search-panel,
    .page-hero,
    .detail-hero,
    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .hero-inner {
        padding-top: 58px;
        gap: 28px;
    }

    .hero-poster {
        max-width: 220px;
        transform: none;
    }

    .search-panel {
        margin-top: 18px;
    }

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

    .section-heading {
        align-items: start;
        flex-direction: column;
    }

    .detail-poster img,
    .category-cover img {
        width: 100%;
        max-width: 280px;
    }

    .rank-card {
        grid-template-columns: 48px 76px minmax(0, 1fr);
    }

    .rank-poster img {
        width: 76px;
        height: 104px;
    }
}

@media (max-width: 560px) {
    .nav-shell,
    .search-panel,
    .content-section,
    .category-strip,
    .page-main,
    .detail-main,
    .footer-shell {
        width: min(100% - 22px, 1180px);
    }

    .brand {
        font-size: 18px;
    }

    .hero {
        min-height: 86vh;
    }

    .hero-inner {
        min-height: 86vh;
    }

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

    .wide-search {
        align-items: stretch;
        flex-direction: column;
        border-radius: 24px;
    }

    .wide-search button {
        width: 100%;
    }

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

    .page-hero,
    .detail-hero,
    .detail-content,
    .player-section,
    .search-panel {
        padding: 22px;
        border-radius: 22px;
    }

    .rank-card {
        grid-template-columns: 1fr;
    }

    .rank-num {
        width: 42px;
        height: 42px;
    }
}
