:root {
    color-scheme: light;
    --teal: #0f766e;
    --cyan: #0891b2;
    --amber: #f59e0b;
    --rose: #e11d48;
    --orange: #f97316;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f8fafc;
    --card: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, var(--teal), var(--cyan));
    box-shadow: 0 10px 30px rgba(15, 118, 110, 0.25);
}

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.logo-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #78350f;
    background: #fbbf24;
    border-radius: 999px;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.38);
}

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

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

.site-nav a:hover,
.site-nav a.is-active {
    color: #fde68a;
    opacity: 1;
}

.top-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-search input {
    width: 220px;
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: #111827;
    background: rgba(255, 255, 255, 0.95);
    outline: none;
}

.top-search input:focus {
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.45);
}

.top-search button,
.primary-btn,
.ghost-btn,
.filter-bar button {
    border: 0;
    border-radius: 999px;
    padding: 10px 18px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.top-search button,
.primary-btn,
.filter-bar button {
    color: #78350f;
    background: #fbbf24;
    box-shadow: 0 10px 22px rgba(251, 191, 36, 0.25);
}

.ghost-btn {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
}

.top-search button:hover,
.primary-btn:hover,
.ghost-btn:hover,
.filter-bar button:hover {
    transform: translateY(-2px);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    margin-left: auto;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

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

.hero {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    background: #111827;
}

.hero-carousel {
    position: relative;
    min-height: 520px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    background-image: linear-gradient(90deg, rgba(249, 115, 22, 0.92), rgba(225, 29, 72, 0.78), rgba(17, 24, 39, 0.7)), var(--hero-cover);
    background-position: center;
    background-size: cover;
    transition: opacity 0.65s ease;
}

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

.hero-content {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    color: #ffffff;
    max-width: 740px;
    animation: fadeIn 0.65s ease both;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: #fde68a;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.hero h2 {
    margin: 0 0 18px;
    font-size: clamp(40px, 6vw, 72px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
    text-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.hero p {
    max-width: 680px;
    margin: 0 0 30px;
    font-size: clamp(17px, 2vw, 24px);
    color: rgba(255, 255, 255, 0.92);
}

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

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 24px;
    display: flex;
    gap: 12px;
    transform: translateX(-50%);
}

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

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

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

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

.section-head span {
    display: block;
    margin-bottom: 6px;
    color: var(--orange);
    font-weight: 900;
}

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

.section-head a {
    color: var(--teal);
    font-weight: 900;
}

.inner-head {
    margin-bottom: 18px;
}

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

.category-tile,
.category-overview-card {
    position: relative;
    overflow: hidden;
    min-height: 150px;
    padding: 22px;
    border-radius: 22px;
    background: linear-gradient(135deg, #ecfeff, #fff7ed);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover,
.category-overview-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.category-tile strong,
.category-overview-link span {
    display: block;
    margin-bottom: 10px;
    font-size: 20px;
    font-weight: 900;
    color: var(--teal);
}

.category-tile span,
.category-overview-link strong {
    color: #475569;
    font-weight: 600;
}

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

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

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

.movie-card {
    min-width: 0;
}

.movie-card a {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-frame {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #ccfbf1, #cffafe);
}

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

.movie-card a:hover img {
    transform: scale(1.08);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 32%, rgba(0, 0, 0, 0.72));
}

.poster-play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #b45309;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 999px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.7);
    transition: opacity 0.25s ease, transform 0.25s ease;
    backdrop-filter: blur(10px);
}

.movie-card a:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.poster-meta {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.poster-meta span,
.detail-meta span,
.term-list span,
.card-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.poster-meta span {
    color: #ffffff;
    padding: 4px 9px;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
}

.card-body {
    display: block;
    padding: 17px;
}

.card-body strong {
    display: block;
    margin-bottom: 8px;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 900;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.card-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.card-tags span {
    color: #0f766e;
    padding: 4px 8px;
    background: #ccfbf1;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 30px;
    align-items: start;
}

.rank-panel,
.side-card,
.detail-content,
.player-card,
.filter-bar,
.category-overview-card {
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.rank-panel {
    padding: 24px;
}

.rank-panel h2,
.side-card h2,
.detail-content h2 {
    margin: 0 0 18px;
    font-size: 24px;
    line-height: 1.2;
}

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

.rank-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
    background: #f8fafc;
    transition: background 0.2s ease, transform 0.2s ease;
}

.rank-row:hover {
    background: #ecfeff;
    transform: translateX(4px);
}

.rank-num {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--orange), var(--rose));
    border-radius: 12px;
    font-weight: 900;
}

.rank-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 900;
}

.rank-type {
    color: var(--muted);
    font-size: 13px;
}

.rank-score {
    color: var(--rose);
    font-weight: 900;
}

.page-hero {
    color: #ffffff;
    padding: 74px 0;
}

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

.page-hero h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.1;
    font-weight: 900;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.92);
    font-size: 20px;
}

.teal-hero {
    background: linear-gradient(90deg, #0891b2, #0f766e, #059669);
}

.orange-hero {
    background: linear-gradient(90deg, #f97316, #e11d48, #be123c);
}

.rose-hero {
    background: linear-gradient(90deg, #be123c, #e11d48, #f97316);
}

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

.category-overview-card {
    padding: 24px;
}

.category-preview-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.category-preview-links a {
    padding: 7px 11px;
    border-radius: 999px;
    color: #0f766e;
    background: #ccfbf1;
    font-weight: 800;
    font-size: 13px;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1.7fr repeat(3, 1fr) auto;
    gap: 14px;
    align-items: end;
    padding: 20px;
    margin-bottom: 28px;
}

.filter-bar label {
    display: grid;
    gap: 6px;
    font-weight: 800;
}

.filter-bar span {
    color: #475569;
    font-size: 14px;
}

.filter-bar input,
.filter-bar select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 11px 12px;
    background: #ffffff;
    outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: #06b6d4;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.12);
}

.breadcrumb {
    width: min(1180px, calc(100% - 32px));
    margin: 26px auto 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #64748b;
    font-weight: 700;
}

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

.detail-layout {
    width: min(1180px, calc(100% - 32px));
    margin: 22px auto 56px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 30px;
    align-items: start;
}

.detail-main {
    display: grid;
    gap: 24px;
}

.player-card {
    overflow: hidden;
    padding: 0;
    background: #020617;
}

.video-shell {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.video-shell video {
    width: 100%;
    height: 100%;
    display: block;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.62));
    cursor: pointer;
}

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

.play-circle {
    width: 76px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #78350f;
    background: #fbbf24;
    border-radius: 999px;
    font-size: 30px;
    box-shadow: 0 20px 60px rgba(251, 191, 36, 0.38);
}

.detail-content {
    padding: 30px;
}

.detail-title-block h1 {
    margin: 0 0 14px;
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.08;
    font-weight: 900;
}

.detail-meta,
.term-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.detail-meta span,
.term-list span {
    padding: 7px 11px;
}

.detail-meta span {
    color: #0f766e;
    background: #ccfbf1;
}

.term-list span {
    color: #9f1239;
    background: #ffe4e6;
}

.lead-text {
    margin: 24px 0;
    padding: 18px 20px;
    color: #334155;
    background: #f8fafc;
    border-left: 4px solid var(--orange);
    border-radius: 14px;
    font-size: 18px;
    font-weight: 700;
}

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

.detail-side {
    display: grid;
    gap: 20px;
}

.side-poster {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, #ccfbf1, #cffafe);
}

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

.side-card {
    padding: 20px;
}

.side-related {
    display: grid;
    gap: 14px;
}

.side-related .movie-card a {
    display: grid;
    grid-template-columns: 112px 1fr;
    align-items: stretch;
}

.side-related .poster-frame {
    aspect-ratio: auto;
    min-height: 96px;
}

.side-related .card-body {
    padding: 12px;
}

.side-related .card-line,
.side-related .card-tags,
.side-related .poster-meta {
    display: none;
}

.long-rank-list {
    max-height: 720px;
    overflow: auto;
    padding-right: 4px;
}

.sticky-panel {
    position: sticky;
    top: 92px;
}

.site-footer {
    color: #d1d5db;
    background: linear-gradient(180deg, #1f2937, #111827);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: flex;
    justify-content: space-between;
    gap: 30px;
}

.footer-inner strong {
    display: block;
    margin-bottom: 10px;
    color: #ffffff;
    font-size: 22px;
}

.footer-inner p {
    max-width: 520px;
    margin: 0;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 14px;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

    .sticky-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .header-inner {
        height: auto;
        min-height: 64px;
        flex-wrap: wrap;
        padding: 10px 0;
    }

    .mobile-toggle {
        display: block;
    }

    .site-nav {
        display: none;
        order: 3;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 0 10px;
    }

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

    .site-nav a {
        padding: 10px 0;
    }

    .hero,
    .hero-carousel {
        min-height: 560px;
    }

    .hero-content {
        padding: 70px 0 90px;
    }

    .section-head,
    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-links {
        justify-content: flex-start;
    }

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

    .filter-bar {
        grid-template-columns: 1fr;
    }

    .detail-content {
        padding: 22px;
    }

    .side-related .movie-card a {
        grid-template-columns: 96px 1fr;
    }
}

@media (max-width: 520px) {
    .site-logo {
        font-size: 20px;
    }

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

    .rank-row {
        grid-template-columns: 38px minmax(0, 1fr) auto;
    }

    .rank-type {
        display: none;
    }
}
