:root {
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --cyan: #06b6d4;
    --slate: #0f172a;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f8fafc;
    --card: #ffffff;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: #f9fafb;
    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,
video {
    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: 50;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(16px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 68px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--blue);
    font-weight: 800;
    font-size: 21px;
    white-space: nowrap;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    color: #ffffff;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.28);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav a,
.mobile-nav a {
    padding: 9px 13px;
    color: #374151;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    transition: 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active,
.mobile-nav a:hover,
.mobile-nav a.active {
    color: var(--blue);
    background: #eff6ff;
}

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

.header-search input,
.mobile-search input,
.tool-search input,
.catalog-tools select {
    width: 100%;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    padding: 10px 14px;
    color: #111827;
    background: #ffffff;
    outline: none;
    transition: 0.2s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.tool-search input:focus,
.catalog-tools select:focus {
    border-color: transparent;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22);
}

.header-search button,
.mobile-search button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    color: #ffffff;
    background: var(--blue);
    cursor: pointer;
}

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

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

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

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

.home-hero {
    position: relative;
    min-height: 620px;
    color: #ffffff;
    background: var(--slate);
    overflow: hidden;
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    background-position: center;
    background-size: cover;
    transform: scale(1.02);
    transition: opacity 0.55s ease, transform 0.8s ease;
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-content {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 48px;
    align-items: center;
    min-height: 620px;
    padding: 80px 0;
}

.hero-copy {
    max-width: 760px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 14px;
    color: var(--blue);
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-kicker.light,
.hero-kicker {
    color: #bfdbfe;
}

.hero-copy h1 {
    margin: 0 0 22px;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-copy p {
    max-width: 700px;
    margin: 0 0 26px;
    color: #dbeafe;
    font-size: 19px;
}

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

.hero-tags span,
.detail-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 11px;
    color: #1e40af;
    background: #dbeafe;
    font-size: 13px;
    font-weight: 700;
}

.hero-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.white-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 999px;
    padding: 0 24px;
    font-weight: 800;
    transition: 0.2s ease;
}

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.34);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 42px rgba(37, 99, 235, 0.42);
}

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

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

.white-btn {
    color: var(--blue);
    background: #ffffff;
}

.hero-card {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34);
    transform: rotate(2deg);
    transition: 0.25s ease;
}

.hero-card:hover {
    transform: rotate(0deg) translateY(-4px);
}

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

.hero-card span {
    position: absolute;
    right: 16px;
    bottom: 16px;
    border-radius: 999px;
    padding: 8px 12px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.92);
    font-weight: 800;
}

.hero-control {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.48);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-control.prev {
    left: 24px;
}

.hero-control.next {
    right: 24px;
}

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

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

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

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

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

.section-heading h2 {
    margin: 0;
    color: #111827;
    font-size: clamp(28px, 3.4vw, 40px);
    line-height: 1.15;
    font-weight: 900;
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.88);
    border-radius: 20px;
    background: var(--card);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.poster {
    position: relative;
    display: block;
    overflow: hidden;
    background: #e5e7eb;
}

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

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

.poster-badge,
.poster-score {
    position: absolute;
    top: 12px;
    border-radius: 999px;
    padding: 5px 9px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.poster-badge {
    left: 12px;
    background: rgba(37, 99, 235, 0.94);
}

.poster-score {
    right: 12px;
    background: rgba(15, 23, 42, 0.86);
}

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

.movie-title {
    display: -webkit-box;
    min-height: 54px;
    overflow: hidden;
    color: #111827;
    font-size: 18px;
    line-height: 1.45;
    font-weight: 900;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.movie-title:hover {
    color: var(--blue);
}

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

.movie-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #6b7280;
    font-size: 13px;
}

.tag-row {
    margin-top: 14px;
}

.tag-row span {
    padding: 5px 9px;
    color: #1d4ed8;
    background: #eff6ff;
}

.highlight-band,
.page-hero,
.detail-hero {
    color: #ffffff;
    background: linear-gradient(135deg, #1d4ed8, #06b6d4);
}

.highlight-band {
    padding: 70px 0;
}

.band-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 42px;
    align-items: start;
}

.band-grid h2,
.page-hero h1 {
    margin: 0 0 16px;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.12;
    font-weight: 900;
}

.band-grid p,
.page-hero p {
    max-width: 680px;
    margin: 0 0 24px;
    color: #dbeafe;
    font-size: 18px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: 52px 70px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    border-radius: 18px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(14px);
}

.rank-page-list .rank-item {
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.rank-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444);
    font-weight: 900;
}

.rank-thumb {
    overflow: hidden;
    border-radius: 12px;
}

.rank-thumb img {
    width: 70px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.rank-title {
    display: block;
    color: inherit;
    font-weight: 900;
}

.rank-content p {
    display: -webkit-box;
    margin: 4px 0 8px;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.76);
    font-size: 13px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
}

.rank-page-list .rank-content p {
    color: var(--muted);
}

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

.category-tile,
.category-card {
    display: block;
    border: 1px solid rgba(219, 234, 254, 0.9);
    border-radius: 22px;
    padding: 24px;
    background: linear-gradient(135deg, #ffffff, #eff6ff);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.08);
    transition: 0.22s ease;
}

.category-tile:hover,
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 46px rgba(37, 99, 235, 0.16);
}

.category-tile span,
.category-main span {
    display: block;
    margin-bottom: 10px;
    color: #1d4ed8;
    font-size: 20px;
    font-weight: 900;
}

.category-tile p,
.category-main p {
    margin: 0;
    color: #4b5563;
}

.category-samples {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

.category-samples a {
    color: #2563eb;
    font-size: 14px;
    font-weight: 700;
}

.compact-hero {
    padding: 76px 0;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: #dbeafe;
    font-size: 14px;
}

.breadcrumb a {
    color: #ffffff;
    font-weight: 800;
}

.catalog-tools {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 180px 180px 180px;
    gap: 14px;
    margin-bottom: 28px;
    border: 1px solid rgba(219, 234, 254, 0.9);
    border-radius: 20px;
    padding: 18px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.detail-hero {
    background-position: center;
    background-size: cover;
}

.detail-hero-inner {
    padding: 76px 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: 290px minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border: 6px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.35);
}

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

.detail-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(36px, 5vw, 62px);
    line-height: 1.08;
    font-weight: 900;
}

.detail-one-line {
    max-width: 820px;
    margin: 0 0 22px;
    color: #dbeafe;
    font-size: 19px;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin: 26px 0 0;
}

.detail-meta div {
    border-radius: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.detail-meta dt {
    color: #bfdbfe;
    font-size: 12px;
}

.detail-meta dd {
    margin: 4px 0 0;
    font-weight: 900;
}

.watch-section {
    padding-bottom: 28px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    background: #000000;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.movie-video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 0;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.34), rgba(15, 23, 42, 0.72));
    cursor: pointer;
}

.player-cover.hidden {
    display: none;
}

.play-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    padding-left: 4px;
    color: var(--blue);
    background: #ffffff;
    font-size: 32px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
}

.player-cover strong {
    font-size: 22px;
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding: 24px 0;
}

.story-card {
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 26px;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

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

.story-card p {
    margin: 0;
    color: #4b5563;
    white-space: pre-line;
}

.movie-card.compact .movie-title {
    min-height: auto;
    font-size: 16px;
}

.movie-card.compact .movie-desc {
    min-height: 40px;
}

.site-footer {
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1fr;
    gap: 36px;
    padding: 54px 0;
}

.footer-brand {
    color: #ffffff;
    margin-bottom: 14px;
}

.site-footer p {
    max-width: 460px;
    margin: 0;
    color: #9ca3af;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 17px;
    font-weight: 900;
}

.footer-links {
    display: grid;
    gap: 10px;
}

.footer-links.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.footer-links a {
    color: #d1d5db;
    font-size: 14px;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 16px;
    color: #9ca3af;
    text-align: center;
    font-size: 14px;
}

.back-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 45;
    display: none;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    background: var(--blue);
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.32);
    cursor: pointer;
}

.back-top.show {
    display: block;
}

[hidden] {
    display: none !important;
}

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

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

    .catalog-tools {
        grid-template-columns: 1fr 1fr;
    }

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

@media (max-width: 820px) {
    .main-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .home-hero,
    .hero-slider,
    .hero-slide,
    .hero-content {
        min-height: 720px;
    }

    .hero-content,
    .band-grid,
    .detail-grid,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-card {
        width: min(260px, 70vw);
        transform: none;
    }

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

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

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

@media (max-width: 560px) {
    .container {
        width: min(100% - 24px, 1180px);
    }

    .brand {
        font-size: 18px;
    }

    .home-hero,
    .hero-slider,
    .hero-slide,
    .hero-content {
        min-height: 760px;
    }

    .hero-content {
        padding: 54px 0 80px;
    }

    .hero-control {
        display: none;
    }

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

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

    .rank-item {
        grid-template-columns: 42px 56px minmax(0, 1fr);
    }

    .rank-thumb img {
        width: 56px;
    }
}
