:root {
    color-scheme: dark;
    --bg: #0f172a;
    --bg-soft: #111c31;
    --card: rgba(30, 41, 59, 0.82);
    --card-solid: #1e293b;
    --line: #334155;
    --text: #ffffff;
    --muted: #cbd5e1;
    --subtle: #94a3b8;
    --faint: #64748b;
    --accent: #f59e0b;
    --accent-2: #fbbf24;
    --danger: #ef4444;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.32);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 0%, rgba(245, 158, 11, 0.13), transparent 30%),
        linear-gradient(180deg, #0f172a 0%, #1e293b 48%, #0f172a 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    border-bottom: 1px solid rgba(51, 65, 85, 0.86);
    background: rgba(15, 23, 42, 0.86);
    backdrop-filter: blur(12px);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.9rem 1rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.brand-icon {
    width: 2.55rem;
    height: 2.55rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.12);
}

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

.brand-text strong {
    font-size: 1.2rem;
    letter-spacing: 0.03em;
}

.brand-text small {
    margin-top: 0.2rem;
    color: var(--subtle);
    font-size: 0.76rem;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.desktop-nav a {
    color: var(--muted);
    font-weight: 600;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active {
    color: var(--accent-2);
}

.header-search {
    width: 260px;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem;
    border-radius: 0.8rem;
    background: rgba(51, 65, 85, 0.72);
    border: 1px solid rgba(71, 85, 105, 0.65);
}

.header-search input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: transparent;
    padding: 0.38rem 0.45rem;
}

.header-search input::placeholder {
    color: var(--subtle);
}

.header-search button,
.primary-btn,
.secondary-btn,
.filter-btn {
    border: 0;
    cursor: pointer;
    border-radius: 0.75rem;
    font-weight: 700;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.header-search button,
.primary-btn {
    color: #0f172a;
    background: var(--accent);
}

.header-search button {
    padding: 0.4rem 0.65rem;
}

.primary-btn,
.secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.85rem 1.15rem;
}

.secondary-btn {
    color: var(--text);
    background: rgba(15, 23, 42, 0.62);
    border: 1px solid rgba(148, 163, 184, 0.32);
}

.primary-btn:hover,
.secondary-btn:hover,
.filter-btn:hover {
    transform: translateY(-2px);
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: var(--text);
    background: rgba(51, 65, 85, 0.8);
    border-radius: 0.75rem;
    padding: 0.55rem 0.72rem;
}

.mobile-nav {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
}

.mobile-nav a {
    padding: 0.7rem 0.85rem;
    border-radius: 0.8rem;
    color: var(--muted);
    background: rgba(30, 41, 59, 0.88);
}

.mobile-nav.open {
    display: grid;
}

.hero {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.02);
}

.hero-mask {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.96) 0%, rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.18) 100%),
        linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.35) 52%, rgba(15, 23, 42, 0.1) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 8.5rem 1rem 5rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 2rem;
    align-items: end;
}

.hero-copy {
    max-width: 720px;
}

.hero-kicker {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.tag,
.hero-kicker span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    color: #fff;
    font-size: 0.78rem;
    background: rgba(245, 158, 11, 0.82);
}

.hero h1 {
    margin: 0;
    font-size: clamp(2.35rem, 7vw, 5rem);
    line-height: 1.02;
    letter-spacing: -0.06em;
}

.hero p {
    max-width: 680px;
    margin: 1rem 0 0;
    color: var(--muted);
    font-size: clamp(1rem, 2.3vw, 1.2rem);
    line-height: 1.8;
}

.hero-meta {
    margin-top: 1.1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--subtle);
    font-weight: 700;
}

.hero-actions {
    margin-top: 1.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.hero-panel {
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 1.4rem;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.72);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.hero-panel h2 {
    margin: 0 0 0.85rem;
    font-size: 1.05rem;
}

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

.hero-dot {
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.hero-dot.active {
    width: 1.8rem;
    background: var(--accent);
}

.section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3.2rem 1rem 0;
}

.section-head {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
}

.section h2,
.page-title h1 {
    margin: 0;
    font-size: clamp(1.65rem, 4vw, 2.45rem);
    letter-spacing: -0.035em;
}

.section-head p,
.page-title p {
    margin: 0.45rem 0 0;
    color: var(--subtle);
    line-height: 1.8;
}

.grid {
    display: grid;
    gap: 1.25rem;
}

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

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

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

.movie-card,
.category-tile,
.info-box {
    border: 1px solid rgba(51, 65, 85, 0.85);
    border-radius: 1.1rem;
    overflow: hidden;
    background: var(--card);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
}

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

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(245, 158, 11, 0.7);
    box-shadow: var(--shadow);
}

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: #0b1120;
}

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

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

.score {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    border-radius: 999px;
    padding: 0.2rem 0.5rem;
    color: #111827;
    font-weight: 900;
    font-size: 0.78rem;
    background: var(--accent-2);
}

.play-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 3rem;
    height: 3rem;
    transform: translate(-50%, -50%) scale(0.86);
    opacity: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    background: rgba(245, 158, 11, 0.95);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-info {
    padding: 0.9rem;
}

.movie-info h3 {
    min-height: 2.6rem;
    margin: 0;
    font-size: 1rem;
    line-height: 1.3;
}

.movie-info h3 a:hover {
    color: var(--accent-2);
}

.line-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8rem;
    margin: 0.55rem 0;
    color: var(--subtle);
    font-size: 0.88rem;
    line-height: 1.6;
}

.card-tags {
    min-height: 1.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.card-tags .tag {
    background: rgba(51, 65, 85, 0.95);
    color: var(--muted);
}

.meta-row {
    margin-top: 0.65rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    color: var(--subtle);
    font-size: 0.78rem;
}

.compact-card {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 0.7rem;
    align-items: center;
    padding: 0.55rem;
    border-radius: 0.9rem;
    color: var(--muted);
    background: rgba(30, 41, 59, 0.72);
    transition: background 0.2s ease, color 0.2s ease;
}

.compact-card:hover {
    color: var(--accent-2);
    background: rgba(51, 65, 85, 0.88);
}

.compact-card img {
    width: 58px;
    height: 76px;
    object-fit: cover;
    border-radius: 0.65rem;
}

.category-tile {
    min-height: 178px;
    padding: 1.2rem;
    position: relative;
    isolation: isolate;
}

.category-tile::before {
    content: "";
    position: absolute;
    inset: -40% -20% auto auto;
    width: 150px;
    height: 150px;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.18);
    z-index: -1;
}

.category-tile h3 {
    margin: 0 0 0.6rem;
    font-size: 1.18rem;
}

.category-tile p {
    margin: 0;
    color: var(--subtle);
    line-height: 1.65;
    font-size: 0.92rem;
}

.category-tile span {
    display: inline-flex;
    margin-top: 1rem;
    color: var(--accent-2);
    font-weight: 800;
}

.page-title {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3.2rem 1rem 0;
}

.filter-bar {
    margin: 1.3rem 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.filter-bar input,
.filter-bar select {
    min-height: 2.8rem;
    border: 1px solid rgba(71, 85, 105, 0.8);
    border-radius: 0.85rem;
    color: var(--text);
    background: rgba(30, 41, 59, 0.86);
    padding: 0 0.85rem;
    outline: 0;
}

.filter-bar input {
    min-width: min(100%, 340px);
}

.filter-btn {
    padding: 0 1rem;
    color: #0f172a;
    background: var(--accent);
}

.rank-item {
    display: grid;
    grid-template-columns: 46px 70px 1fr auto;
    gap: 0.85rem;
    align-items: center;
    padding: 0.8rem;
    border: 1px solid rgba(51, 65, 85, 0.84);
    border-radius: 1rem;
    background: rgba(30, 41, 59, 0.76);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-3px);
    border-color: rgba(245, 158, 11, 0.7);
}

.rank-num {
    width: 2.45rem;
    height: 2.45rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    font-weight: 900;
    background: var(--accent);
}

.rank-item img {
    width: 70px;
    height: 88px;
    object-fit: cover;
    border-radius: 0.75rem;
}

.rank-title {
    font-weight: 800;
}

.rank-meta {
    color: var(--subtle);
    font-size: 0.86rem;
}

.detail-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 1rem 0;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) 360px;
    gap: 1.5rem;
    align-items: start;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 1.35rem;
    border: 1px solid rgba(51, 65, 85, 0.9);
    background: #000;
    box-shadow: var(--shadow);
}

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

.video-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background-size: cover;
    background-position: center;
}

.video-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.28));
}

.video-cover.hidden {
    display: none;
}

.big-play {
    position: relative;
    z-index: 2;
    width: 4.6rem;
    height: 4.6rem;
    border: 0;
    border-radius: 999px;
    color: #0f172a;
    font-size: 1.55rem;
    font-weight: 900;
    background: var(--accent);
    box-shadow: 0 0 0 12px rgba(245, 158, 11, 0.16);
}

.detail-side {
    border: 1px solid rgba(51, 65, 85, 0.85);
    border-radius: 1.35rem;
    padding: 1.1rem;
    background: rgba(15, 23, 42, 0.72);
}

.detail-side img {
    width: 100%;
    border-radius: 1rem;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.detail-side h1 {
    margin: 1rem 0 0.6rem;
    font-size: 1.6rem;
    line-height: 1.25;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.8rem 0;
}

.detail-meta span {
    border-radius: 999px;
    padding: 0.25rem 0.65rem;
    color: var(--muted);
    background: rgba(51, 65, 85, 0.82);
}

.content-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1rem 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 1.5rem;
}

.article-box {
    border: 1px solid rgba(51, 65, 85, 0.85);
    border-radius: 1.3rem;
    padding: 1.4rem;
    background: rgba(15, 23, 42, 0.64);
}

.article-box h2 {
    margin: 0 0 0.85rem;
    font-size: 1.35rem;
}

.article-box p {
    margin: 0 0 1rem;
    color: var(--muted);
    line-height: 1.9;
}

.related-list {
    display: grid;
    gap: 0.75rem;
}

.site-footer {
    margin-top: 4rem;
    border-top: 1px solid rgba(51, 65, 85, 0.88);
    background: rgba(15, 23, 42, 0.75);
}

.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem 1rem;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 1.5rem;
}

.site-footer p {
    max-width: 560px;
    margin: 1rem 0 0;
    color: var(--subtle);
    line-height: 1.8;
}

.site-footer h3 {
    margin: 0 0 0.8rem;
}

.footer-links {
    display: grid;
    gap: 0.55rem;
}

.footer-links a {
    color: var(--subtle);
}

.footer-links a:hover {
    color: var(--accent-2);
}

.copyright {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem;
    border-top: 1px solid rgba(51, 65, 85, 0.55);
    color: var(--faint);
    text-align: center;
}

.empty-tip {
    display: none;
    padding: 1.2rem;
    border: 1px solid rgba(51, 65, 85, 0.85);
    border-radius: 1rem;
    color: var(--subtle);
    background: rgba(30, 41, 59, 0.75);
}

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

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

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

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

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

    .hero-content {
        padding-top: 6rem;
    }

    .hero-panel {
        display: none;
    }

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

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

@media (max-width: 700px) {
    .header-inner {
        padding: 0.75rem 0.8rem;
    }

    .brand-text small {
        display: none;
    }

    .hero {
        min-height: 64vh;
    }

    .hero-mask {
        background: linear-gradient(0deg, #0f172a 0%, rgba(15, 23, 42, 0.82) 58%, rgba(15, 23, 42, 0.42) 100%);
    }

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

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

    .rank-item {
        grid-template-columns: 38px 58px 1fr;
    }

    .rank-meta {
        display: none;
    }
}
