:root {
    --bg: #f8fafc;
    --bg-soft: #eff6ff;
    --text: #111827;
    --muted: #64748b;
    --slate: #0f172a;
    --blue: #1e3a8a;
    --amber: #f59e0b;
    --orange: #f97316;
    --white: #ffffff;
    --line: rgba(15, 23, 42, 0.12);
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
    min-height: 100vh;
}

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: linear-gradient(90deg, #0f172a 0%, #1e3a8a 50%, #0f172a 100%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

.header-inner {
    max-width: 1200px;
    height: 64px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    box-shadow: 0 14px 30px rgba(245, 158, 11, 0.35);
}

.brand-text,
.footer-logo span:last-child {
    font-size: 20px;
    letter-spacing: 0.5px;
    background: linear-gradient(90deg, #fde68a, #fdba74, #facc15);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    color: #d1d5db;
    font-size: 14px;
    font-weight: 700;
    padding: 23px 0 19px;
    border-bottom: 3px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fbbf24;
    border-color: #f59e0b;
}

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

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

.mobile-nav {
    display: none;
    padding: 10px 20px 18px;
    background: rgba(15, 23, 42, 0.96);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

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

.mobile-link {
    padding: 12px 14px;
    color: #d1d5db;
    border-radius: 12px;
    font-weight: 700;
}

.mobile-link:hover,
.mobile-link.is-active {
    background: rgba(245, 158, 11, 0.9);
    color: #fff;
}

.hero-slider {
    position: relative;
    height: 600px;
    overflow: hidden;
    background: #020617;
}

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

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

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

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 35%, rgba(245, 158, 11, 0.28), transparent 30%), linear-gradient(135deg, #0f172a 0%, #1e3a8a 45%, #111827 100%);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.86) 0%, rgba(0, 0, 0, 0.54) 48%, rgba(0, 0, 0, 0.14) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    height: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    color: #fff;
}

.hero-content > * {
    max-width: 680px;
}

.hero-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.hero-labels span,
.eyebrow {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    border-radius: 999px;
    color: #fff;
    background: rgba(245, 158, 11, 0.88);
    font-size: 14px;
    font-weight: 800;
}

.hero-labels span + span {
    color: #fde68a;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.hero-content h1 {
    margin: 0 0 16px;
    font-size: clamp(36px, 6vw, 58px);
    line-height: 1.08;
    letter-spacing: -1px;
}

.hero-content p {
    margin: 0 0 28px;
    color: #e5e7eb;
    font-size: 20px;
    line-height: 1.7;
}

.hero-actions,
.quick-links,
.related-channel-links div,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.primary-button,
.ghost-button,
.small-button,
.quick-search button,
.filter-panel button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 22px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.quick-search button,
.small-button {
    color: #fff;
    background: linear-gradient(90deg, #f59e0b, #f97316);
    box-shadow: 0 16px 28px rgba(245, 158, 11, 0.28);
}

.ghost-button {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.primary-button:hover,
.ghost-button:hover,
.small-button:hover,
.quick-search button:hover {
    transform: translateY(-2px) scale(1.02);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 50px;
    height: 50px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.52);
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-prev {
    left: 20px;
}

.hero-next {
    right: 20px;
}

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 36px;
    background: #f59e0b;
}

.quick-search-section,
.content-section,
.page-main,
.detail-main {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.quick-search-section {
    padding-top: 34px;
}

.quick-search {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    padding: 18px;
    margin-top: -72px;
    position: relative;
    z-index: 6;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.quick-search input,
.filter-panel input,
.filter-panel select {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 0 16px;
    color: var(--text);
    background: #fff;
    outline: none;
}

.quick-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus {
    border-color: rgba(245, 158, 11, 0.65);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.quick-links {
    margin-top: 18px;
}

.quick-links a,
.pill-link,
.tag-cloud a,
.card-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 12px;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

.content-section {
    padding-top: 64px;
}

.section-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 26px;
}

.section-bar {
    width: 5px;
    height: 40px;
    border-radius: 999px;
    background: linear-gradient(180deg, #f59e0b, #f97316);
}

.section-heading span {
    display: block;
    margin-bottom: 4px;
    color: #d97706;
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 34px);
}

.movie-grid {
    display: grid;
    gap: 22px;
}

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

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

.compact-grid {
    gap: 14px;
}

.movie-card {
    min-width: 0;
}

.card-link {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 20px;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.card-link:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 42px rgba(15, 23, 42, 0.16);
}

.poster-frame {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: radial-gradient(circle at 70% 20%, rgba(245, 158, 11, 0.34), transparent 35%), linear-gradient(135deg, #0f172a, #1e3a8a);
}

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

.card-link:hover .poster-frame img {
    transform: scale(1.09);
}

.poster-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.72) 100%);
}

.play-pill,
.rank-badge {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 900;
    border-radius: 999px;
}

.play-pill {
    right: 12px;
    bottom: 12px;
    padding: 7px 12px;
    color: #fff;
    background: rgba(245, 158, 11, 0.95);
}

.rank-badge {
    top: 12px;
    left: 12px;
    min-width: 38px;
    height: 32px;
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #f97316);
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.25);
}

.card-body {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.card-body h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.35;
}

.card-body p {
    margin: 0;
    color: #475569;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.highlight-section,
.white-panel,
.category-overview-card,
.detail-card,
.side-box,
.related-channel-links {
    padding: 28px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.highlight-section {
    background: linear-gradient(135deg, #fffbeb, #fff7ed);
}

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

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

.category-tile {
    min-height: 160px;
    padding: 22px;
    border-radius: 22px;
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #1d4ed8);
    box-shadow: 0 18px 32px rgba(30, 58, 138, 0.22);
    transition: transform 0.2s ease;
}

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

.category-tile strong {
    display: block;
    margin-bottom: 8px;
    font-size: 22px;
}

.category-tile span {
    display: inline-flex;
    padding: 5px 10px;
    margin-bottom: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fde68a;
    font-size: 13px;
    font-weight: 800;
}

.category-tile p {
    margin: 0;
    color: #dbeafe;
    line-height: 1.55;
}

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

.page-hero {
    min-height: 280px;
    padding: 42px;
    display: flex;
    align-items: center;
    border-radius: 30px;
    color: #fff;
    overflow: hidden;
    position: relative;
    background: radial-gradient(circle at 80% 20%, rgba(245, 158, 11, 0.32), transparent 28%), linear-gradient(135deg, #0f172a, #1e3a8a 60%, #0f172a);
    box-shadow: var(--shadow);
}

.page-hero span {
    display: inline-flex;
    padding: 7px 14px;
    margin-bottom: 14px;
    border-radius: 999px;
    color: #fde68a;
    background: rgba(255, 255, 255, 0.12);
    font-weight: 900;
}

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

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: #e5e7eb;
    font-size: 18px;
    line-height: 1.75;
}

.small-actions {
    margin-top: 22px;
}

.category-overview-list {
    display: grid;
    gap: 26px;
}

.category-overview-head {
    display: flex;
    gap: 20px;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.category-overview-head span {
    color: #d97706;
    font-weight: 900;
}

.category-overview-head h2 {
    margin: 6px 0 8px;
    font-size: 30px;
}

.category-overview-head p {
    max-width: 780px;
    margin: 0;
    color: #64748b;
    line-height: 1.75;
}

.filter-panel {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 12px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 22px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.filter-panel label {
    display: grid;
    gap: 7px;
    color: #475569;
    font-size: 13px;
    font-weight: 900;
}

.filter-count {
    min-height: 22px;
    margin: 0 0 18px;
    color: #64748b;
    font-weight: 800;
}

.ranking-list {
    display: grid;
    gap: 18px;
}

.movie-card-list .card-link {
    display: grid;
    grid-template-columns: 260px 1fr;
}

.movie-card-list .poster-frame {
    aspect-ratio: 16 / 9;
    height: 100%;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 22px;
    color: #64748b;
    font-size: 14px;
    font-weight: 800;
}

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

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

.detail-left {
    min-width: 0;
    display: grid;
    gap: 24px;
}

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

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

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

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

.player-play-icon {
    width: 82px;
    height: 82px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 158, 11, 0.95);
    box-shadow: 0 16px 34px rgba(245, 158, 11, 0.32);
    font-size: 34px;
}

.player-cover strong {
    font-size: clamp(24px, 4vw, 38px);
}

.player-cover em {
    font-style: normal;
    color: #fde68a;
    font-weight: 900;
}

.player-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    gap: 10px;
    justify-content: flex-start;
    padding: 16px;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.76));
    opacity: 0;
    transition: opacity 0.2s ease;
}

.player-shell:hover .player-controls,
.player-shell.is-playing .player-controls {
    opacity: 1;
}

.player-controls button {
    border: 0;
    border-radius: 999px;
    padding: 8px 14px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
}

.player-controls button:first-child {
    background: #f59e0b;
}

.detail-card h1 {
    margin: 10px 0 0;
    font-size: clamp(28px, 4vw, 42px);
}

.detail-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.detail-one-line {
    color: #334155;
    font-size: 18px;
    line-height: 1.75;
}

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

.detail-meta-grid div {
    padding: 16px;
    border-radius: 16px;
    background: #eff6ff;
}

.detail-meta-grid span {
    display: block;
    margin-bottom: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 900;
}

.detail-meta-grid strong {
    display: block;
    color: #0f172a;
    line-height: 1.45;
}

.detail-text h2,
.side-box h2,
.related-channel-links h2 {
    margin: 24px 0 10px;
    font-size: 24px;
}

.detail-text p,
.side-box p {
    color: #475569;
    line-height: 1.9;
}

.side-poster {
    overflow: hidden;
    border-radius: 24px;
    background: linear-gradient(135deg, #0f172a, #1e3a8a);
    box-shadow: var(--shadow);
}

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

.detail-side {
    display: grid;
    align-content: start;
    gap: 20px;
}

.side-box a {
    color: #d97706;
    font-weight: 900;
}

.detail-related {
    padding-left: 0;
    padding-right: 0;
}

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

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 42px 20px;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 28px;
}

.footer-brand p,
.footer-links a {
    color: #94a3b8;
    line-height: 1.8;
}

.footer-links h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 18px;
}

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

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

.is-hidden {
    display: none !important;
}

@media (max-width: 1100px) {
    .movie-grid-4,
    .ranking-strip,
    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .detail-side {
        grid-template-columns: 220px 1fr;
    }
}

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

    .mobile-menu-button {
        display: block;
    }

    .hero-slider {
        height: 540px;
    }

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

    .quick-search,
    .filter-panel,
    .movie-card-list .card-link,
    .footer-inner,
    .detail-meta-grid,
    .detail-side {
        grid-template-columns: 1fr;
    }

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

    .page-hero {
        padding: 30px 22px;
    }

    .hero-arrow {
        display: none;
    }
}

@media (max-width: 560px) {
    .header-inner {
        padding: 0 14px;
    }

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

    .hero-slider {
        height: 500px;
    }

    .hero-content {
        padding: 0 18px;
    }

    .hero-actions,
    .quick-links {
        gap: 10px;
    }

    .primary-button,
    .ghost-button,
    .small-button {
        width: 100%;
    }

    .movie-grid-3,
    .movie-grid-4,
    .ranking-strip,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .quick-search-section,
    .content-section,
    .page-main,
    .detail-main {
        padding-left: 14px;
        padding-right: 14px;
    }

    .highlight-section,
    .white-panel,
    .category-overview-card,
    .detail-card,
    .side-box,
    .related-channel-links {
        padding: 20px;
    }
}
