:root {
    --bg: #f8fafc;
    --panel: #ffffff;
    --ink: #1e293b;
    --muted: #64748b;
    --line: #e2e8f0;
    --dark: #0f172a;
    --dark-soft: #1e293b;
    --accent: #f97316;
    --accent-2: #dc2626;
    --purple: #9333ea;
    --teal: #0d9488;
    --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
    color: var(--ink);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 80;
    color: #ffffff;
    background: linear-gradient(90deg, #0f172a 0%, #1e293b 52%, #0f172a 100%);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(14px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: max-content;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #ffffff;
    font-weight: 900;
    box-shadow: 0 12px 25px rgba(249, 115, 22, 0.35);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-text strong {
    font-size: 20px;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, #fdba74, #ef4444);
    -webkit-background-clip: text;
    color: transparent;
}

.brand-text em {
    font-style: normal;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}

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

.nav-link {
    color: #cbd5e1;
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fb923c;
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.filter-input,
.filter-select {
    border: 1px solid rgba(148, 163, 184, 0.25);
    outline: none;
    color: #ffffff;
    background: rgba(51, 65, 85, 0.92);
    border-radius: 12px;
    padding: 10px 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    width: 230px;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-input:focus,
.filter-select:focus {
    border-color: rgba(249, 115, 22, 0.8);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.16);
}

.header-search button,
.mobile-search button,
.primary-btn,
.ghost-btn {
    border: 0;
    border-radius: 12px;
    padding: 10px 16px;
    color: #ffffff;
    font-weight: 800;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.28);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.primary-btn:hover,
.ghost-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 35px rgba(249, 115, 22, 0.35);
}

.ghost-btn {
    background: rgba(255, 255, 255, 0.18);
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    color: #e2e8f0;
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 0 0 18px;
}

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

.mobile-panel nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.mobile-panel nav a {
    padding: 10px 12px;
    border-radius: 12px;
    color: #dbeafe;
    background: rgba(30, 41, 59, 0.78);
}

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

.home-main,
.page-main {
    padding: 32px 0 56px;
}

.hero-section {
    position: relative;
    min-height: clamp(430px, 58vw, 620px);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: #020617;
    isolation: isolate;
}

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

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

.hero-slide img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(249, 115, 22, 0.35), transparent 32%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.72) 45%, rgba(2, 6, 23, 0.18) 100%),
        linear-gradient(0deg, rgba(2, 6, 23, 0.78), transparent 55%);
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 720px;
    padding: clamp(32px, 8vw, 86px);
    color: #ffffff;
}

.hero-kicker,
.section-kicker,
.card-category,
.card-year,
.rank-badge {
    display: inline-flex;
    align-items: center;
    width: max-content;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    font-size: 13px;
    font-weight: 850;
    padding: 7px 12px;
}

.hero-content h1,
.hero-content h2 {
    margin: 18px 0 16px;
    font-size: clamp(34px, 6vw, 66px);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 660px;
    color: #dbeafe;
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.75;
    margin: 0 0 24px;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.hero-tags span {
    border-radius: 999px;
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff7ed;
    backdrop-filter: blur(10px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-controls {
    position: absolute;
    z-index: 4;
    right: 26px;
    bottom: 26px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-control {
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(2, 6, 23, 0.62);
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-control:hover {
    background: rgba(2, 6, 23, 0.86);
    transform: translateY(-1px);
}

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

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

.hero-dot.is-active {
    width: 34px;
    background: var(--accent);
}

.section-block {
    margin-top: 34px;
    border-radius: 28px;
    padding: clamp(20px, 4vw, 34px);
    background: var(--panel);
    box-shadow: var(--soft-shadow);
}

.section-block.dark-gradient {
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb 0%, #0d9488 100%);
}

.section-block.purple-gradient {
    color: #ffffff;
    background: linear-gradient(135deg, #9333ea 0%, #ec4899 100%);
}

.section-block.green-gradient {
    color: #ffffff;
    background: linear-gradient(135deg, #22c55e 0%, #2563eb 100%);
}

.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, 36px);
    line-height: 1.1;
    font-weight: 920;
    letter-spacing: -0.03em;
}

.section-desc {
    color: var(--muted);
    line-height: 1.75;
    max-width: 760px;
    margin: 10px 0 0;
}

.dark-gradient .section-desc,
.purple-gradient .section-desc,
.green-gradient .section-desc {
    color: rgba(255, 255, 255, 0.82);
}

.more-link {
    color: var(--accent);
    font-weight: 850;
}

.dark-gradient .more-link,
.purple-gradient .more-link,
.green-gradient .more-link {
    color: #ffffff;
}

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

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

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

.movie-card {
    position: relative;
    display: block;
    overflow: hidden;
    min-width: 0;
    border-radius: 20px;
    background: #ffffff;
    color: var(--ink);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.movie-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.16);
}

.card-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #111827;
}

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

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

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

.card-poster::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.48), transparent 58%);
    opacity: 0.9;
}

.card-year {
    position: absolute;
    z-index: 2;
    right: 12px;
    bottom: 12px;
    padding: 5px 9px;
    background: rgba(2, 6, 23, 0.72);
}

.card-category {
    position: absolute;
    z-index: 2;
    left: 12px;
    top: 12px;
}

.rank-badge {
    position: absolute;
    z-index: 2;
    left: 12px;
    bottom: 12px;
    background: linear-gradient(90deg, #facc15, #f97316);
    color: #111827;
}

.card-body {
    padding: 16px;
}

.card-body h3,
.card-body strong {
    display: block;
    min-height: 2.8em;
    margin: 0 0 8px;
    color: #1f2937;
    font-size: 17px;
    font-weight: 850;
    line-height: 1.4;
    overflow: hidden;
}

.card-body p {
    margin: 0 0 14px;
    min-height: 3.3em;
    color: #64748b;
    font-size: 14px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.large-card .card-body p {
    -webkit-line-clamp: 3;
    min-height: 4.8em;
}

.card-meta,
.tag-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
}

.card-meta span,
.tag-row span {
    border-radius: 999px;
    padding: 5px 9px;
    background: #ffedd5;
    color: #ea580c;
    font-weight: 750;
}

.tag-row {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.tag-row span {
    color: #475569;
    background: #f1f5f9;
}

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

.horizontal-card {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
}

.horizontal-card .card-poster {
    height: 100%;
    aspect-ratio: auto;
}

.horizontal-card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

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

.channel-card {
    display: block;
    border-radius: 24px;
    padding: 24px;
    color: #ffffff;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.28), transparent 38%),
        linear-gradient(135deg, #0f172a, #334155);
    box-shadow: var(--soft-shadow);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.channel-card h2,
.channel-card h3 {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 900;
}

.channel-card p {
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.76);
    line-height: 1.7;
}

.channel-card span {
    display: inline-flex;
    border-radius: 999px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.16);
    font-weight: 850;
}

.page-hero {
    border-radius: 28px;
    padding: clamp(28px, 6vw, 56px);
    color: #ffffff;
    background:
        radial-gradient(circle at 18% 0%, rgba(249, 115, 22, 0.42), transparent 30%),
        linear-gradient(135deg, #0f172a 0%, #1e293b 52%, #7c2d12 100%);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.page-hero h1 {
    margin: 12px 0;
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 780px;
    margin: 0;
    color: #dbeafe;
    font-size: 17px;
    line-height: 1.8;
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    border-radius: 20px;
    padding: 16px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

.filter-input,
.filter-select {
    flex: 1;
    min-width: 0;
    color: #1e293b;
    background: #f8fafc;
    border-color: #e2e8f0;
}

.filter-empty {
    display: none;
    border-radius: 18px;
    padding: 24px;
    color: #64748b;
    text-align: center;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
}

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

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

.breadcrumb a {
    color: #ea580c;
    font-weight: 800;
}

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

.detail-panel,
.side-panel {
    border-radius: 28px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
    overflow: hidden;
}

.detail-body {
    padding: clamp(22px, 4vw, 34px);
}

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

.detail-body h1 {
    margin: 0;
    font-size: clamp(26px, 4vw, 42px);
    line-height: 1.15;
    font-weight: 950;
    letter-spacing: -0.03em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
    color: #475569;
}

.detail-meta span {
    border-radius: 999px;
    padding: 8px 12px;
    background: #f1f5f9;
    font-weight: 760;
}

.detail-section {
    margin-top: 24px;
}

.detail-section h2 {
    margin: 0 0 10px;
    color: #1f2937;
    font-size: 22px;
    font-weight: 900;
}

.detail-section p {
    margin: 0;
    color: #475569;
    line-height: 1.85;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-tags span {
    display: inline-flex;
    border-radius: 999px;
    padding: 8px 12px;
    color: #475569;
    background: #f1f5f9;
    font-weight: 760;
}

.player-panel {
    position: relative;
    overflow: hidden;
    border-radius: 26px 26px 0 0;
    background: #000000;
    aspect-ratio: 16 / 9;
}

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

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    background: #000000;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.76;
}

.player-cover::after {
    position: absolute;
    inset: 0;
    content: "";
    background:
        radial-gradient(circle at center, rgba(249, 115, 22, 0.36), transparent 30%),
        linear-gradient(0deg, rgba(0, 0, 0, 0.76), rgba(0, 0, 0, 0.2));
}

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

.player-button {
    position: relative;
    z-index: 2;
    width: 82px;
    height: 82px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    font-size: 34px;
    font-weight: 900;
    box-shadow: 0 18px 42px rgba(249, 115, 22, 0.42);
    padding-left: 5px;
    transition: transform 0.2s ease;
}

.player-cover:hover .player-button {
    transform: scale(1.06);
}

.side-panel {
    padding: 22px;
    position: sticky;
    top: 96px;
}

.side-panel h2 {
    margin: 0 0 16px;
    font-size: 22px;
    font-weight: 930;
}

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

.side-item {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.side-item img {
    width: 112px;
    height: 70px;
    object-fit: cover;
    border-radius: 14px;
}

.side-item strong {
    display: block;
    color: #1f2937;
    font-size: 14px;
    line-height: 1.45;
    margin-bottom: 5px;
}

.side-item:hover strong {
    color: #ea580c;
}

.side-item span {
    color: #64748b;
    font-size: 12px;
}

.related-section {
    margin-top: 30px;
}

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

.ranking-row {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--soft-shadow);
    overflow: hidden;
}

.ranking-number {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #111827;
    background: linear-gradient(135deg, #facc15, #f97316);
    font-weight: 950;
    font-size: 20px;
}

.ranking-row .horizontal-card {
    border-radius: 0;
    box-shadow: none;
}

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

.footer-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 34px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
    margin-bottom: 14px;
}

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

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

.footer-grid ul {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    list-style: none;
}

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

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

.back-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 70;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 999px;
    display: none;
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    font-size: 22px;
    font-weight: 900;
    box-shadow: 0 16px 34px rgba(249, 115, 22, 0.36);
    cursor: pointer;
}

.back-top.is-visible {
    display: block;
}

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

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

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

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

    .side-panel {
        position: static;
    }
}

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

    .desktop-nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

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

    .hero-section {
        min-height: 520px;
        border-radius: 22px;
    }

    .hero-content {
        padding: 30px 22px 86px;
    }

    .hero-controls {
        right: 16px;
        bottom: 18px;
    }

    .hero-dots {
        left: 24px;
        bottom: 28px;
        transform: none;
    }

    .section-head {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .channel-grid {
        grid-template-columns: 1fr;
    }

    .horizontal-card {
        grid-template-columns: 132px minmax(0, 1fr);
    }

    .horizontal-card .card-body p {
        display: none;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .detail-title-row {
        flex-direction: column;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .main-shell,
    .footer-shell,
    .header-shell,
    .mobile-panel {
        width: min(100% - 22px, 1180px);
    }

    .movie-grid,
    .movie-grid.compact,
    .movie-grid.search-grid {
        grid-template-columns: 1fr;
    }

    .card-body h3,
    .card-body strong {
        min-height: auto;
    }

    .card-body p {
        min-height: auto;
    }

    .side-item {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .side-item img {
        width: 96px;
        height: 62px;
    }
}
