* {
    box-sizing: border-box;
}

:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --panel-soft: #f1f5f9;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #0891b2;
    --brand-dark: #0e7490;
    --brand-soft: #cffafe;
    --accent: #10b981;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
    --radius: 20px;
}

html {
    scroll-behavior: smooth;
}

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

body.nav-open {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(226, 232, 240, 0.82);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(18px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 22px;
    color: var(--brand-dark);
    letter-spacing: -0.03em;
}

.brand-icon {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    color: #ffffff;
    font-size: 14px;
    box-shadow: 0 12px 24px rgba(8, 145, 178, 0.22);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    padding: 10px 16px;
    border-radius: 12px;
    color: #334155;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    background: var(--brand);
    color: #ffffff;
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    background: var(--panel-soft);
    color: var(--brand-dark);
    cursor: pointer;
}

.hero-section {
    background: linear-gradient(135deg, #0891b2 0%, #0d9488 52%, #10b981 100%);
    color: #ffffff;
    overflow: hidden;
}

.hero-slider {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    min-height: 600px;
    margin: 0 auto;
}

.hero-slide {
    min-height: 600px;
    display: none;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.75fr);
    align-items: center;
    gap: 52px;
    padding: 74px 0 88px;
}

.hero-slide.active {
    display: grid;
    animation: fadeUp 0.5s ease both;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0 0 22px;
    font-size: clamp(40px, 7vw, 72px);
    line-height: 1.03;
    letter-spacing: -0.06em;
}

.hero-copy p {
    max-width: 680px;
    margin: 0 0 28px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 19px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: inherit;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.hero-tags,
.tag-row,
.detail-meta,
.movie-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.hero-tags span,
.tag-row span,
.detail-meta span,
.movie-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: inherit;
    font-size: 13px;
    font-weight: 700;
}

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

.primary-button,
.ghost-button,
.text-button,
.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.primary-button {
    background: #ffffff;
    color: var(--brand-dark);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
}

.primary-button:hover,
.ghost-button:hover,
.text-button:hover,
.section-link:hover {
    transform: translateY(-2px);
}

.ghost-button {
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: #ffffff;
}

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

.hero-poster::before {
    content: "";
    position: absolute;
    inset: 0;
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: inherit;
    z-index: 2;
    pointer-events: none;
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    background: linear-gradient(135deg, #0f172a, #0891b2);
}

.hero-dots {
    position: absolute;
    left: 0;
    bottom: 34px;
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.38);
    cursor: pointer;
}

.hero-dots button.active {
    background: #ffffff;
}

.page-hero,
.detail-hero {
    position: relative;
    padding: 76px 0;
    color: #ffffff;
    background: linear-gradient(135deg, #0e7490 0%, #0f766e 58%, #059669 100%);
    overflow: hidden;
}

.page-hero h1,
.detail-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(36px, 6vw, 58px);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
}

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

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

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

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

.section-link,
.text-button {
    background: var(--brand-soft);
    color: var(--brand-dark);
}

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

.compact-grid {
    grid-template-columns: repeat(auto-fill, minmax(188px, 1fr));
}

.movie-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(8, 145, 178, 0.35);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    background: linear-gradient(135deg, #e0f2fe, #ccfbf1);
}

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

.score-pill {
    position: absolute;
    right: 10px;
    top: 10px;
    padding: 4px 9px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
    color: #ffffff;
    font-weight: 800;
    font-size: 13px;
}

.movie-info {
    padding: 16px;
}

.movie-meta {
    color: var(--muted);
    margin-bottom: 10px;
}

.movie-meta span {
    background: var(--panel-soft);
    color: var(--muted);
}

.movie-info h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-info h3 a:hover,
.rank-list a:hover,
.footer-inner a:hover,
.category-detail-body a:hover {
    color: var(--brand-dark);
}

.movie-info p {
    min-height: 50px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
}

.tag-row span {
    background: var(--brand-soft);
    color: var(--brand-dark);
}

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

.category-card,
.category-detail-card,
.content-panel,
.rank-panel,
.player-card,
.rank-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.category-card {
    padding: 18px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

.category-thumbs img,
.category-visual img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 10px;
    background: var(--panel-soft);
}

.category-card h3,
.category-detail-body h2 {
    margin: 0 0 8px;
}

.category-card p,
.category-detail-body p {
    margin: 0;
    color: var(--muted);
}

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

.category-detail-card {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 26px;
    padding: 22px;
}

.category-detail-body ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 18px;
    padding-left: 18px;
    color: var(--muted);
}

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

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

.rank-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.rank-head h2 {
    margin: 0;
}

.rank-head a {
    color: var(--brand-dark);
    font-weight: 800;
}

.rank-list {
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.rank-list a {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 4px 10px;
    align-items: center;
    padding: 10px;
    border-radius: 14px;
    background: var(--panel-soft);
}

.rank-number {
    grid-row: span 2;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--brand);
    color: #ffffff;
    font-weight: 900;
}

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

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

.catalog-toolbar {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 220px;
    gap: 16px;
    max-width: 760px;
    margin-top: 28px;
}

.search-box,
.select-box {
    display: grid;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 800;
}

.search-box input,
.select-box select {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    outline: none;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.select-box select option {
    color: var(--text);
}

.empty-state {
    display: none;
    margin-top: 24px;
    padding: 24px;
    border-radius: var(--radius);
    background: var(--panel);
    color: var(--muted);
    text-align: center;
}

.empty-state.show {
    display: block;
}

.rank-grid {
    display: grid;
    gap: 18px;
}

.rank-card {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 20px;
    padding: 16px;
}

.rank-cover {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
}

.rank-cover span {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 2;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--brand);
    color: #ffffff;
    font-weight: 900;
}

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

.rank-card-body {
    position: relative;
}

.rank-card-body h2 {
    margin: 8px 0;
    font-size: 24px;
}

.rank-card-body p {
    margin: 0;
    color: var(--muted);
}

.rank-score {
    position: absolute;
    right: 0;
    bottom: 0;
    color: var(--brand-dark);
    font-size: 34px;
    font-weight: 900;
}

.detail-hero {
    padding: 54px 0 70px;
    background: #0f172a;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.24;
    filter: blur(14px);
    transform: scale(1.05);
}

.detail-hero-inner {
    position: relative;
    z-index: 2;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.78);
}

.breadcrumb a:hover {
    color: #ffffff;
}

.detail-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 34px;
    align-items: end;
}

.detail-poster {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 35px 80px rgba(0, 0, 0, 0.36);
}

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

.detail-one-line {
    max-width: 760px;
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 20px;
}

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

.player-card {
    padding: 16px;
}

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #020617;
    aspect-ratio: 16 / 9;
}

.video-player {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #020617;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.28), rgba(2, 6, 23, 0.74));
    color: #ffffff;
    cursor: pointer;
    font-weight: 900;
    font-size: 18px;
}

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

.play-bubble {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #ffffff;
    color: var(--brand-dark);
    font-size: 30px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.26);
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 22px;
    align-items: start;
    padding-bottom: 12px;
}

.detail-content .content-panel:first-child {
    grid-column: 1;
}

.content-panel {
    padding: 24px;
}

.content-panel h2 {
    margin: 0 0 12px;
    font-size: 24px;
    letter-spacing: -0.03em;
}

.content-panel p {
    margin: 0;
    color: var(--muted);
}

.info-list {
    display: grid;
    gap: 12px;
    margin: 0 0 18px;
}

.info-list div {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 10px;
}

.info-list dt {
    color: var(--muted);
}

.info-list dd {
    margin: 0;
    font-weight: 800;
}

.wide-tags {
    gap: 10px;
}

.prose-section {
    display: grid;
    gap: 22px;
    padding: 56px 0;
}

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

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 50px 0;
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 28px;
}

.footer-inner h2,
.footer-inner h3 {
    margin: 0 0 14px;
    color: #ffffff;
}

.footer-inner p {
    margin: 0;
    color: #94a3b8;
}

.footer-inner ul {
    display: grid;
    gap: 9px;
    padding: 0;
    margin: 0;
    list-style: none;
}

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

.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 90;
    width: 48px;
    height: 48px;
    display: none;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--brand);
    color: #ffffff;
    box-shadow: var(--shadow);
    cursor: pointer;
}

.back-to-top.show {
    display: grid;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

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

@media (max-width: 980px) {
    .hero-slide,
    .feature-layout,
    .detail-layout,
    .detail-content,
    .footer-inner,
    .category-detail-card {
        grid-template-columns: 1fr;
    }

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

    .rank-panel {
        position: static;
    }

    .detail-poster {
        width: min(320px, 100%);
    }
}

@media (max-width: 760px) {
    .header-inner {
        min-height: 62px;
    }

    .brand {
        font-size: 18px;
    }

    .nav-toggle {
        display: inline-grid;
        place-items: center;
    }

    .site-nav {
        position: fixed;
        left: 16px;
        right: 16px;
        top: 74px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 20px;
        background: #ffffff;
        box-shadow: var(--shadow);
    }

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

    .nav-link {
        text-align: center;
    }

    .hero-slider,
    .hero-slide {
        min-height: auto;
    }

    .hero-slide {
        padding: 48px 0 80px;
    }

    .hero-poster {
        max-width: 280px;
        margin: 0 auto;
        transform: none;
    }

    .hero-dots {
        left: 50%;
        transform: translateX(-50%);
    }

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

    .category-grid,
    .catalog-toolbar,
    .rank-card {
        grid-template-columns: 1fr;
    }

    .detail-hero,
    .page-hero {
        padding: 48px 0;
    }

    .detail-content .content-panel:first-child {
        grid-column: auto;
    }

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

    .movie-info {
        padding: 12px;
    }

    .movie-info p {
        min-height: auto;
    }
}

@media (max-width: 480px) {
    .container,
    .header-inner,
    .footer-inner,
    .hero-slider {
        width: min(100% - 20px, 1180px);
    }

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

    .hero-actions,
    .catalog-toolbar {
        width: 100%;
    }

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