:root {
    --color-night-900: #102a43;
    --color-night-850: #18324f;
    --color-night-800: #243b53;
    --color-night-700: #334e68;
    --color-night-600: #486581;
    --color-amber-500: #f59e0b;
    --color-amber-400: #fbbf24;
    --color-text: #f3f4f6;
    --color-muted: #cbd5e1;
    --color-soft: #94a3b8;
    --shadow-glow: 0 0 24px rgba(251, 191, 36, 0.26);
    --shadow-card: 0 22px 45px rgba(0, 0, 0, 0.26);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--color-text);
    background: radial-gradient(circle at top left, rgba(245, 158, 11, 0.10), transparent 32rem), var(--color-night-900);
    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 {
    font: inherit;
}

button {
    cursor: pointer;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(36, 59, 83, 0.95);
    backdrop-filter: blur(18px);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1280px;
    height: 72px;
    margin: 0 auto;
    padding: 0 24px;
    gap: 22px;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.logo-mark {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-amber-500), var(--color-amber-400));
    border-radius: 12px;
    box-shadow: var(--shadow-glow);
}

.logo-text {
    font-size: 20px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex: 1;
    justify-content: center;
}

.nav-link {
    color: var(--color-muted);
    font-size: 15px;
    transition: color 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--color-amber-400);
}

.header-search,
.mobile-search,
.search-page-form,
.filter-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-search input,
.mobile-search input,
.search-page-form input,
.filter-box input {
    width: 240px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    outline: none;
    color: #ffffff;
    background: rgba(16, 42, 67, 0.76);
    border-radius: 12px;
    padding: 11px 14px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.header-search input:focus,
.mobile-search input:focus,
.search-page-form input:focus,
.filter-box input:focus {
    border-color: var(--color-amber-500);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.16);
}

.header-search button,
.mobile-search button,
.filter-box button {
    border: 0;
    color: #ffffff;
    background: var(--color-night-700);
    border-radius: 12px;
    padding: 11px 14px;
    transition: background 0.25s ease, transform 0.25s ease;
}

.header-search button:hover,
.mobile-search button:hover,
.filter-box button:hover {
    background: var(--color-night-600);
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(16, 42, 67, 0.6);
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.mobile-toggle span {
    width: 18px;
    height: 2px;
    background: #ffffff;
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    padding: 16px 24px 20px;
    background: rgba(36, 59, 83, 0.98);
}

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

.mobile-search input {
    flex: 1;
    width: 100%;
}

.mobile-nav {
    display: grid;
    gap: 8px;
    margin-top: 14px;
}

.mobile-nav-link {
    color: var(--color-muted);
    padding: 10px 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.10);
}

.mobile-nav-link.is-active,
.mobile-nav-link:hover {
    color: var(--color-amber-400);
}

.btn-primary,
.btn-secondary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 12px;
    padding: 10px 20px;
    font-weight: 700;
    transition: transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.btn-primary {
    color: #ffffff;
    background: var(--color-amber-500);
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    background: #d97706;
}

.btn-secondary {
    color: #ffffff;
    background: var(--color-night-700);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    background: var(--color-night-600);
}

.btn-ghost {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.32);
    background: rgba(16, 42, 67, 0.34);
    backdrop-filter: blur(12px);
}

.btn-ghost:hover {
    transform: translateY(-2px);
    border-color: var(--color-amber-400);
}

.hero-section {
    position: relative;
    height: 74vh;
    min-height: 560px;
    overflow: hidden;
    background: var(--color-night-900);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s 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.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(16, 42, 67, 0.92), rgba(36, 59, 83, 0.78)), radial-gradient(circle at 82% 35%, rgba(245, 158, 11, 0.22), transparent 24rem);
}

.hero-content {
    position: relative;
    max-width: 1280px;
    padding: 0 24px;
    margin: 0 auto;
    width: 100%;
    animation: fadeIn 0.7s ease both;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    color: var(--color-amber-400);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.hero-content h1 {
    max-width: 850px;
    margin: 0;
    color: #ffffff;
    font-size: clamp(38px, 7vw, 74px);
    line-height: 1.04;
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.54);
}

.hero-content h2 {
    margin: 14px 0 0;
    font-size: clamp(24px, 4vw, 42px);
    color: #ffffff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    max-width: 720px;
    margin: 18px 0 0;
    color: var(--color-muted);
    font-size: 18px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.54);
}

.hero-tags,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.hero-tags span,
.tag-list span,
.feature-tags span {
    color: #ffffff;
    background: rgba(36, 59, 83, 0.70);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 13px;
    backdrop-filter: blur(10px);
}

.hero-actions,
.detail-actions,
.side-buttons,
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 30px;
    display: flex;
    align-items: center;
    gap: 9px;
    transform: translateX(-50%);
}

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

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

.section-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 56px 24px 0;
}

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

.section-heading h2,
.home-search-panel h2,
.side-panel h2,
.content-card h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(26px, 4vw, 36px);
    line-height: 1.2;
}

.section-heading a {
    color: var(--color-amber-400);
    font-weight: 700;
}

.home-search-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 24px;
    padding-top: 42px;
}

.home-search-panel p,
.side-panel p,
.page-hero p,
.content-card p,
.detail-one-line {
    color: var(--color-muted);
    margin: 10px 0 0;
}

.filter-box {
    padding: 14px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(36, 59, 83, 0.56);
    border-radius: 18px;
    box-shadow: var(--shadow-card);
}

.wide-filter {
    width: 100%;
}

.wide-filter input {
    width: 100%;
    flex: 1;
}

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

.feature-card,
.movie-card,
.category-tile,
.side-panel,
.content-card,
.ranking-row {
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(36, 59, 83, 0.62);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.18);
}

.feature-link {
    position: relative;
    display: block;
    min-height: 440px;
    overflow: hidden;
}

.feature-link img {
    width: 100%;
    height: 440px;
    object-fit: cover;
    transition: transform 0.55s ease;
}

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

.feature-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 24px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.42), transparent);
}

.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.feature-overlay h3 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 26px;
}

.feature-overlay p,
.feature-meta,
.movie-meta-line,
.movie-desc,
.ranking-row p {
    color: var(--color-muted);
}

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

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

.category-tile {
    display: block;
    padding: 26px;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-4px);
    border-color: rgba(251, 191, 36, 0.38);
    background: rgba(51, 78, 104, 0.82);
}

.category-icon {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 18px;
    color: #ffffff;
    background: rgba(245, 158, 11, 0.86);
    border-radius: 14px;
    font-weight: 800;
}

.category-tile h3 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 21px;
}

.category-tile p {
    margin: 0;
    color: var(--color-muted);
    font-size: 15px;
}

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

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

.movie-card {
    transition: transform 0.25s ease, border-color 0.25s ease;
}

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

.movie-card:hover {
    transform: translateY(-4px);
    border-color: rgba(251, 191, 36, 0.34);
}

.movie-card-link {
    display: block;
    height: 100%;
}

.poster-frame {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: rgba(16, 42, 67, 0.72);
}

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

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

.poster-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), transparent 48%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.poster-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    max-width: calc(100% - 20px);
    color: #ffffff;
    background: rgba(245, 158, 11, 0.92);
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 700;
}

.poster-play {
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    color: #ffffff;
    background: rgba(245, 158, 11, 0.92);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0.75);
    opacity: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.movie-card:hover .poster-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.movie-card-body {
    padding: 14px;
}

.movie-card-body h3 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0 0 6px;
    color: #ffffff;
    font-size: 16px;
}

.movie-meta-line,
.movie-desc {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
    font-size: 13px;
}

.movie-meta-line {
    -webkit-line-clamp: 1;
}

.movie-desc {
    -webkit-line-clamp: 2;
    margin-top: 8px;
    color: var(--color-soft);
}

.split-layout {
    display: grid;
    grid-template-columns: 1.4fr 0.6fr;
    gap: 24px;
    align-items: start;
}

.inline-heading {
    margin-bottom: 18px;
}

.ranking-list,
.ranking-page-list {
    display: grid;
    gap: 12px;
}

.ranking-row {
    border-radius: 16px;
}

.ranking-row a {
    display: grid;
    grid-template-columns: 48px 64px 1fr;
    align-items: center;
    gap: 14px;
    padding: 12px;
}

.rank-number {
    color: var(--color-amber-400);
    font-size: 22px;
    font-weight: 900;
    text-align: center;
}

.ranking-row img {
    width: 64px;
    height: 86px;
    border-radius: 10px;
    object-fit: cover;
}

.ranking-row h3 {
    margin: 0 0 4px;
    color: #ffffff;
    font-size: 16px;
}

.ranking-row p {
    margin: 0;
    font-size: 13px;
}

.side-panel {
    position: sticky;
    top: 96px;
    padding: 28px;
    background: linear-gradient(135deg, rgba(41, 32, 61, 0.95), rgba(64, 54, 92, 0.82), rgba(90, 77, 126, 0.76));
}

.page-main,
.detail-main {
    min-height: 70vh;
}

.page-hero,
.detail-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 58px 24px 0;
}

.page-hero > div,
.detail-hero {
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(135deg, rgba(36, 59, 83, 0.86), rgba(16, 42, 67, 0.78));
    border-radius: 28px;
    box-shadow: var(--shadow-card);
}

.page-hero > div {
    padding: 44px;
}

.page-hero h1,
.detail-info h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.1;
}

.filter-section {
    display: grid;
    gap: 16px;
}

.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-chips button {
    border: 1px solid rgba(148, 163, 184, 0.16);
    color: var(--color-muted);
    background: rgba(36, 59, 83, 0.64);
    border-radius: 999px;
    padding: 8px 13px;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.filter-chips button:hover,
.filter-chips button.is-active {
    color: #ffffff;
    border-color: rgba(251, 191, 36, 0.42);
    background: rgba(245, 158, 11, 0.82);
}

.detail-hero {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 34px;
    align-items: center;
    padding: 34px;
    margin-top: 58px;
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 22px;
    box-shadow: var(--shadow-card);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--color-soft);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--color-amber-400);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.detail-meta span {
    color: #ffffff;
    background: rgba(16, 42, 67, 0.64);
    border-radius: 12px;
    padding: 8px 12px;
}

.player-section {
    scroll-margin-top: 90px;
}

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

.movie-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 12px;
    border: 0;
    color: #ffffff;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.24), rgba(0, 0, 0, 0.72));
    text-align: center;
}

.player-cover.is-hidden {
    display: none;
}

.player-icon {
    display: grid;
    place-items: center;
    width: 86px;
    height: 86px;
    background: rgba(245, 158, 11, 0.94);
    border-radius: 50%;
    box-shadow: var(--shadow-glow);
    font-size: 34px;
}

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

.content-card {
    padding: 28px;
}

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

.search-page-form input {
    flex: 1;
    width: 100%;
}

.search-page-form button {
    border: 0;
}

.search-summary {
    color: var(--color-muted);
}

.site-footer {
    margin-top: 78px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    background: rgba(36, 59, 83, 0.68);
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 44px 24px;
}

.footer-brand p {
    max-width: 580px;
    color: var(--color-muted);
}

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

.footer-columns h3 {
    margin: 0 0 12px;
    color: #ffffff;
}

.footer-columns ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-columns li + li {
    margin-top: 8px;
}

.footer-columns a {
    color: var(--color-muted);
}

.footer-columns a:hover {
    color: var(--color-amber-400);
}

.footer-bottom {
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    color: var(--color-soft);
    text-align: center;
    padding: 20px 24px;
    font-size: 14px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    .mobile-toggle {
        display: inline-flex;
    }

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

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

    .split-layout,
    .detail-hero,
    .footer-inner {
        grid-template-columns: 1fr;
    }

    .side-panel {
        position: static;
    }

    .detail-poster {
        max-width: 340px;
    }
}

@media (max-width: 720px) {
    .header-inner {
        height: 64px;
        padding: 0 16px;
    }

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

    .hero-section {
        min-height: 620px;
        height: 82vh;
    }

    .hero-content,
    .section-wrap,
    .page-hero,
    .detail-hero {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .home-search-panel,
    .section-heading,
    .detail-content-grid,
    .footer-columns {
        grid-template-columns: 1fr;
    }

    .home-search-panel {
        display: grid;
    }

    .section-heading {
        display: grid;
        align-items: start;
    }

    .filter-box {
        width: 100%;
    }

    .filter-box input {
        width: 100%;
        flex: 1;
    }

    .feature-grid,
    .category-grid,
    .large-category-grid {
        grid-template-columns: 1fr;
    }

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

    .movie-card-body {
        padding: 12px;
    }

    .page-hero > div,
    .detail-hero {
        padding: 24px;
        border-radius: 22px;
    }

    .detail-hero {
        margin-top: 32px;
    }

    .ranking-row a {
        grid-template-columns: 42px 58px 1fr;
        gap: 10px;
    }

    .ranking-row img {
        width: 58px;
        height: 78px;
    }
}
