:root {
    color-scheme: light;
    --bg: #f8fafc;
    --paper: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --blue: #2563eb;
    --cyan: #06b6d4;
    --teal: #14b8a6;
    --orange: #f97316;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    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,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.site-nav {
    max-width: 1180px;
    height: 72px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color: #fff;
    font-weight: 900;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
}

.brand-text {
    display: grid;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 20px;
    background: linear-gradient(90deg, var(--blue), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.brand-dark .brand-text strong {
    color: #fff;
    background: none;
}

.brand-dark .brand-text small {
    color: #cbd5e1;
}

.nav-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
    flex: 1 1 auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-links a {
    color: #334155;
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--blue);
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(330px, 32vw);
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
}

.nav-search input {
    width: 100%;
    border: 0;
    outline: 0;
    padding: 8px 10px;
    color: var(--ink);
    background: transparent;
}

.nav-search button,
.filter-form button {
    border: 0;
    border-radius: 999px;
    padding: 8px 16px;
    color: #fff;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    cursor: pointer;
    font-weight: 700;
}

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

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--blue);
    border-radius: 999px;
}

.hero-section {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #2563eb 0%, #06b6d4 55%, #14b8a6 100%);
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.22), transparent 30%), radial-gradient(circle at 80% 70%, rgba(15, 23, 42, 0.22), transparent 34%);
}

.hero-bg-glow {
    position: absolute;
    width: 560px;
    height: 560px;
    right: -160px;
    top: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    filter: blur(55px);
}

.hero-inner {
    position: relative;
    max-width: 1180px;
    min-height: 680px;
    margin: 0 auto;
    padding: 92px 20px 64px;
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
    align-items: center;
    gap: 46px;
}

.eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 12px;
    border-radius: 999px;
    color: var(--blue);
    background: #dbeafe;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hero-copy .eyebrow {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.hero-copy h1 {
    margin: 20px 0 18px;
    font-size: clamp(38px, 5.8vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

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

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, #f97316, #facc15);
    box-shadow: 0 14px 30px rgba(249, 115, 22, 0.25);
}

.btn-soft {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.page-actions .btn-soft {
    color: var(--blue);
    background: #eff6ff;
    border-color: #bfdbfe;
}

.hero-search-panel {
    margin-top: 34px;
    max-width: 560px;
    padding: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.hero-search-panel form {
    display: flex;
    gap: 8px;
}

.hero-search-panel input {
    flex: 1;
    min-width: 0;
    border: 0;
    border-radius: 999px;
    padding: 15px 18px;
    outline: 0;
}

.hero-search-panel button {
    border: 0;
    border-radius: 999px;
    padding: 0 24px;
    color: #fff;
    background: #0f172a;
    font-weight: 800;
    cursor: pointer;
}

.hero-carousel {
    position: relative;
    min-height: 430px;
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
    background: #0f172a;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.08));
}

.hero-slide-content {
    position: absolute;
    z-index: 2;
    left: 28px;
    right: 28px;
    bottom: 28px;
}

.hero-slide-content span {
    color: #bfdbfe;
    font-weight: 800;
    font-size: 14px;
}

.hero-slide-content h2 {
    margin: 8px 0;
    font-size: 32px;
    line-height: 1.15;
}

.hero-slide-content p {
    margin: 0 0 16px;
    color: #e2e8f0;
}

.hero-slide-content a {
    display: inline-flex;
    padding: 10px 16px;
    border-radius: 999px;
    color: #0f172a;
    background: #fff;
    font-weight: 800;
}

.hero-thumbs {
    position: relative;
    max-width: 1180px;
    margin: -40px auto 0;
    padding: 0 20px 46px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.hero-thumb {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 18px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
    cursor: pointer;
    text-align: left;
}

.hero-thumb.active {
    background: rgba(255, 255, 255, 0.28);
}

.hero-thumb img {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
}

.hero-thumb span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 800;
}

.section-block,
.page-shell,
.detail-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 58px 20px;
}

.section-muted {
    max-width: none;
    margin: 0;
    padding-left: max(20px, calc((100vw - 1180px) / 2 + 20px));
    padding-right: max(20px, calc((100vw - 1180px) / 2 + 20px));
    background: #eef6ff;
}

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

.section-head h2,
.page-title h1,
.content-card h2,
.related-panel h2 {
    margin: 8px 0 0;
    color: var(--ink);
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.18;
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

.movie-card-small .poster-wrap {
    aspect-ratio: 16 / 9;
}

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

.movie-card:hover .poster-wrap img,
.category-tile:hover img,
.category-card:hover img,
.rank-item:hover img {
    transform: scale(1.08);
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.04), rgba(15, 23, 42, 0.46));
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 50%;
    color: var(--blue);
    background: rgba(255, 255, 255, 0.9);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.92);
    transition: opacity 0.25s ease, transform 0.25s ease;
    font-size: 22px;
}

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

.card-type {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fff;
    background: rgba(15, 23, 42, 0.72);
    font-size: 12px;
    font-weight: 800;
}

.movie-info {
    padding: 17px;
}

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

.movie-info h3 a:hover {
    color: var(--blue);
}

.movie-meta,
.movie-line {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.movie-line {
    margin-top: 10px;
}

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

.tag-row span,
.detail-tags span {
    padding: 4px 9px;
    border-radius: 999px;
    color: #0369a1;
    background: #e0f2fe;
    font-size: 12px;
    font-weight: 700;
}

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

.category-tile,
.category-card a {
    position: relative;
    overflow: hidden;
    min-height: 150px;
    display: flex;
    align-items: flex-end;
    padding: 18px;
    border-radius: var(--radius);
    color: #fff;
    background: #0f172a;
    box-shadow: var(--soft-shadow);
}

.category-tile img,
.category-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.58;
    transition: transform 0.45s ease;
}

.category-tile::after,
.category-card a::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.06));
}

.category-tile span,
.category-card span,
.category-card p {
    position: relative;
    z-index: 2;
}

.category-tile span,
.category-card span {
    font-size: 24px;
    font-weight: 900;
}

.category-card a {
    display: grid;
    align-content: end;
    gap: 8px;
    min-height: 210px;
}

.category-card p {
    margin: 0;
    color: #e2e8f0;
}

.page-title {
    padding-top: 34px;
}

.page-title p {
    max-width: 780px;
    color: var(--muted);
    font-size: 18px;
}

.filter-panel {
    margin: 24px 0 10px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--soft-shadow);
}

.filter-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px 170px auto;
    gap: 12px;
}

.filter-form input,
.filter-form select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 12px 15px;
    outline: 0;
    color: var(--ink);
    background: #f8fafc;
}

.empty-state {
    margin: 32px 0 0;
    padding: 20px;
    border-radius: 18px;
    color: var(--muted);
    background: #fff;
    text-align: center;
}

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

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

.rank-item {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--soft-shadow);
}

.rank-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 18px;
    background: #dbeafe;
}

.rank-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.rank-cover span {
    position: absolute;
    left: 10px;
    top: 10px;
    display: grid;
    min-width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--orange), #facc15);
    font-weight: 900;
}

.rank-content h3 {
    margin: 2px 0 8px;
    font-size: 21px;
}

.rank-content h3 a:hover {
    color: var(--blue);
}

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

.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.rank-meta span {
    padding: 5px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 13px;
}

.detail-page {
    display: grid;
    gap: 34px;
}

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

.detail-cover {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: var(--shadow);
    background: #dbeafe;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
}

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

.detail-intro h1 {
    margin: 18px 0 14px;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.08;
}

.detail-line {
    color: #475569;
    font-size: 18px;
}

.player-section,
.content-card,
.related-panel {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: #fff;
    box-shadow: var(--soft-shadow);
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    gap: 12px;
    border: 0;
    color: #fff;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.78), rgba(2, 6, 23, 0.22));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-overlay strong {
    max-width: 86%;
    font-size: clamp(20px, 3vw, 34px);
    line-height: 1.2;
}

.player-button {
    display: grid;
    width: 84px;
    height: 84px;
    place-items: center;
    border-radius: 50%;
    color: var(--blue);
    background: #fff;
    font-size: 34px;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.32);
}

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

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

.content-card h2,
.related-panel h2 {
    font-size: 28px;
}

.content-card p {
    color: #475569;
    font-size: 17px;
}

.movie-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 28px 0 0;
}

.movie-facts div {
    padding: 14px;
    border-radius: 16px;
    background: #f8fafc;
}

.movie-facts dt {
    color: var(--muted);
    font-size: 13px;
}

.movie-facts dd {
    margin: 4px 0 0;
    font-weight: 800;
}

.related-grid {
    display: grid;
    gap: 16px;
}

.related-grid .movie-card-small {
    display: grid;
    grid-template-columns: 145px minmax(0, 1fr);
}

.related-grid .movie-card-small .poster-wrap {
    height: 100%;
    aspect-ratio: auto;
}

.site-footer {
    margin-top: 40px;
    color: #cbd5e1;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.footer-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 44px 20px;
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 34px;
}

.footer-brand p {
    margin: 18px 0 0;
    color: #94a3b8;
}

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

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

@media (max-width: 1024px) {
    .hero-inner,
    .detail-hero,
    .detail-content,
    .footer-inner {
        grid-template-columns: 1fr;
    }

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

    .hero-thumbs,
    .rank-list.compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 820px) {
    .site-nav {
        height: auto;
        min-height: 68px;
        align-items: flex-start;
        padding-top: 13px;
        padding-bottom: 13px;
    }

    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 64px;
        display: none;
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: #fff;
        box-shadow: var(--shadow);
    }

    .nav-menu.open {
        display: grid;
        gap: 14px;
    }

    .nav-links {
        display: grid;
        gap: 12px;
    }

    .nav-search {
        width: 100%;
    }

    .hero-inner {
        min-height: auto;
        padding-top: 60px;
    }

    .hero-carousel {
        min-height: 360px;
    }

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

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

    .rank-item,
    .related-grid .movie-card-small {
        grid-template-columns: 120px minmax(0, 1fr);
    }

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

@media (max-width: 560px) {
    .brand-text strong {
        font-size: 17px;
    }

    .hero-copy h1 {
        font-size: 36px;
    }

    .hero-search-panel form {
        display: grid;
    }

    .hero-search-panel button {
        min-height: 44px;
    }

    .hero-thumbs,
    .movie-grid,
    .all-movies,
    .category-grid,
    .category-card-grid,
    .movie-facts {
        grid-template-columns: 1fr;
    }

    .hero-slide-content h2 {
        font-size: 26px;
    }

    .detail-hero,
    .player-section,
    .content-card,
    .related-panel {
        padding: 20px;
        border-radius: 24px;
    }

    .rank-item,
    .related-grid .movie-card-small {
        grid-template-columns: 1fr;
    }
}
