:root {
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --amber-500: #f59e0b;
    --amber-400: #fbbf24;
    --orange-500: #f97316;
    --rose-500: #f43f5e;
    --white: #ffffff;
    --shadow-soft: 0 20px 45px rgba(15, 23, 42, 0.16);
    --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.12);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--slate-800);
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98), rgba(120, 53, 15, 0.98));
    color: var(--white);
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.22);
    backdrop-filter: blur(16px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.brand-icon,
.footer-logo span {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, var(--amber-400), var(--orange-500));
    box-shadow: 0 10px 24px rgba(249, 115, 22, 0.32);
}

.brand-name {
    font-weight: 900;
    letter-spacing: 0.02em;
    font-size: 20px;
    background: linear-gradient(90deg, #fde68a, #fed7aa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    white-space: nowrap;
}

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

.nav-link {
    color: rgba(255, 255, 255, 0.88);
    font-weight: 700;
    font-size: 14px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #fcd34d;
    transform: translateY(-1px);
}

.search-form {
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid rgba(251, 191, 36, 0.24);
    border-radius: 999px;
    padding: 4px;
    margin-left: 6px;
}

.search-form input {
    width: 170px;
    border: 0;
    outline: 0;
    color: var(--white);
    background: transparent;
    padding: 8px 10px 8px 14px;
}

.search-form input::placeholder {
    color: #94a3b8;
}

.search-form button,
.btn-primary,
.btn-ghost,
.filter-box button,
.play-button {
    border: 0;
    cursor: pointer;
    font-weight: 800;
    border-radius: 999px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.search-form button,
.btn-primary,
.play-button {
    color: #fff;
    background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
    box-shadow: 0 10px 24px rgba(249, 115, 22, 0.3);
}

.search-form button {
    padding: 8px 14px;
}

.menu-toggle {
    display: none;
    margin-left: auto;
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    padding: 9px 12px;
    font-size: 20px;
}

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

.mobile-panel a {
    display: block;
    padding: 12px 4px;
    color: #e2e8f0;
    border-top: 1px solid rgba(226, 232, 240, 0.1);
}

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

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

.hero {
    position: relative;
    min-height: 660px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(120deg, var(--slate-900), var(--slate-700), #7c2d12);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 16%, rgba(251, 191, 36, 0.28), transparent 24%),
        radial-gradient(circle at 84% 14%, rgba(244, 63, 94, 0.22), transparent 26%),
        radial-gradient(circle at 70% 90%, rgba(14, 165, 233, 0.18), transparent 28%);
    pointer-events: none;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.12;
    background-image: linear-gradient(135deg, rgba(255,255,255,0.22) 1px, transparent 1px);
    background-size: 38px 38px;
}

.hero-slider {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 32px));
    min-height: 660px;
    margin: 0 auto;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 46px;
    align-items: center;
    padding: 76px 0;
    opacity: 0;
    transform: translateX(20px);
    pointer-events: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 8px 13px;
    color: #fde68a;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid rgba(251, 191, 36, 0.26);
    border-radius: 999px;
    font-weight: 800;
    font-size: 14px;
}

.hero h1 {
    margin: 22px 0 18px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 1.02;
    font-weight: 950;
    letter-spacing: -0.05em;
    background: linear-gradient(90deg, #fef3c7, #fdba74, #fefce8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero p {
    margin: 0 0 24px;
    max-width: 720px;
    color: #e2e8f0;
    font-size: clamp(17px, 2vw, 22px);
    line-height: 1.78;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
}

.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 21px;
}

.btn-primary:hover,
.search-form button:hover,
.play-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 34px rgba(249, 115, 22, 0.38);
}

.btn-ghost {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.08);
}

.btn-ghost:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.14);
}

.hero-media {
    position: relative;
}

.hero-media::before {
    content: "";
    position: absolute;
    inset: -18px;
    border-radius: 34px;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.32), rgba(249, 115, 22, 0.05));
    filter: blur(2px);
}

.hero-poster {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 28px;
    box-shadow: 0 35px 80px rgba(2, 6, 23, 0.46);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.03);
}

.hero-poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.74), transparent 52%);
}

.poster-caption {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 20px;
    z-index: 2;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
}

.poster-caption strong {
    display: block;
    font-size: 22px;
}

.poster-caption span {
    color: #cbd5e1;
    font-size: 14px;
}

.hero-dots {
    position: absolute;
    left: 0;
    bottom: 48px;
    z-index: 3;
    display: flex;
    gap: 10px;
}

.hero-dot {
    width: 36px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.26);
}

.hero-dot.is-active {
    background: linear-gradient(90deg, var(--amber-400), var(--orange-500));
}

.section {
    padding: 70px 0;
}

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

.section-head h2,
.page-title,
.detail-title {
    margin: 12px 0 0;
    color: var(--slate-900);
    font-weight: 950;
    letter-spacing: -0.035em;
}

.section-head h2 {
    font-size: clamp(30px, 4vw, 44px);
}

.section-head p,
.page-lead {
    max-width: 760px;
    color: var(--slate-600);
    line-height: 1.85;
}

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(226, 232, 240, 0.9);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #111827, #78350f);
}

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

.movie-card:hover img {
    transform: scale(1.08);
    filter: saturate(1.12) contrast(1.05);
}

.card-badge,
.play-chip,
.rank-num {
    position: absolute;
    z-index: 2;
    color: #fff;
    font-weight: 900;
    border-radius: 999px;
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.26);
}

.card-badge {
    top: 12px;
    right: 12px;
    padding: 6px 10px;
    font-size: 13px;
    background: linear-gradient(135deg, var(--amber-500), var(--orange-500));
}

.play-chip {
    left: 12px;
    bottom: 12px;
    padding: 7px 12px;
    font-size: 13px;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(10px);
}

.card-body {
    padding: 17px;
}

.card-title {
    display: block;
    color: var(--slate-900);
    font-size: 17px;
    font-weight: 950;
    line-height: 1.35;
    min-height: 45px;
}

.card-title:hover {
    color: #d97706;
}

.card-body p {
    margin: 10px 0 12px;
    color: var(--slate-600);
    font-size: 14px;
    line-height: 1.65;
    min-height: 46px;
}

.card-meta,
.detail-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #64748b;
    font-size: 13px;
}

.card-meta span,
.detail-meta span,
.rank-meta span {
    padding: 5px 9px;
    border-radius: 999px;
    background: #f1f5f9;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.tag-row span {
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 999px;
    padding: 5px 8px;
    font-size: 12px;
    font-weight: 700;
}

.category-strip {
    padding: 70px 0;
    background: linear-gradient(90deg, #fff7ed, #fffbeb, #f8fafc);
}

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

.category-tile {
    display: block;
    min-height: 154px;
    padding: 24px;
    border-radius: 26px;
    color: #fff;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-tile:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.2);
}

.category-tile strong {
    display: block;
    font-size: 22px;
    margin-bottom: 10px;
}

.category-tile span {
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.6;
    font-size: 14px;
}

.tone-from-amber { background: linear-gradient(135deg, #f59e0b, #f97316); }
.tone-from-rose { background: linear-gradient(135deg, #f43f5e, #fb7185); }
.tone-from-indigo { background: linear-gradient(135deg, #6366f1, #312e81); }
.tone-from-pink { background: linear-gradient(135deg, #ec4899, #be185d); }
.tone-from-orange { background: linear-gradient(135deg, #ea580c, #7c2d12); }
.tone-from-cyan { background: linear-gradient(135deg, #06b6d4, #0f766e); }
.tone-from-lime { background: linear-gradient(135deg, #84cc16, #15803d); }
.tone-from-yellow { background: linear-gradient(135deg, #eab308, #a16207); }
.tone-from-violet { background: linear-gradient(135deg, #8b5cf6, #581c87); }
.tone-from-emerald { background: linear-gradient(135deg, #10b981, #065f46); }

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

.rank-item {
    position: relative;
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 18px;
    padding: 14px;
    border-radius: 22px;
    background: #fff;
    box-shadow: var(--shadow-card);
    transition: transform 0.24s ease;
}

.rank-item:hover {
    transform: translateY(-4px);
}

.rank-cover {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    aspect-ratio: 16 / 10;
    background: #111827;
}

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

.rank-num {
    top: 8px;
    left: 8px;
    min-width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
}

.rank-content h3 {
    margin: 4px 0 8px;
    color: var(--slate-900);
    font-size: 18px;
}

.rank-content p {
    margin: 0 0 12px;
    color: var(--slate-600);
    line-height: 1.65;
    font-size: 14px;
}

.page-hero {
    color: #fff;
    background: linear-gradient(120deg, var(--slate-900), var(--slate-700), #78350f);
    padding: 70px 0;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 18% 20%, rgba(251, 191, 36, 0.24), transparent 28%), radial-gradient(circle at 78% 30%, rgba(244, 63, 94, 0.18), transparent 30%);
}

.page-hero .container {
    position: relative;
}

.page-title {
    color: #fff;
    font-size: clamp(36px, 5vw, 62px);
}

.page-lead {
    color: #dbeafe;
    font-size: 18px;
}

.filter-box {
    margin: 26px 0 34px;
    padding: 18px;
    display: grid;
    grid-template-columns: 1fr 160px 160px auto;
    gap: 12px;
    background: #fff;
    border-radius: 22px;
    box-shadow: var(--shadow-card);
}

.filter-box input,
.filter-box select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 12px 14px;
    outline: 0;
    font: inherit;
}

.filter-box input:focus,
.filter-box select:focus {
    border-color: var(--amber-500);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.filter-box button {
    padding: 12px 18px;
    color: #fff;
    background: var(--slate-900);
}

.breadcrumb {
    margin: 26px 0;
    color: #64748b;
    font-weight: 700;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #d97706;
}

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

.player-card,
.detail-card,
.side-card {
    background: #fff;
    border-radius: 26px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
}

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

.player-wrap video {
    width: 100%;
    height: 100%;
    background: #020617;
}

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

.player-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.82), rgba(15, 23, 42, 0.2));
}

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

.play-button {
    position: relative;
    z-index: 1;
    width: 98px;
    height: 98px;
    border-radius: 50%;
    font-size: 34px;
}

.player-title-row {
    padding: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: space-between;
    align-items: center;
}

.detail-title {
    font-size: clamp(30px, 4vw, 48px);
}

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

.detail-card h2,
.side-card h2 {
    margin: 0 0 14px;
    color: var(--slate-900);
    font-size: 24px;
}

.detail-card p {
    color: #475569;
    line-height: 1.9;
    margin: 0 0 18px;
}

.detail-poster {
    width: 100%;
    border-radius: 22px;
    overflow: hidden;
    aspect-ratio: 4 / 5;
    background: linear-gradient(135deg, #111827, #78350f);
}

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

.side-card {
    padding: 18px;
    margin-bottom: 20px;
}

.side-link {
    display: grid;
    grid-template-columns: 86px 1fr;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.side-link:last-child {
    border-bottom: 0;
}

.side-link img {
    width: 86px;
    aspect-ratio: 16 / 10;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
}

.side-link strong {
    display: block;
    margin-bottom: 6px;
    color: var(--slate-900);
}

.side-link span {
    color: #64748b;
    font-size: 13px;
}

.search-empty {
    display: none;
    padding: 34px;
    text-align: center;
    color: #64748b;
    background: #fff;
    border-radius: 22px;
    box-shadow: var(--shadow-card);
}

.site-footer {
    margin-top: 80px;
    color: #cbd5e1;
    background: linear-gradient(180deg, var(--slate-900), var(--slate-950));
}

.footer-grid {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 28px;
    padding: 46px 0;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 21px;
    font-weight: 950;
    margin-bottom: 14px;
}

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

.footer-grid h3 {
    color: #fff;
    margin: 0 0 14px;
}

.footer-grid a {
    display: block;
    padding: 5px 0;
    color: #cbd5e1;
}

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

.footer-bottom {
    text-align: center;
    padding: 20px 16px 26px;
    color: #94a3b8;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

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

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

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 28px;
        align-content: center;
    }

    .hero-media {
        max-width: 640px;
    }

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

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

@media (max-width: 720px) {
    .header-inner,
    .container,
    .hero-slider,
    .footer-grid,
    .mobile-panel {
        width: min(100% - 24px, 1180px);
    }

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

    .hero,
    .hero-slider {
        min-height: 760px;
    }

    .hero-slide {
        padding: 46px 0 82px;
    }

    .hero-actions,
    .section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .hero-dots {
        bottom: 28px;
    }

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

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

    .filter-box {
        grid-template-columns: 1fr;
    }

    .player-title-row {
        padding: 18px;
    }
}
