* {
    box-sizing: border-box;
}

:root {
    --slate-950: #020617;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --white: #ffffff;
    --amber: #f59e0b;
    --orange: #f97316;
    --rose: #f43f5e;
    --shadow-soft: 0 18px 55px rgba(15, 23, 42, 0.12);
    --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.1);
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--slate-800);
    background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

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

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
    font-weight: 800;
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #fbbf24, #f97316);
    color: var(--white);
    box-shadow: 0 10px 25px rgba(249, 115, 22, 0.35);
}

.brand-text {
    font-size: 22px;
    letter-spacing: 0.03em;
    background: linear-gradient(90deg, #fde68a, #fed7aa, #ffffff);
    -webkit-background-clip: text;
    color: transparent;
}

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

.main-nav a {
    color: #e5e7eb;
    font-weight: 600;
    transition: color 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
    color: #fcd34d;
    transform: translateY(-1px);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input {
    width: 230px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: var(--white);
    background: rgba(15, 23, 42, 0.62);
    outline: none;
}

.header-search input:focus {
    border-color: #fbbf24;
    box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.18);
}

.header-search button,
.primary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.header-search button,
.primary-button {
    padding: 10px 18px;
    color: var(--white);
    background: linear-gradient(90deg, #f59e0b, #f97316);
    box-shadow: 0 10px 24px rgba(249, 115, 22, 0.25);
}

.primary-button:hover,
.header-search button:hover,
.ghost-button:hover {
    transform: translateY(-2px);
}

.ghost-button {
    padding: 10px 18px;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.36);
    background: rgba(255, 255, 255, 0.08);
}

.ghost-button.dark {
    color: var(--slate-800);
    border-color: rgba(15, 23, 42, 0.12);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.mobile-menu-button {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    cursor: pointer;
}

.mobile-menu-button span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--white);
}

.hero-section {
    position: relative;
    overflow: hidden;
    color: var(--white);
    background: radial-gradient(circle at 20% 10%, rgba(245, 158, 11, 0.38), transparent 26%),
                linear-gradient(120deg, #0f172a 0%, #1e293b 46%, #78350f 100%);
}

.hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.13;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.75) 1px, transparent 1px);
    background-size: 28px 28px;
}

.hero-shell {
    position: relative;
    z-index: 2;
    width: min(1180px, calc(100% - 32px));
    min-height: 640px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 74px 0;
}

.hero-slider {
    position: relative;
    width: 100%;
}

.hero-slide {
    display: none;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 420px);
    gap: 52px;
    align-items: center;
}

.hero-slide.is-active {
    display: grid;
    animation: fadeUp 0.55s ease both;
}

.hero-kicker,
.eyebrow {
    display: inline-flex;
    margin-bottom: 12px;
    color: #fcd34d;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-copy h1 {
    max-width: 760px;
    margin: 0 0 18px;
    font-size: clamp(42px, 8vw, 74px);
    line-height: 1.02;
    letter-spacing: -0.05em;
    background: linear-gradient(90deg, #fde68a, #fed7aa, #ffffff);
    -webkit-background-clip: text;
    color: transparent;
}

.hero-copy p {
    max-width: 720px;
    margin: 0 0 22px;
    color: #e2e8f0;
    font-size: 18px;
}

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

.hero-tags span,
.tag-list span {
    padding: 5px 10px;
    border-radius: 999px;
    color: #92400e;
    background: #fef3c7;
    font-size: 13px;
    font-weight: 700;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.hero-poster {
    position: relative;
    overflow: hidden;
    display: block;
    min-height: 520px;
    border-radius: 30px;
    background: rgba(15, 23, 42, 0.35);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.hero-poster::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, transparent 36%, rgba(2, 6, 23, 0.86));
}

.hero-poster img {
    width: 100%;
    height: 100%;
    min-height: 520px;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.hero-poster:hover img {
    transform: scale(1.05);
}

.hero-poster span {
    position: absolute;
    left: 24px;
    right: 24px;
    bottom: 24px;
    z-index: 2;
    display: inline-flex;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(245, 158, 11, 0.92);
    font-weight: 800;
}

.hero-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 34px;
}

.hero-controls button {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    color: var(--white);
    background: rgba(255, 255, 255, 0.09);
    cursor: pointer;
    font-size: 24px;
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dots button {
    width: 28px;
    height: 8px;
    border-radius: 999px;
    font-size: 0;
}

.hero-dots button.is-active {
    width: 48px;
    background: #f59e0b;
}

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

.compact-section {
    padding: 56px 0;
}

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

.section-heading h2 {
    margin: 0;
    color: var(--slate-900);
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.15;
}

.section-heading p {
    max-width: 760px;
    margin: 8px 0 0;
    color: var(--slate-600);
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.18);
}

.poster {
    position: relative;
    overflow: hidden;
    display: block;
    aspect-ratio: 16 / 10;
    background: #111827;
}

.catalog-grid .poster,
.popular-grid .poster,
.recent-grid .poster {
    aspect-ratio: 2 / 3;
}

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

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

.poster::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(2, 6, 23, 0.76));
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.card-type,
.rank-badge,
.poster-play {
    position: absolute;
    z-index: 2;
}

.card-type {
    top: 12px;
    right: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(90deg, #f59e0b, #f97316);
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    top: 12px;
    left: 12px;
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(90deg, #e11d48, #f97316);
    font-size: 12px;
    font-weight: 900;
}

.poster-play {
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--white);
    background: rgba(245, 158, 11, 0.92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.86);
    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: 18px;
}

.movie-card-body h3 {
    margin: 0 0 8px;
    color: var(--slate-900);
    font-size: 18px;
    line-height: 1.3;
}

.movie-card-body h3 a:hover {
    color: var(--orange);
}

.movie-meta,
.movie-desc {
    margin: 0 0 10px;
    color: var(--slate-600);
    font-size: 14px;
}

.movie-desc {
    min-height: 46px;
}

.category-band {
    background: linear-gradient(90deg, #fff7ed, #fffbeb, #f8fafc);
}

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

.category-tile {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    border-radius: var(--radius-lg);
    color: var(--white);
    box-shadow: var(--shadow-card);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-icon {
    font-size: 42px;
    line-height: 1;
}

.category-tile strong {
    font-size: 22px;
}

.category-tile small {
    color: rgba(255, 255, 255, 0.88);
}

.gradient-orange { background: linear-gradient(135deg, #f59e0b, #f97316); }
.gradient-amber { background: linear-gradient(135deg, #d97706, #fbbf24); }
.gradient-rose { background: linear-gradient(135deg, #e11d48, #fb7185); }
.gradient-pink { background: linear-gradient(135deg, #db2777, #f472b6); }
.gradient-blue { background: linear-gradient(135deg, #2563eb, #06b6d4); }
.gradient-green { background: linear-gradient(135deg, #059669, #34d399); }
.gradient-purple { background: linear-gradient(135deg, #7c3aed, #a855f7); }
.gradient-cyan { background: linear-gradient(135deg, #0891b2, #22d3ee); }

.section-more {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

.page-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    padding: 46px;
    border-radius: 30px;
    color: var(--white);
    background: linear-gradient(120deg, #0f172a, #1e293b, #78350f);
    box-shadow: var(--shadow-soft);
}

.page-hero h1 {
    margin: 0 0 10px;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.05;
}

.page-hero p {
    max-width: 820px;
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 17px;
}

.category-hero {
    display: flex;
    gap: 24px;
    align-items: center;
}

.category-overview-list {
    display: grid;
    gap: 28px;
}

.category-overview-card {
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.category-overview-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 22px;
    align-items: center;
    padding: 28px;
    color: var(--white);
}

.category-overview-head h2 {
    margin: 0;
    font-size: 30px;
}

.category-overview-head p {
    margin: 6px 0;
}

.category-overview-head a {
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-weight: 800;
}

.category-overview-card .mini-grid {
    padding: 22px;
}

.filter-panel {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr) auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 28px;
    padding: 18px;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.filter-panel label {
    display: block;
    margin-bottom: 6px;
    color: var(--slate-600);
    font-size: 13px;
    font-weight: 800;
}

.filter-panel input,
.filter-panel select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    color: var(--slate-800);
    background: var(--white);
    outline: none;
}

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

.filter-count {
    min-width: 120px;
    padding: 10px 14px;
    border-radius: 12px;
    color: #92400e;
    background: #fef3c7;
    text-align: center;
    font-weight: 800;
}

.filter-empty {
    padding: 18px;
    border-radius: 14px;
    color: #991b1b;
    background: #fee2e2;
    font-weight: 700;
}

.table-wrap {
    overflow-x: auto;
    margin-top: 34px;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 780px;
}

.ranking-table th,
.ranking-table td {
    padding: 13px 16px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.ranking-table th {
    color: var(--slate-900);
    background: #f8fafc;
}

.ranking-table a {
    color: #b45309;
    font-weight: 800;
}

.breadcrumb {
    width: min(1180px, calc(100% - 32px));
    margin: 28px auto 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--slate-600);
}

.breadcrumb a {
    color: #b45309;
    font-weight: 700;
}

.detail-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 34px;
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
    padding: 34px;
    border-radius: 30px;
    color: var(--white);
    background: radial-gradient(circle at 16% 20%, rgba(245, 158, 11, 0.32), transparent 32%),
                linear-gradient(120deg, #0f172a, #1e293b 58%, #78350f);
    box-shadow: var(--shadow-soft);
}

.detail-poster {
    overflow: hidden;
    border-radius: 24px;
    background: #111827;
    box-shadow: 0 24px 56px rgba(0, 0, 0, 0.28);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.detail-info h1 {
    margin: 0 0 14px;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.detail-one-line {
    margin: 0 0 22px;
    color: #e2e8f0;
    font-size: 18px;
}

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

.detail-meta-grid span {
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
}

.detail-meta-grid strong {
    display: block;
    color: #fcd34d;
    font-size: 12px;
}

.detail-tags {
    margin-bottom: 26px;
}

.player-section,
.detail-content,
.related-section {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 36px;
}

.player-section {
    padding: 24px;
    border-radius: 26px;
    background: #0f172a;
    box-shadow: var(--shadow-soft);
}

.player-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    color: var(--white);
    margin-bottom: 18px;
}

.player-head h2 {
    margin: 0;
    font-size: 28px;
}

.source-label {
    padding: 8px 12px;
    border-radius: 999px;
    color: #92400e;
    background: #fef3c7;
    font-weight: 900;
}

.player-box {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    background: #020617;
}

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

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    color: var(--white);
    background: radial-gradient(circle, rgba(245, 158, 11, 0.12), rgba(2, 6, 23, 0.72));
    cursor: pointer;
    font-size: 20px;
    font-weight: 900;
}

.play-overlay span {
    width: 72px;
    height: 72px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    box-shadow: 0 18px 40px rgba(249, 115, 22, 0.32);
}

.player-box.is-playing .play-overlay {
    display: none;
}

.player-status {
    margin: 12px 0 0;
    color: #cbd5e1;
}

.detail-content {
    display: grid;
    gap: 18px;
}

.detail-content article {
    padding: 26px;
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-card);
}

.detail-content h2 {
    margin: 0 0 10px;
    color: var(--slate-900);
}

.detail-content p {
    margin: 0;
    color: var(--slate-700);
    font-size: 17px;
}

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

.related-card {
    overflow: hidden;
    border-radius: 16px;
    background: var(--white);
    box-shadow: var(--shadow-card);
    transition: transform 0.2s ease;
}

.related-card:hover {
    transform: translateY(-5px);
}

.related-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    background: #111827;
}

.related-card span {
    display: block;
    padding: 12px;
    color: var(--slate-900);
    font-weight: 800;
}

.site-footer {
    margin-top: 60px;
    color: #cbd5e1;
    background: linear-gradient(180deg, #0f172a, #020617);
}

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

.site-footer h3 {
    margin: 0 0 12px;
    color: var(--white);
}

.site-footer p,
.site-footer ul {
    margin: 0;
    padding: 0;
}

.site-footer ul {
    list-style: none;
}

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

.site-footer a:hover {
    color: #fcd34d;
}

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

@media (max-width: 1024px) {
    .header-inner {
        flex-wrap: wrap;
        padding: 12px 0;
    }

    .main-nav {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-left: 0;
    }

    .header-search {
        margin-left: auto;
    }

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

    .hero-poster {
        min-height: auto;
    }

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

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

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

@media (max-width: 720px) {
    .header-inner {
        gap: 12px;
    }

    .brand-text {
        font-size: 19px;
    }

    .mobile-menu-button {
        display: inline-block;
    }

    .main-nav {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        padding: 12px;
        border-radius: 16px;
        background: rgba(15, 23, 42, 0.92);
    }

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

    .header-search {
        order: 4;
        width: 100%;
    }

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

    .hero-shell {
        min-height: auto;
        padding: 48px 0;
    }

    .hero-slide.is-active {
        display: block;
    }

    .hero-poster {
        margin-top: 30px;
    }

    .hero-poster img {
        min-height: 360px;
    }

    .movie-grid,
    .popular-grid,
    .recent-grid,
    .catalog-grid,
    .mini-grid,
    .category-grid,
    .related-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .page-hero,
    .detail-hero {
        padding: 28px;
        border-radius: 22px;
    }

    .category-hero,
    .category-overview-head {
        display: block;
    }

    .category-overview-head a {
        display: inline-flex;
        margin-top: 14px;
    }

    .filter-panel,
    .detail-meta-grid {
        grid-template-columns: 1fr;
    }

    .player-section,
    .detail-content,
    .related-section {
        width: min(100% - 24px, 1180px);
    }
}
