:root {
    --bg: #f8fafc;
    --text: #111827;
    --muted: #64748b;
    --line: #e2e8f0;
    --card: #ffffff;
    --blue: #2563eb;
    --blue-dark: #1e3a8a;
    --red: #dc2626;
    --orange: #f97316;
    --shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.82);
    backdrop-filter: blur(18px);
}

.header-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    color: #0f172a;
    white-space: nowrap;
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8 45%, #dc2626);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.32);
}

.brand-text {
    font-size: 20px;
    letter-spacing: -0.02em;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
    color: #334155;
    font-size: 15px;
    font-weight: 700;
}

.desktop-nav a {
    position: relative;
    padding: 8px 0;
}

.desktop-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 3px;
    height: 2px;
    border-radius: 999px;
    background: var(--blue);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

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

.desktop-nav a:hover::after {
    transform: scaleX(1);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 19px;
    height: 2px;
    border-radius: 999px;
    background: #0f172a;
}

.mobile-nav {
    display: none;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mobile-nav a {
    padding: 10px 12px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 700;
}

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

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-carousel {
    position: relative;
    height: 560px;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #1e3a8a 55%, #111827);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 75% 25%, rgba(37, 99, 235, 0.32), transparent 30%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.9) 0%, rgba(2, 6, 23, 0.72) 45%, rgba(2, 6, 23, 0.08) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.86) 0%, transparent 40%);
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 62px;
    width: min(1240px, calc(100% - 40px));
    transform: translateX(-50%);
    color: #ffffff;
}

.hero-kicker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
}

.hero-kicker span,
.hero-kicker a {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 800;
    background: rgba(37, 99, 235, 0.92);
}

.hero-kicker a:nth-child(2) {
    background: rgba(220, 38, 38, 0.92);
}

.hero-content h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(34px, 5vw, 66px);
    line-height: 1.05;
    letter-spacing: -0.05em;
    font-weight: 950;
    text-shadow: 0 14px 42px rgba(0, 0, 0, 0.38);
}

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

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
}

.btn-light {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(12px);
}

.hero-controls {
    position: absolute;
    right: max(20px, calc((100% - 1240px) / 2));
    bottom: 64px;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

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

.section {
    padding: 46px 0;
}

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

.section-title {
    margin: 0;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.15;
    letter-spacing: -0.03em;
    font-weight: 950;
    color: #0f172a;
}

.section-desc {
    margin: 8px 0 0;
    color: var(--muted);
    max-width: 740px;
}

.more-link {
    color: var(--blue);
    font-weight: 900;
    white-space: nowrap;
}

.filter-panel {
    margin: 28px auto 0;
    padding: 18px;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--soft-shadow);
}

.search-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
}

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

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

.search-form button {
    height: 46px;
    border: 0;
    border-radius: 14px;
    padding: 0 18px;
    color: #ffffff;
    background: var(--blue);
    font-weight: 900;
    cursor: pointer;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

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

.category-tile {
    min-height: 156px;
    padding: 20px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.18), transparent 36%),
        linear-gradient(135deg, #ffffff, #eff6ff);
    border: 1px solid rgba(226, 232, 240, 0.85);
    box-shadow: var(--soft-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.category-tile strong {
    display: block;
    margin-bottom: 8px;
    color: #0f172a;
    font-size: 20px;
    font-weight: 950;
}

.category-tile span {
    color: var(--muted);
    font-size: 14px;
}

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: var(--card);
    border: 1px solid rgba(226, 232, 240, 0.88);
    box-shadow: var(--soft-shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

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

.movie-card.wide .poster {
    aspect-ratio: 16 / 10;
}

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

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

.poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.62), transparent 50%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.movie-card:hover .poster::after {
    opacity: 1;
}

.duration,
.rank-badge {
    position: absolute;
    z-index: 2;
    bottom: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 8px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.82);
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    left: 10px;
    right: auto;
    background: linear-gradient(135deg, #dc2626, #f97316);
}

.movie-info {
    padding: 15px;
}

.movie-info h2 {
    margin: 0;
    color: #0f172a;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 950;
}

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

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 9px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.movie-meta a {
    color: var(--blue);
}

.movie-info p {
    margin: 10px 0 0;
    color: #475569;
    font-size: 14px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    color: #1e40af;
    background: #dbeafe;
    font-size: 12px;
    font-weight: 800;
}

.rank-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.8fr);
    gap: 24px;
}

.hot-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.mini-card {
    position: relative;
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    align-items: center;
    min-height: 96px;
    padding: 12px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.mini-card:hover {
    border-color: rgba(37, 99, 235, 0.45);
}

.mini-card img {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    object-fit: cover;
    background: #e2e8f0;
}

.mini-body {
    min-width: 0;
}

.mini-body strong {
    display: block;
    color: #0f172a;
    font-size: 15px;
    font-weight: 950;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-body em {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

.mini-rank {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    color: #ffffff;
    background: var(--red);
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 900;
}

.page-hero {
    color: #ffffff;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.48), transparent 34%),
        linear-gradient(135deg, #0f172a, #1e3a8a 58%, #111827);
    padding: 58px 0;
}

.page-hero h1 {
    margin: 0;
    max-width: 900px;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.1;
    letter-spacing: -0.04em;
    font-weight: 950;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    font-weight: 700;
}

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

.player-page {
    padding: 34px 0 56px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(300px, 0.75fr);
    gap: 28px;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    box-shadow: var(--shadow);
}

.player-box video {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.54), rgba(2, 6, 23, 0.12));
    cursor: pointer;
    z-index: 3;
}

.play-layer.is-hidden {
    display: none;
}

.play-button {
    width: 92px;
    height: 92px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #dc2626);
    box-shadow: 0 18px 40px rgba(37, 99, 235, 0.35);
    font-size: 34px;
    font-weight: 900;
    cursor: pointer;
}

.detail-card,
.side-card {
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: var(--soft-shadow);
}

.detail-card {
    margin-top: 24px;
    padding: 26px;
}

.detail-card h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.16;
    font-weight: 950;
    letter-spacing: -0.03em;
}

.info-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 16px 0;
}

.info-pills span,
.info-pills a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    color: #1e40af;
    background: #dbeafe;
    font-size: 13px;
    font-weight: 900;
}

.detail-card h2,
.side-card h2 {
    margin: 28px 0 10px;
    color: #0f172a;
    font-size: 22px;
    font-weight: 950;
}

.detail-card p {
    margin: 0 0 14px;
    color: #334155;
    font-size: 16px;
}

.side-card {
    position: sticky;
    top: 88px;
    padding: 18px;
}

.side-card h2 {
    margin-top: 0;
}

.side-list {
    display: grid;
    gap: 12px;
}

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

.footer-grid {
    max-width: 1240px;
    margin: 0 auto;
    padding: 36px 20px;
    display: grid;
    grid-template-columns: 1.2fr 0.7fr 1fr;
    gap: 28px;
}

.footer-grid h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 950;
}

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

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

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

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

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

.empty-state {
    display: none;
    padding: 30px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid var(--line);
    color: var(--muted);
    text-align: center;
}

.empty-state.is-visible {
    display: block;
}

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

    .menu-toggle {
        display: flex;
    }

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

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

    .side-card {
        position: static;
    }
}

@media (max-width: 760px) {
    .header-inner {
        padding: 12px 16px;
    }

    .brand-text {
        font-size: 18px;
    }

    .hero-carousel {
        height: 560px;
    }

    .hero-content {
        bottom: 86px;
    }

    .hero-content p {
        font-size: 16px;
    }

    .hero-controls {
        left: 20px;
        right: auto;
        bottom: 34px;
    }

    .section-head {
        display: block;
    }

    .search-form,
    .filter-row,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .movie-info h2 {
        font-size: 15px;
    }

    .movie-info p {
        display: none;
    }

    .detail-card {
        padding: 20px;
    }
}

@media (max-width: 460px) {
    .container {
        padding: 0 14px;
    }

    .movie-grid,
    .category-grid,
    .hot-strip {
        grid-template-columns: 1fr;
    }

    .hero-content {
        width: calc(100% - 28px);
    }

    .play-button {
        width: 74px;
        height: 74px;
        font-size: 28px;
    }
}
