:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #eef6ff;
    --text: #0f172a;
    --muted: #64748b;
    --line: #dbe7f3;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --blue-soft: #dbeafe;
    --cyan: #06b6d4;
    --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 34rem), var(--bg);
    line-height: 1.65;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(219, 231, 243, 0.9);
}

.header-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    min-height: 74px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.logo-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.32);
}

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

.nav-link,
.mobile-nav a {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    color: #334155;
    border-radius: 999px;
    transition: 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav a:hover {
    color: var(--blue-dark);
    background: var(--blue-soft);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-button {
    border: 0;
    cursor: pointer;
    background: transparent;
}

.nav-dropdown-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 220px;
    padding: 10px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: 0.2s ease;
}

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

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

.nav-dropdown-panel a:hover {
    color: var(--blue-dark);
    background: var(--surface-soft);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 270px;
}

.header-search input {
    width: 100%;
    height: 40px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 999px;
    outline: 0;
    background: #ffffff;
}

.header-search input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.header-search button,
.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 20px;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    font-weight: 700;
    transition: 0.22s ease;
}

.header-search button,
.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 16px 30px rgba(37, 99, 235, 0.28);
}

.header-search button:hover,
.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 38px rgba(37, 99, 235, 0.34);
}

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

.ghost-button:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-2px);
}

.mobile-menu-button {
    display: none;
    margin-left: auto;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: var(--surface-soft);
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: #1e293b;
}

.mobile-nav {
    display: none;
    padding: 10px 18px 18px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.mobile-nav.is-open {
    display: grid;
    gap: 8px;
}

.hero-slider {
    position: relative;
    min-height: 650px;
    overflow: hidden;
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
    background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.22) 100%), var(--hero-image);
    background-size: cover;
    background-position: center;
}

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

.hero-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 22% 50%, rgba(37, 99, 235, 0.35), transparent 28rem);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    max-width: 760px;
    color: #ffffff;
}

.hero-kicker,
.section-heading p,
.page-hero p,
.category-overview-heading p,
.detail-kicker {
    margin: 0 0 12px;
    color: #60a5fa;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    font-weight: 800;
}

.hero-content h1,
.hero-content h2 {
    margin: 0;
    max-width: 780px;
    font-size: clamp(2.8rem, 8vw, 5.8rem);
    line-height: 0.98;
    letter-spacing: -0.07em;
}

.hero-summary {
    max-width: 690px;
    margin: 24px 0 0;
    color: #dbeafe;
    font-size: clamp(1rem, 2.5vw, 1.25rem);
}

.hero-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags {
    margin: 26px 0 0;
}

.hero-tags span,
.tag-list span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.hero-tags span {
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.tag-list span {
    color: var(--blue-dark);
    background: var(--blue-soft);
}

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

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

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

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

.feature-strip,
.section-block,
.page-main,
.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin-left: auto;
    margin-right: auto;
}

.feature-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-top: -44px;
    position: relative;
    z-index: 10;
}

.feature-item {
    padding: 24px;
    color: #ffffff;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #1d4ed8, #06b6d4);
    box-shadow: var(--shadow);
}

.feature-item strong {
    display: block;
    font-size: 1.25rem;
}

.feature-item span {
    color: #dbeafe;
}

.section-block {
    padding: 72px 0 0;
}

.surface-section {
    width: 100%;
    padding-left: max(16px, calc((100vw - 1180px) / 2));
    padding-right: max(16px, calc((100vw - 1180px) / 2));
}

.section-narrow {
    width: 100%;
}

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

.section-heading h2,
.category-overview-heading h2,
.page-hero h1,
.detail-section h2 {
    margin: 0;
    color: #0f172a;
    letter-spacing: -0.04em;
}

.section-heading h2,
.category-overview-heading h2 {
    font-size: clamp(1.8rem, 4vw, 3rem);
}

.section-heading a,
.category-overview-heading a {
    color: var(--blue-dark);
    font-weight: 800;
}

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

.category-card,
.category-overview-card,
.movie-card,
.ranking-card,
.detail-section,
.filter-panel,
.player-shell,
.movie-detail-hero {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.07);
}

.category-card,
.category-overview-card,
.movie-card,
.ranking-card,
.detail-section,
.filter-panel,
.movie-detail-hero {
    border-radius: var(--radius);
}

.category-card {
    padding: 22px;
    min-height: 220px;
}

.category-main-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #0f172a;
    font-size: 1.12rem;
    font-weight: 900;
}

.category-main-link strong {
    color: var(--blue-dark);
    font-size: 0.82rem;
}

.category-card p,
.category-overview-intro {
    color: var(--muted);
}

.category-preview-links {
    display: grid;
    gap: 7px;
    margin-top: 14px;
}

.category-preview-links a {
    color: #334155;
    font-size: 0.92rem;
}

.category-preview-links a:hover {
    color: var(--blue-dark);
}

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

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

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

.movie-card {
    overflow: hidden;
    transition: 0.22s ease;
}

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

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

.poster-link img,
.ranking-poster img,
.detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s ease;
}

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

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

.movie-meta-line {
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 0.82rem;
}

.movie-card h3,
.ranking-card h2 {
    margin: 0;
    line-height: 1.35;
}

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

.movie-card h3 a:hover,
.ranking-card h2 a:hover {
    color: var(--blue-dark);
}

.movie-card p,
.ranking-card p {
    display: -webkit-box;
    margin: 9px 0 12px;
    color: var(--muted);
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    font-size: 0.9rem;
}

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

.movie-card-compact h3 {
    font-size: 0.95rem;
}

.rank-preview {
    padding-bottom: 76px;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 54px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 15px 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    transition: 0.2s ease;
}

.rank-row:hover {
    transform: translateY(-3px);
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.13);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    color: #ffffff;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    font-weight: 900;
}

.rank-title {
    font-weight: 800;
}

.rank-info {
    color: var(--muted);
    font-size: 0.88rem;
}

.page-main {
    padding: 34px 0 82px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0 0 24px;
    color: var(--muted);
    font-size: 0.92rem;
}

.breadcrumb a:hover {
    color: var(--blue-dark);
}

.page-hero {
    overflow: hidden;
    padding: 56px;
    color: #ffffff;
    border-radius: 32px;
    background: linear-gradient(135deg, #0f172a, #1d4ed8 55%, #06b6d4);
    box-shadow: var(--shadow);
}

.page-hero p,
.page-hero h1,
.page-hero-text {
    color: #ffffff;
}

.page-hero h1 {
    font-size: clamp(2.3rem, 7vw, 4.6rem);
}

.page-hero-text {
    max-width: 760px;
    margin-top: 18px;
    color: #dbeafe;
    font-size: 1.12rem;
}

.category-overview-card {
    margin-top: 34px;
    padding: 28px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 16px;
    margin: 28px 0 0;
    padding: 18px;
}

.filter-panel label {
    display: grid;
    gap: 7px;
    color: #334155;
    font-weight: 800;
    font-size: 0.9rem;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: #0f172a;
    outline: 0;
    background: #ffffff;
}

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.filter-status {
    color: var(--muted);
    font-weight: 800;
}

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

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

.ranking-card {
    display: grid;
    grid-template-columns: 132px 1fr;
    overflow: hidden;
}

.ranking-poster {
    position: relative;
    display: block;
    min-height: 190px;
    background: linear-gradient(135deg, #e0f2fe, #dbeafe);
}

.ranking-poster span {
    position: absolute;
    top: 10px;
    left: 10px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #ffffff;
    border-radius: 15px;
    background: rgba(15, 23, 42, 0.82);
    font-weight: 900;
}

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

.rank-score {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    color: var(--blue-dark);
    border-radius: 999px;
    background: var(--blue-soft);
    font-weight: 900;
}

.movie-detail-hero {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 34px;
    padding: 28px;
}

.detail-cover {
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 24px;
    background: linear-gradient(135deg, #e0f2fe, #dbeafe);
}

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

.detail-info h1 {
    margin: 0;
    font-size: clamp(2.4rem, 7vw, 5rem);
    line-height: 1;
    letter-spacing: -0.07em;
}

.detail-one-line {
    max-width: 760px;
    margin: 22px 0 0;
    color: #334155;
    font-size: 1.14rem;
}

.detail-tags {
    margin: 24px 0;
}

.detail-tags span {
    color: var(--blue-dark);
    border-color: rgba(37, 99, 235, 0.22);
    background: var(--blue-soft);
}

.watch-section,
.detail-section,
.related-section {
    margin-top: 34px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    background: #000000;
}

.movie-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
    cursor: pointer;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 14px;
    color: #ffffff;
    border: 0;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.72));
    transition: 0.25s ease;
}

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

.play-symbol {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    padding-left: 6px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.38);
    font-size: 2rem;
}

.detail-section {
    padding: 30px;
}

.detail-section h2 {
    margin-bottom: 14px;
    font-size: 1.55rem;
}

.detail-section p {
    margin: 0;
    color: #334155;
    font-size: 1.05rem;
}

.detail-meta-box dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
}

.detail-meta-box div {
    padding: 16px;
    border-radius: 16px;
    background: var(--surface-soft);
}

.detail-meta-box dt {
    color: var(--muted);
    font-size: 0.86rem;
    font-weight: 800;
}

.detail-meta-box dd {
    margin: 4px 0 0;
    color: #0f172a;
    font-weight: 800;
}

.site-footer {
    color: #cbd5e1;
    background: #0f172a;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.2fr 0.7fr 1.1fr;
    gap: 32px;
    padding: 46px 0 32px;
}

.footer-logo {
    color: #ffffff;
    font-size: 1.25rem;
}

.site-footer p {
    max-width: 420px;
    color: #94a3b8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: #64748b;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

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

    .mobile-menu-button {
        display: block;
    }

    .feature-strip,
    .category-grid,
    .movie-grid,
    .mini-grid,
    .category-movie-grid,
    .search-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

@media (max-width: 760px) {
    .hero-slider {
        min-height: 590px;
    }

    .hero-content h1,
    .hero-content h2 {
        letter-spacing: -0.05em;
    }

    .feature-strip,
    .category-grid,
    .movie-grid,
    .mini-grid,
    .category-movie-grid,
    .search-grid,
    .footer-inner,
    .filter-panel,
    .movie-detail-hero,
    .detail-meta-box dl {
        grid-template-columns: 1fr;
    }

    .feature-strip {
        margin-top: 18px;
    }

    .section-block {
        padding-top: 50px;
    }

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

    .page-hero {
        padding: 34px 24px;
        border-radius: 24px;
    }

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

    .rank-info {
        grid-column: 2;
    }

    .ranking-card {
        grid-template-columns: 112px 1fr;
    }

    .movie-detail-hero {
        gap: 22px;
        padding: 18px;
    }

    .detail-cover {
        max-width: 260px;
    }

    .player-shell {
        border-radius: 20px;
    }
}

@media (max-width: 480px) {
    .header-inner,
    .feature-strip,
    .section-block,
    .page-main,
    .footer-inner,
    .footer-bottom {
        width: min(100% - 22px, 1180px);
    }

    .site-logo span:last-child {
        font-size: 0.95rem;
    }

    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .primary-button,
    .ghost-button {
        width: 100%;
    }

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

    .ranking-poster {
        aspect-ratio: 16 / 10;
        min-height: unset;
    }
}
