:root {
    --night-950: #0a1929;
    --night-900: #102a43;
    --night-850: #17324d;
    --night-800: #243b53;
    --night-700: #334e68;
    --night-600: #486581;
    --night-500: #627d98;
    --amber-300: #fcd34d;
    --amber-400: #fbbf24;
    --amber-500: #f59e0b;
    --amber-600: #d97706;
    --text-strong: #f8fafc;
    --text-main: #d8e2ef;
    --text-muted: #9fb3c8;
    --text-soft: #bcccdc;
    --danger: #f87171;
    --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    --strong-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text-main);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", "Microsoft YaHei", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(251, 191, 36, 0.12), transparent 30rem),
        radial-gradient(circle at top right, rgba(217, 119, 6, 0.1), transparent 28rem),
        linear-gradient(180deg, var(--night-950) 0%, var(--night-900) 48%, #07111f 100%);
}

body.no-scroll {
    overflow: hidden;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    border-bottom: 1px solid rgba(51, 78, 104, 0.85);
    background: rgba(16, 42, 67, 0.95);
    backdrop-filter: blur(12px);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--text-strong);
    white-space: nowrap;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--night-950);
    background: linear-gradient(135deg, var(--amber-300), var(--amber-600));
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.32);
    font-size: 14px;
}

.brand-name,
.gradient-text {
    color: transparent;
    background: linear-gradient(90deg, var(--amber-300), var(--amber-600));
    -webkit-background-clip: text;
    background-clip: text;
}

.brand-name {
    font-size: clamp(20px, 2vw, 28px);
}

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

.main-nav a {
    color: var(--text-soft);
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
    color: var(--amber-400);
}

.top-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-search input,
.search-panel input,
.search-panel select {
    min-width: 190px;
    padding: 10px 12px;
    color: var(--text-main);
    border: 1px solid var(--night-600);
    border-radius: 12px;
    background: rgba(36, 59, 83, 0.9);
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.top-search input:focus,
.search-panel input:focus,
.search-panel select:focus {
    border-color: var(--amber-400);
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.12);
}

.top-search button,
.btn-primary,
.btn-ghost,
.btn-soft,
.search-panel button,
.pagination a,
.pagination span,
.play-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.top-search button,
.btn-primary,
.search-panel button,
.play-trigger {
    color: #111827;
    background: linear-gradient(135deg, var(--amber-300), var(--amber-600));
}

.top-search button {
    padding: 10px 14px;
}

.btn-primary,
.btn-ghost,
.btn-soft,
.play-trigger {
    padding: 12px 18px;
}

.btn-ghost,
.btn-soft {
    color: var(--amber-300);
    border: 1px solid rgba(251, 191, 36, 0.36);
    background: rgba(251, 191, 36, 0.08);
}

.btn-soft {
    color: var(--text-main);
    border-color: rgba(159, 179, 200, 0.26);
    background: rgba(36, 59, 83, 0.72);
}

.btn-primary:hover,
.btn-ghost:hover,
.btn-soft:hover,
.search-panel button:hover,
.pagination a:hover,
.play-trigger:hover {
    transform: translateY(-2px);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    margin-left: auto;
    padding: 9px;
    border: 1px solid rgba(159, 179, 200, 0.22);
    border-radius: 12px;
    background: rgba(36, 59, 83, 0.72);
}

.mobile-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 10px;
    background: var(--text-main);
}

main {
    padding-top: 76px;
}

.hero {
    position: relative;
    min-height: 640px;
    overflow: hidden;
    background: var(--night-950);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.7s ease, transform 1s ease;
    pointer-events: none;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.48;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(10, 25, 41, 0.96) 0%, rgba(10, 25, 41, 0.68) 45%, rgba(10, 25, 41, 0.26) 100%),
        linear-gradient(180deg, rgba(10, 25, 41, 0.2) 0%, rgba(10, 25, 41, 0.88) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    width: min(780px, 100%);
    padding: 86px 0 116px;
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 12px;
    color: var(--amber-300);
    border: 1px solid rgba(251, 191, 36, 0.32);
    border-radius: 999px;
    background: rgba(251, 191, 36, 0.1);
    font-weight: 700;
}

.hero h1 {
    margin: 0 0 12px;
    color: var(--text-strong);
    font-size: clamp(38px, 6vw, 74px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.hero h2 {
    margin: 0 0 18px;
    color: var(--amber-300);
    font-size: clamp(24px, 3vw, 42px);
    line-height: 1.15;
}

.hero p {
    max-width: 720px;
    margin: 0 0 22px;
    color: var(--text-soft);
    font-size: clamp(16px, 1.5vw, 20px);
    line-height: 1.85;
}

.hero-meta,
.detail-meta,
.badge-row,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hero-meta span,
.detail-meta span,
.badge-row span,
.tag-row span {
    display: inline-flex;
    padding: 5px 10px;
    color: var(--text-soft);
    border: 1px solid rgba(159, 179, 200, 0.18);
    border-radius: 999px;
    background: rgba(36, 59, 83, 0.7);
    font-size: 13px;
}

.hero-actions,
.section-actions,
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

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

.hero-dot {
    width: 34px;
    height: 5px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(159, 179, 200, 0.4);
    cursor: pointer;
}

.hero-dot.is-active {
    background: var(--amber-400);
}

.section {
    padding: 70px 0;
}

.section.alt {
    background: rgba(10, 25, 41, 0.38);
}

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

.section-head h2,
.page-title h1,
.detail-title h1 {
    margin: 0;
    color: var(--text-strong);
    font-size: clamp(26px, 3vw, 42px);
    line-height: 1.16;
}

.section-head p,
.page-title p,
.detail-title p {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--text-muted);
    line-height: 1.8;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(51, 78, 104, 0.85);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(36, 59, 83, 0.86), rgba(16, 42, 67, 0.9));
    box-shadow: var(--card-shadow);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(251, 191, 36, 0.45);
    box-shadow: var(--strong-shadow);
}

.poster-link,
.poster-frame {
    display: block;
}

.poster-frame {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(51, 78, 104, 0.85), rgba(16, 42, 67, 0.95));
}

.poster-frame img,
.rank-thumb img,
.category-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-shade {
    position: absolute;
    inset: auto 0 0 0;
    height: 48%;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.72));
}

.quality-badge,
.duration-badge {
    position: absolute;
    z-index: 2;
    top: 10px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.quality-badge {
    left: 10px;
    color: #111827;
    background: var(--amber-400);
}

.duration-badge {
    right: 10px;
    color: var(--text-strong);
    background: rgba(0, 0, 0, 0.58);
}

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

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

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

.movie-meta {
    margin: 0 0 6px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.5;
}

.movie-card h3 {
    margin: 0 0 8px;
    color: var(--text-strong);
    font-size: 16px;
    line-height: 1.35;
}

.movie-card h3 a:hover {
    color: var(--amber-300);
}

.movie-one-line {
    display: -webkit-box;
    min-height: 42px;
    margin: 0 0 10px;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.tag-row span {
    padding: 4px 8px;
    font-size: 12px;
}

.feature-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 26px;
}

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

.rank-item {
    display: grid;
    grid-template-columns: auto 58px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid rgba(51, 78, 104, 0.82);
    border-radius: var(--radius-md);
    background: rgba(36, 59, 83, 0.62);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.rank-item:hover {
    transform: translateX(4px);
    border-color: rgba(251, 191, 36, 0.42);
    background: rgba(36, 59, 83, 0.9);
}

.rank-number {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    color: #111827;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--amber-300), var(--amber-600));
    font-size: 13px;
    font-weight: 800;
}

.rank-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--amber-400);
}

.rank-thumb {
    width: 58px;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 10px;
    background: var(--night-700);
}

.rank-copy {
    min-width: 0;
}

.rank-copy strong,
.rank-copy em {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-copy strong {
    color: var(--text-strong);
}

.rank-copy em {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: 12px;
    font-style: normal;
}

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

.category-card {
    position: relative;
    min-height: 162px;
    overflow: hidden;
    padding: 22px;
    border: 1px solid rgba(51, 78, 104, 0.86);
    border-radius: var(--radius-lg);
    background:
        linear-gradient(135deg, rgba(251, 191, 36, 0.12), transparent 48%),
        linear-gradient(180deg, rgba(36, 59, 83, 0.88), rgba(16, 42, 67, 0.94));
    box-shadow: var(--card-shadow);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: rgba(251, 191, 36, 0.48);
}

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    color: var(--text-strong);
    font-size: 22px;
}

.category-card p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.7;
}

.page-title {
    padding: 72px 0 30px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: var(--text-muted);
    font-size: 14px;
}

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

.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 42px 0 0;
}

.pagination a,
.pagination span {
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    color: var(--text-soft);
    border: 1px solid rgba(51, 78, 104, 0.9);
    background: rgba(36, 59, 83, 0.72);
}

.pagination span.current {
    color: #111827;
    border-color: var(--amber-400);
    background: var(--amber-400);
}

.detail-hero {
    position: relative;
    padding: 70px 0 40px;
    overflow: hidden;
    background: rgba(10, 25, 41, 0.58);
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.22;
    filter: blur(8px);
}

.detail-backdrop img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 25, 41, 0.18), var(--night-950));
}

.detail-layout {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 34px;
    align-items: start;
}

.detail-poster {
    overflow: hidden;
    border: 1px solid rgba(251, 191, 36, 0.28);
    border-radius: var(--radius-lg);
    background: var(--night-800);
    box-shadow: var(--strong-shadow);
}

.detail-title h1 {
    margin-top: 8px;
    font-size: clamp(34px, 5vw, 60px);
}

.detail-title .one-line {
    color: var(--text-soft);
    font-size: 18px;
    line-height: 1.8;
}

.player-section {
    padding: 46px 0 70px;
}

.player-box {
    overflow: hidden;
    border: 1px solid rgba(51, 78, 104, 0.9);
    border-radius: var(--radius-lg);
    background: #000;
    box-shadow: var(--strong-shadow);
}

.video-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #000;
}

.video-wrap video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: radial-gradient(circle, rgba(251, 191, 36, 0.18), rgba(0, 0, 0, 0.68));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-overlay-inner {
    max-width: 560px;
    text-align: center;
}

.player-overlay h2 {
    margin: 0 0 10px;
    color: var(--text-strong);
    font-size: clamp(24px, 4vw, 42px);
}

.player-overlay p {
    margin: 0 0 22px;
    color: var(--text-soft);
    line-height: 1.8;
}

.player-message {
    padding: 12px 16px;
    color: var(--text-soft);
    border-top: 1px solid rgba(51, 78, 104, 0.9);
    background: rgba(16, 42, 67, 0.96);
    font-size: 14px;
}

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

.article-card,
.side-card,
.search-panel,
.notice-card {
    border: 1px solid rgba(51, 78, 104, 0.86);
    border-radius: var(--radius-lg);
    background: rgba(36, 59, 83, 0.58);
    box-shadow: var(--card-shadow);
}

.article-card {
    padding: 28px;
}

.article-card h2,
.side-card h2,
.search-panel h2,
.notice-card h2 {
    margin: 0 0 14px;
    color: var(--amber-300);
    font-size: 22px;
}

.article-card p,
.notice-card p {
    margin: 0 0 18px;
    color: var(--text-main);
    line-height: 1.95;
}

.side-card {
    padding: 18px;
}

.side-card + .side-card {
    margin-top: 18px;
}

.search-panel {
    padding: 22px;
    margin-bottom: 28px;
}

.search-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(120px, 0.4fr)) auto;
    gap: 12px;
}

.search-results-note {
    margin: 0 0 18px;
    color: var(--text-muted);
}

.notice-card {
    padding: 32px;
    text-align: center;
}

.site-footer {
    border-top: 1px solid rgba(51, 78, 104, 0.86);
    background: rgba(10, 25, 41, 0.94);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 32px;
    padding: 48px 0;
}

.site-footer p {
    max-width: 390px;
    color: var(--text-muted);
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: var(--amber-300);
    font-size: 16px;
}

.site-footer a:not(.footer-brand) {
    display: block;
    margin: 8px 0;
    color: var(--text-muted);
    font-size: 14px;
}

.site-footer a:hover {
    color: var(--amber-300);
}

@keyframes slideDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

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

    .top-search input {
        min-width: 150px;
    }
}

@media (max-width: 900px) {
    .nav-wrap {
        height: 66px;
    }

    main {
        padding-top: 66px;
    }

    .mobile-toggle {
        display: block;
    }

    .main-nav {
        position: fixed;
        inset: 66px 0 auto 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 16px 20px;
        border-bottom: 1px solid rgba(51, 78, 104, 0.86);
        background: rgba(16, 42, 67, 0.98);
        animation: slideDown 0.25s ease;
    }

    .main-nav.is-open {
        display: flex;
    }

    .main-nav a {
        padding: 12px 0;
    }

    .top-search {
        display: none;
    }

    .hero {
        min-height: 590px;
    }

    .feature-grid,
    .detail-layout,
    .content-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        width: min(260px, 100%);
    }

    .search-form-grid {
        grid-template-columns: 1fr 1fr;
    }

    .search-form-grid button,
    .search-form-grid input {
        grid-column: span 2;
    }
}

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

    .section {
        padding: 48px 0;
    }

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

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

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

    .hero-content {
        padding: 58px 0 100px;
    }

    .hero-meta span,
    .detail-meta span,
    .badge-row span,
    .tag-row span {
        font-size: 12px;
    }

    .article-card {
        padding: 20px;
    }

    .search-form-grid {
        grid-template-columns: 1fr;
    }

    .search-form-grid button,
    .search-form-grid input {
        grid-column: auto;
    }
}

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

    .brand-name {
        font-size: 18px;
    }
}
