:root {
    color-scheme: light;
    --page-bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #fff7ed;
    --text: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --primary: #f97316;
    --primary-deep: #ef4444;
    --accent: #ec4899;
    --shadow: 0 20px 45px rgba(15, 23, 42, 0.10);
    --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.08);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 58%, #fff7ed 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06);
}

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

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -0.04em;
    white-space: nowrap;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep), var(--accent));
    box-shadow: 0 12px 26px rgba(239, 68, 68, 0.28);
}

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

.nav-links a {
    padding: 10px 14px;
    border-radius: 999px;
    color: #374151;
    font-weight: 700;
    transition: all 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.22);
}

.header-search {
    width: min(300px, 28vw);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
}

.header-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    color: var(--text);
}

.header-search button,
.search-panel button,
.play-layer button,
.btn {
    border: 0;
    cursor: pointer;
}

.header-search button {
    padding: 8px 12px;
    border-radius: 999px;
    color: #fff;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    cursor: pointer;
}

.mobile-toggle span {
    width: 18px;
    height: 2px;
    display: block;
    margin: 4px auto;
    border-radius: 9px;
    background: #111827;
}

main {
    min-height: 60vh;
}

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

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

.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;
}

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

.hero-glow {
    position: absolute;
    width: 360px;
    height: 360px;
    right: 12%;
    bottom: -120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.42), rgba(236, 72, 153, 0));
    filter: blur(2px);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
}

.hero-text {
    width: min(680px, 100%);
    color: #fff;
}

.hero-badge,
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    background: rgba(249, 115, 22, 0.92);
    box-shadow: 0 12px 28px rgba(249, 115, 22, 0.24);
}

.hero-text h1 {
    margin: 0 0 16px;
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1.04;
    font-weight: 950;
    letter-spacing: -0.06em;
}

.hero-text p {
    max-width: 620px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.86);
    font-size: 20px;
}

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

.hero-meta span,
.meta-pill {
    padding: 7px 12px;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.hero-actions,
.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 20px;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    box-shadow: 0 18px 34px rgba(239, 68, 68, 0.28);
}

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

.btn-light {
    color: var(--primary-deep);
    background: #fff;
    box-shadow: var(--shadow-soft);
}

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

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

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

.section {
    padding: 58px 0;
}

.section-tight {
    padding: 34px 0;
}

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

.section-title {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
    line-height: 1.15;
    font-weight: 950;
    letter-spacing: -0.04em;
}

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

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

.category-tile {
    min-height: 170px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-radius: var(--radius);
    color: #fff;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-soft);
    transition: all 0.24s ease;
}

.category-tile:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.category-tile::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    right: -60px;
    bottom: -70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

.category-icon {
    font-size: 34px;
}

.category-tile h2,
.category-tile h3 {
    margin: 20px 0 6px;
    font-size: 24px;
    font-weight: 950;
}

.category-tile p {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
}

.gradient-warm { background: linear-gradient(135deg, #fb923c, #ef4444, #ec4899); }
.gradient-gold { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.gradient-blue { background: linear-gradient(135deg, #38bdf8, #2563eb, #7c3aed); }
.gradient-red { background: linear-gradient(135deg, #f43f5e, #b91c1c); }
.gradient-purple { background: linear-gradient(135deg, #8b5cf6, #4f46e5); }
.gradient-pink { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.gradient-green { background: linear-gradient(135deg, #22c55e, #14b8a6); }
.gradient-teal { background: linear-gradient(135deg, #06b6d4, #0f766e); }

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(229, 231, 235, 0.88);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    transition: all 0.24s ease;
}

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

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

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

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

.poster-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 9px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

.poster-score {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    background: rgba(0, 0, 0, 0.64);
    backdrop-filter: blur(10px);
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    min-height: 3.05em;
    margin: 0 0 9px;
    font-size: 17px;
    line-height: 1.35;
    font-weight: 900;
}

.card-body h3 a:hover {
    color: var(--primary-deep);
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 10px;
    color: var(--muted);
    font-size: 13px;
}

.card-meta span,
.tag {
    padding: 4px 8px;
    border-radius: 999px;
    background: #f3f4f6;
}

.card-line {
    min-height: 4.7em;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.page-hero {
    padding: 66px 0;
    color: #fff;
    background: linear-gradient(135deg, #f97316 0%, #ef4444 48%, #ec4899 100%);
    position: relative;
    overflow: hidden;
}

.page-hero::after {
    content: "";
    position: absolute;
    inset: auto -10% -40% 55%;
    height: 320px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    filter: blur(2px);
}

.page-hero .container {
    position: relative;
    z-index: 1;
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(36px, 6vw, 60px);
    line-height: 1.1;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 19px;
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    padding: 16px;
    margin-bottom: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-soft);
}

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

.search-panel input:focus,
.search-panel select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.14);
}

.search-panel button {
    min-height: 48px;
    padding: 0 18px;
    border-radius: 16px;
    color: #fff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
}

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

.rank-item {
    display: grid;
    grid-template-columns: 74px 88px 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.rank-number {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    color: #fff;
    font-size: 20px;
    font-weight: 950;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
}

.rank-cover {
    width: 88px;
    aspect-ratio: 2 / 3;
    border-radius: 16px;
    object-fit: cover;
    background: #111827;
}

.rank-info h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 950;
}

.rank-info p {
    margin: 0;
    color: var(--muted);
}

.detail-shell {
    padding: 38px 0 64px;
}

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

.breadcrumb a:hover {
    color: var(--primary-deep);
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(300px, 0.92fr);
    gap: 28px;
    align-items: start;
}

.player-card,
.detail-card,
.side-card {
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.player-box {
    position: relative;
    background: #000;
}

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

.play-layer {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.68));
    cursor: pointer;
    z-index: 2;
}

.play-layer.is-hidden {
    display: none;
}

.play-layer button {
    width: 92px;
    height: 92px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    font-size: 34px;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
    box-shadow: 0 20px 46px rgba(239, 68, 68, 0.36);
}

.detail-card {
    padding: 28px;
    margin-top: 22px;
}

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

.detail-card h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.12;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.detail-score {
    min-width: 86px;
    padding: 12px;
    border-radius: 18px;
    text-align: center;
    color: #fff;
    font-weight: 950;
    background: linear-gradient(135deg, var(--primary), var(--primary-deep));
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 18px 0;
}

.detail-meta span {
    padding: 7px 11px;
    border-radius: 999px;
    color: #374151;
    background: #f3f4f6;
    font-weight: 700;
}

.content-block {
    margin-top: 24px;
}

.content-block h2 {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 950;
}

.content-block p {
    margin: 0;
    color: #4b5563;
    font-size: 17px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.side-card {
    padding: 18px;
}

.side-cover {
    width: 100%;
    border-radius: 20px;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: #111827;
}

.side-card h2 {
    margin: 20px 0 12px;
    font-size: 24px;
    font-weight: 950;
}

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

.related-item {
    display: grid;
    grid-template-columns: 60px 1fr;
    gap: 12px;
    align-items: center;
    padding: 9px;
    border-radius: 16px;
    transition: background 0.2s ease;
}

.related-item:hover {
    background: #fff7ed;
}

.related-item img {
    width: 60px;
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    object-fit: cover;
    background: #111827;
}

.related-item strong {
    display: block;
    line-height: 1.32;
}

.related-item span {
    color: var(--muted);
    font-size: 13px;
}

.site-footer {
    margin-top: 40px;
    padding: 34px 0;
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.footer-links {
    display: flex;
    gap: 14px;
}

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

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

.empty-state {
    display: none;
    padding: 36px;
    border: 1px dashed #fdba74;
    border-radius: var(--radius);
    color: var(--muted);
    text-align: center;
    background: #fff7ed;
}

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

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

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

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

@media (max-width: 860px) {
    .nav-wrap {
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .mobile-toggle {
        display: block;
    }

    .nav-links,
    .header-search {
        display: none;
        width: 100%;
    }

    .site-header.is-open .nav-links,
    .site-header.is-open .header-search {
        display: flex;
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
        order: 3;
    }

    .header-search {
        order: 4;
    }

    .hero-slider {
        height: 540px;
    }

    .hero-shade {
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.66));
    }

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

    .section-head,
    .footer-grid,
    .detail-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

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

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

    .rank-item {
        grid-template-columns: 54px 74px 1fr;
    }

    .rank-item .btn {
        grid-column: 2 / 4;
    }
}

@media (max-width: 560px) {
    .container,
    .nav-wrap {
        width: min(100% - 22px, 1180px);
    }

    .hero-slider {
        height: 500px;
    }

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

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

    .rank-info h3 {
        font-size: 17px;
    }
}
