:root {
    color-scheme: light;
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --text: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #f59e0b;
    --brand-strong: #ea580c;
    --dark: #0f172a;
    --dark-soft: #1e293b;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
    --radius: 18px;
    font-family: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(14px);
}

.nav-wrap {
    height: 76px;
    display: flex;
    align-items: center;
    gap: 24px;
}

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

.brand-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    box-shadow: 0 10px 22px rgba(245, 158, 11, 0.35);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.main-nav a,
.mobile-panel a {
    padding: 10px 14px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.84);
    font-weight: 600;
    transition: 0.25s ease;
}

.main-nav a:hover,
.main-nav a.active,
.mobile-panel a:hover,
.mobile-panel a.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.top-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 310px;
    padding: 6px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
}

.top-search input,
.mobile-panel input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    border: 1px solid transparent;
    outline: 0;
    border-radius: 12px;
    color: var(--text);
    background: #ffffff;
    padding: 12px 14px;
    font: inherit;
}

.top-search input {
    min-width: 0;
    padding: 9px 12px;
}

.top-search button,
.mobile-panel button {
    border: 0;
    border-radius: 11px;
    padding: 9px 13px;
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    cursor: pointer;
}

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

.mobile-panel {
    display: none;
    padding: 0 16px 18px;
    background: rgba(15, 23, 42, 0.98);
}

.mobile-panel nav {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

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

.hero-carousel {
    position: relative;
    height: min(72vh, 640px);
    min-height: 420px;
    overflow: hidden;
    background: var(--dark);
}

.hero-stage,
.hero-slide {
    position: absolute;
    inset: 0;
}

.hero-slide {
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.9s ease, transform 1.2s ease;
    pointer-events: none;
}

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

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: radial-gradient(circle at 30% 20%, #475569, #0f172a 58%);
}

.hero-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.52) 46%, rgba(15, 23, 42, 0.28)), linear-gradient(90deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.36), rgba(15, 23, 42, 0.08));
}

.hero-inner {
    position: relative;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding-bottom: 82px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 6px 14px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    box-shadow: 0 12px 24px rgba(245, 158, 11, 0.26);
}

.eyebrow.dark {
    color: #b45309;
    background: #fffbeb;
    box-shadow: none;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 18px 0 8px;
    font-size: clamp(34px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.055em;
}

.hero-title {
    margin: 0 0 12px;
    color: #fed7aa;
    font-size: clamp(18px, 2.3vw, 30px);
    font-weight: 800;
}

.hero-text {
    max-width: 660px;
    margin: 0 0 22px;
    color: #e2e8f0;
    font-size: clamp(15px, 1.7vw, 19px);
}

.hero-tags,
.watch-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.hero-tags span,
.watch-meta span,
.card-meta span {
    border-radius: 999px;
    padding: 5px 10px;
    color: #f8fafc;
    font-size: 13px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.14);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    border-radius: 14px;
    padding: 0 22px;
    font-weight: 800;
    transition: 0.25s ease;
}

.btn.primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    box-shadow: 0 14px 28px rgba(245, 158, 11, 0.26);
}

.btn.ghost {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

.btn.plain {
    color: var(--dark);
    background: var(--surface-soft);
}

.btn.small {
    min-height: 38px;
    padding: 0 16px;
    border-radius: 12px;
    font-size: 14px;
}

.btn:hover,
.movie-card:hover {
    transform: translateY(-3px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    color: #ffffff;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.42);
    transition: 0.25s ease;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.68);
}

.hero-prev {
    left: 22px;
}

.hero-next {
    right: 22px;
}

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

.hero-dots button {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
    transition: 0.25s ease;
}

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

.category-band {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: -36px;
    position: relative;
    z-index: 5;
}

.category-chip {
    min-height: 116px;
    border-radius: var(--radius);
    padding: 22px;
    color: #ffffff;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    box-shadow: var(--shadow);
    transition: 0.25s ease;
}

.category-chip:nth-child(2n) {
    background: linear-gradient(135deg, #92400e, #c2410c);
}

.category-chip:hover {
    transform: translateY(-4px);
}

.category-chip span {
    display: block;
    margin-bottom: 8px;
    font-size: 20px;
    font-weight: 900;
}

.category-chip em {
    color: rgba(255, 255, 255, 0.78);
    font-style: normal;
    font-size: 14px;
}

.content-section,
.container[data-filter-page] {
    padding-top: 54px;
}

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

.section-head.strong {
    align-items: center;
    margin-top: 18px;
}

.section-head h2,
.page-hero h1,
.detail-content h2,
.detail-side h2 {
    margin: 0;
    color: var(--dark);
    line-height: 1.18;
    letter-spacing: -0.035em;
}

.section-head h2 {
    font-size: clamp(24px, 3vw, 34px);
}

.section-more {
    color: #c2410c;
    font-weight: 800;
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 160px 150px 160px;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

.filter-panel input,
.filter-panel select {
    border-color: var(--line);
    background: var(--surface-soft);
}

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    transition: 0.25s ease;
}

.movie-card.is-hidden {
    display: none;
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: radial-gradient(circle at 25% 15%, #fbbf24, #334155 48%, #0f172a 100%);
}

.card-small .poster-link {
    aspect-ratio: 3 / 4;
}

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

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

.poster-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.78), rgba(15, 23, 42, 0.02) 58%);
}

.play-mark {
    position: absolute;
    right: 12px;
    bottom: 12px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    box-shadow: 0 12px 26px rgba(245, 158, 11, 0.36);
}

.rank-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    border-radius: 999px;
    padding: 5px 10px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(10px);
}

.card-body {
    padding: 16px;
}

.card-meta {
    gap: 6px;
    margin-bottom: 9px;
}

.card-meta span {
    color: #b45309;
    background: #fffbeb;
    font-size: 12px;
}

.card-body h3 {
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.28;
}

.card-small .card-body h3 {
    font-size: 16px;
}

.card-body h3 a:hover {
    color: #c2410c;
}

.card-body p {
    min-height: 48px;
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 14px;
}

.tag-row,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.tag-row span,
.tag-cloud a {
    border-radius: 999px;
    padding: 4px 9px;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
    background: #f1f5f9;
}

.card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
}

.card-foot a {
    color: #c2410c;
    font-weight: 800;
    font-size: 13px;
}

.card-foot strong,
.watch-meta strong {
    border-radius: 10px;
    padding: 4px 9px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
}

.page-main {
    padding: 46px 0 70px;
}

.page-hero {
    padding: 34px;
    border-radius: 28px;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
    border: 1px solid var(--line);
}

.page-hero h1 {
    margin-top: 14px;
    font-size: clamp(30px, 5vw, 54px);
}

.page-hero p {
    max-width: 760px;
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 18px;
}

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

.category-overview-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07);
}

.category-title {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 22px;
    font-weight: 900;
}

.category-links {
    display: grid;
    gap: 6px;
    margin: 16px 0;
}

.category-links a {
    color: #475569;
    font-size: 14px;
}

.category-links a:hover {
    color: #c2410c;
}

.watch-page {
    background: var(--bg);
}

.watch-hero {
    padding: 40px 0;
    color: #ffffff;
    background: radial-gradient(circle at 20% 0, rgba(245, 158, 11, 0.26), transparent 28%), linear-gradient(135deg, #0f172a, #111827 60%, #1e293b);
}

.watch-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.9fr);
    gap: 30px;
    align-items: center;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    background: #020617;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.46);
    aspect-ratio: 16 / 9;
}

.movie-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #020617;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    cursor: pointer;
    background: radial-gradient(circle, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.62));
}

.play-overlay span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: 34px;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    box-shadow: 0 18px 42px rgba(245, 158, 11, 0.34);
}

.player-shell.is-playing .play-overlay {
    opacity: 0;
    pointer-events: none;
}

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

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

.breadcrumb em {
    color: #ffffff;
    font-style: normal;
}

.watch-info h1 {
    margin: 16px 0 12px;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.watch-desc {
    margin: 0 0 18px;
    color: #e2e8f0;
    font-size: 17px;
}

.watch-meta {
    margin-top: 18px;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    padding: 46px 0 78px;
}

.detail-content,
.detail-side {
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 28px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.detail-content h2,
.detail-side h2 {
    margin: 0 0 14px;
    font-size: 26px;
}

.detail-content p {
    margin: 0 0 26px;
    color: #334155;
    font-size: 17px;
}

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

.info-list div {
    padding: 14px;
    border-radius: 14px;
    background: #f8fafc;
}

.info-list dt {
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

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

.prev-next {
    display: grid;
    gap: 10px;
    margin-top: 24px;
}

.prev-next a {
    padding: 14px 16px;
    border-radius: 14px;
    color: #c2410c;
    background: #fff7ed;
    font-weight: 800;
}

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

.detail-side .movie-card {
    display: grid;
    grid-template-columns: 110px 1fr;
}

.detail-side .poster-link {
    aspect-ratio: 3 / 4;
    height: 100%;
}

.detail-side .card-body p,
.detail-side .tag-row,
.detail-side .card-meta {
    display: none;
}

.detail-side .card-body {
    padding: 14px;
}

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

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 26px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-grid p {
    max-width: 540px;
    margin: 12px 0 0;
    color: #94a3b8;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-content: flex-start;
}

.footer-links a {
    padding: 9px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
}

.footer-bottom {
    padding-top: 22px;
    color: #94a3b8;
    font-size: 14px;
}

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

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

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

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

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

    .detail-side .movie-card {
        grid-template-columns: 120px 1fr;
    }
}

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

    .nav-wrap {
        height: 64px;
    }

    .main-nav {
        display: none;
    }

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

    .mobile-panel.is-open {
        display: block;
    }

    .hero-carousel {
        height: 620px;
        min-height: 560px;
    }

    .hero-inner {
        padding-bottom: 78px;
        align-items: flex-end;
    }

    .hero-arrow {
        top: auto;
        bottom: 22px;
        width: 38px;
        height: 38px;
        font-size: 28px;
    }

    .hero-prev {
        left: 16px;
    }

    .hero-next {
        right: 16px;
    }

    .hero-dots {
        bottom: 34px;
    }

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

    .category-band {
        margin-top: 18px;
    }

    .category-chip {
        min-height: 112px;
        padding: 18px;
    }

    .filter-panel {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .section-head,
    .footer-grid {
        display: grid;
    }

    .page-main {
        padding-top: 28px;
    }

    .page-hero {
        padding: 24px;
        border-radius: 22px;
    }

    .watch-hero {
        padding: 24px 0;
    }

    .detail-content,
    .detail-side {
        padding: 20px;
    }

    .info-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .brand {
        font-size: 18px;
    }

    .brand-icon {
        width: 34px;
        height: 34px;
    }

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

    .card-small {
        display: grid;
        grid-template-columns: 122px 1fr;
    }

    .card-small .poster-link {
        aspect-ratio: 3 / 4;
        height: 100%;
    }

    .card-small .card-body p,
    .card-small .tag-row {
        display: none;
    }

    .detail-side .movie-card {
        grid-template-columns: 110px 1fr;
    }
}
