* {
    box-sizing: border-box;
}

:root {
    --bg: #0f172a;
    --bg-soft: #111827;
    --card: #ffffff;
    --text: #111827;
    --muted: #64748b;
    --line: #e5e7eb;
    --red: #ef4444;
    --orange: #f97316;
    --rose: #fb7185;
    --cyan: #06b6d4;
    --blue: #2563eb;
    --shadow: 0 22px 55px rgba(15, 23, 42, 0.14);
}

html {
    scroll-behavior: smooth;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
}

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

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 12px 32px rgba(239, 68, 68, 0.35);
}

.desktop-nav {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 15px;
    white-space: nowrap;
}

.desktop-nav a,
.mobile-panel a {
    color: rgba(255, 255, 255, 0.84);
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-panel a:hover {
    color: #fb923c;
}

.top-search {
    width: 300px;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-radius: 999px;
    background: #1f2937;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.top-search input,
.mobile-panel input,
.filter-box input,
.filter-box select {
    width: 100%;
    border: 0;
    outline: 0;
    color: inherit;
    background: transparent;
    font: inherit;
}

.top-search input {
    color: #fff;
    padding: 10px 14px;
}

.top-search button,
.mobile-panel button {
    border: 0;
    color: #fff;
    padding: 10px 16px;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, var(--red), var(--orange));
}

.menu-btn {
    display: none;
    border: 0;
    color: #fff;
    font-size: 26px;
    background: transparent;
}

.mobile-panel {
    display: none;
    padding: 0 20px 20px;
    background: #111827;
}

.mobile-panel.open {
    display: grid;
    gap: 14px;
}

.mobile-panel form {
    display: flex;
    overflow: hidden;
    border-radius: 14px;
    background: #1f2937;
}

.mobile-panel input {
    color: #fff;
    padding: 12px;
}

.hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background: radial-gradient(circle at 15% 20%, rgba(239, 68, 68, 0.36), transparent 32%),
                radial-gradient(circle at 80% 10%, rgba(249, 115, 22, 0.28), transparent 30%),
                linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #7f1d1d 100%);
}

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

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    align-items: center;
    gap: 46px;
    opacity: 0;
    transform: translateX(26px);
    pointer-events: none;
    transition: opacity 0.55s ease, transform 0.55s ease;
}

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

.hero-bg {
    order: 2;
    position: relative;
    min-height: 470px;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
}

.hero-bg::before {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: 2;
    background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.1) 42%, rgba(15, 23, 42, 0.92));
}

.hero-bg img {
    width: 100%;
    height: 100%;
    min-height: 470px;
    object-fit: cover;
    transform: scale(1.02);
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 60px 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    margin-bottom: 18px;
    color: #fed7aa;
    border: 1px solid rgba(251, 146, 60, 0.32);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(12px);
}

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

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

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

.hero-tags span,
.tag-row span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    color: #fff;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
}

.hero-actions,
.section-head,
.meta-row,
.detail-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-actions {
    margin-top: 28px;
}

.primary-btn,
.ghost-btn,
.more-link,
.filter-box button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.primary-btn,
.filter-box button {
    color: #fff;
    border: 0;
    cursor: pointer;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 16px 38px rgba(239, 68, 68, 0.32);
}

.ghost-btn {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.08);
}

.primary-btn:hover,
.ghost-btn:hover,
.more-link:hover,
.filter-box button:hover {
    transform: translateY(-2px);
}

.hero-dots {
    position: absolute;
    left: 0;
    bottom: 44px;
    z-index: 4;
    display: flex;
    gap: 10px;
}

.hero-dots button {
    width: 38px;
    height: 5px;
    border: 0;
    padding: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.34);
}

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

.hero-strip {
    width: min(1180px, calc(100% - 32px));
    margin: -46px auto 0;
    position: relative;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.strip-card,
.category-card,
.filter-box,
.detail-panel,
.movie-card,
.rank-card,
.search-result {
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow);
}

.strip-card {
    min-height: 132px;
    padding: 20px;
    display: grid;
    gap: 8px;
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.strip-card strong {
    font-size: 20px;
}

.strip-card span {
    color: var(--muted);
}

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

.section {
    padding: 72px 0 0;
}

.section-head {
    justify-content: space-between;
    margin-bottom: 28px;
}

.section-title {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.12;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.section-subtitle,
.page-hero p,
.category-card p,
.movie-info p,
.detail-panel p,
.search-empty {
    color: var(--muted);
}

.more-link {
    color: #ea580c;
    background: #fff7ed;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.2);
}

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

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

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

.poster-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 38%, rgba(0, 0, 0, 0.68));
}

.play-dot {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.62);
    backdrop-filter: blur(8px);
}

.movie-info {
    padding: 16px;
}

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

.movie-info h3 a:hover {
    color: #ea580c;
}

.movie-info p {
    min-height: 52px;
    margin: 0 0 12px;
    font-size: 14px;
}

.meta-row {
    gap: 8px;
    color: #475569;
    font-size: 13px;
}

.meta-row span {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 999px;
    background: #f1f5f9;
}

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

.tag-row span,
.detail-tags span {
    color: #9a3412;
    background: #ffedd5;
    font-size: 12px;
}

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

.rank-card {
    display: grid;
    grid-template-columns: 48px 82px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.16);
}

.rank-card img {
    width: 82px;
    height: 108px;
    object-fit: cover;
    border-radius: 14px;
    background: #111827;
}

.rank-no {
    color: transparent;
    font-size: 26px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--red), var(--orange));
    -webkit-background-clip: text;
    background-clip: text;
}

.rank-info {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.rank-info strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 18px;
}

.rank-info em {
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
}

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

.category-card {
    overflow: hidden;
    min-height: 220px;
    position: relative;
    display: grid;
    align-content: end;
    padding: 26px;
    color: #fff;
    background: #111827;
    border: 1px solid rgba(226, 232, 240, 0.9);
}

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

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

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.35), rgba(127, 29, 29, 0.84));
}

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

.category-card h2 {
    margin: 0 0 8px;
    font-size: 28px;
}

.category-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
}

.page-hero {
    color: #fff;
    background: radial-gradient(circle at 20% 20%, rgba(239, 68, 68, 0.34), transparent 30%),
                linear-gradient(135deg, #0f172a, #1e1b4b 55%, #7f1d1d);
}

.page-hero-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 76px 0 68px;
}

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

.breadcrumb {
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.74);
}

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

.filter-box {
    margin: -28px auto 30px;
    padding: 18px;
    position: relative;
    z-index: 4;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 180px 160px auto;
    gap: 12px;
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.filter-box input,
.filter-box select {
    height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.detail-layout {
    width: min(1180px, calc(100% - 32px));
    margin: 36px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.92fr);
    gap: 28px;
}

.player-shell {
    overflow: hidden;
    border-radius: 26px;
    background: #000;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

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

.player-frame video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: grid;
    place-items: center;
    color: #fff;
    border: 0;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.62));
}

.play-overlay span {
    width: 86px;
    height: 86px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 32px;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

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

.detail-panel {
    padding: 24px;
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.detail-panel h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.12;
    letter-spacing: -0.03em;
}

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

.detail-meta span {
    padding: 5px 10px;
    border-radius: 999px;
    background: #f1f5f9;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 0;
}

.detail-content {
    margin-top: 26px;
    display: grid;
    gap: 18px;
}

.detail-content h2 {
    margin: 0;
    font-size: 24px;
}

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

.side-list .rank-card {
    grid-template-columns: 34px 68px minmax(0, 1fr);
    border-radius: 18px;
}

.side-list .rank-card img {
    width: 68px;
    height: 88px;
}

.side-list .rank-no {
    font-size: 20px;
}

.search-result {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 16px;
    padding: 14px;
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.search-result img {
    width: 96px;
    height: 128px;
    object-fit: cover;
    border-radius: 16px;
    background: #111827;
}

.search-result h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.search-result p {
    margin: 0 0 10px;
    color: var(--muted);
}

.search-list {
    display: grid;
    gap: 14px;
}

.site-footer {
    margin-top: 78px;
    color: #d1d5db;
    background: linear-gradient(180deg, #111827, #020617);
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 48px 0;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 36px;
}

.footer-grid h3 {
    margin: 0 0 14px;
    color: #fff;
}

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

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

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

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 28px;
    color: #94a3b8;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 1120px) {
    .desktop-nav,
    .top-search {
        display: none;
    }

    .menu-btn {
        display: block;
        margin-left: auto;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .hero-bg {
        position: absolute;
        inset: 80px 0 56px;
        order: initial;
        opacity: 0.34;
    }

    .hero-content {
        max-width: 820px;
    }

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

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

@media (max-width: 760px) {
    .nav-wrap {
        min-height: 64px;
    }

    .logo {
        font-size: 17px;
    }

    .hero-stage {
        min-height: 610px;
    }

    .hero h1,
    .page-hero h1 {
        font-size: 38px;
    }

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

    .hero-strip,
    .category-grid,
    .rank-zone,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-strip {
        margin-top: 20px;
    }

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

    .movie-info {
        padding: 12px;
    }

    .movie-info h3 {
        font-size: 16px;
    }

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

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

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

    .rank-card img {
        width: 72px;
        height: 96px;
    }

    .detail-panel {
        padding: 18px;
    }

    .play-overlay span {
        width: 68px;
        height: 68px;
        font-size: 26px;
    }
}

@media (max-width: 440px) {
    .movie-grid {
        grid-template-columns: 1fr;
    }
}
