* {
    box-sizing: border-box;
}

:root {
    --orange: #ea580c;
    --orange-dark: #c2410c;
    --red: #991b1b;
    --yellow: #facc15;
    --ink: #1f2937;
    --muted: #6b7280;
    --soft: #f9fafb;
    --line: #e5e7eb;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: #f8fafc;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    line-height: 1.65;
}

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

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #fff;
    background: linear-gradient(135deg, #ea580c, #b91c1c);
    box-shadow: 0 10px 30px rgba(153, 27, 27, 0.28);
}

.nav-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    color: var(--orange);
    background: #fff;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 30px;
    font-weight: 650;
}

.desktop-nav a,
.mobile-nav a {
    transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover {
    color: #fed7aa;
}

.mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    font-size: 24px;
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
}

.mobile-nav a {
    display: block;
    padding: 10px 14px;
    border-radius: 12px;
}

.mobile-nav a:hover {
    background: rgba(255, 255, 255, 0.13);
}

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

.hero-carousel {
    position: relative;
    min-height: 600px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #7c2d12, #7f1d1d);
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-slide.is-active {
    opacity: 1;
    z-index: 1;
}

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

.hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 90px 0 76px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.1));
}

.hero-content {
    width: min(760px, 92vw);
}

.hero-tag,
.pill,
.poster-badge,
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    background: var(--orange);
    font-size: 13px;
    font-weight: 700;
}

.hero-tag {
    padding: 8px 16px;
    margin-bottom: 18px;
}

.hero-content h1,
.hero-content h2 {
    margin: 0 0 18px;
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1.05;
    font-weight: 900;
}

.hero-content p {
    margin: 0 0 24px;
    max-width: 680px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 18px;
}

.hero-meta,
.detail-meta,
.card-meta,
.rank-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    align-items: center;
}

.hero-meta {
    margin-bottom: 28px;
    color: rgba(255, 255, 255, 0.84);
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 0 22px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: var(--orange);
    font-weight: 750;
    box-shadow: 0 12px 26px rgba(234, 88, 12, 0.32);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    background: var(--orange-dark);
    box-shadow: 0 18px 34px rgba(234, 88, 12, 0.38);
}

.btn.secondary {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: none;
    backdrop-filter: blur(10px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.42);
    font-size: 28px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-arrow:hover {
    transform: scale(1.06);
    background: rgba(0, 0, 0, 0.66);
}

.hero-arrow.prev {
    left: 22px;
}

.hero-arrow.next {
    right: 22px;
}

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

.hero-dot {
    width: 12px;
    height: 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
}

.hero-dot.is-active {
    width: 34px;
    background: #fff;
}

.main-content {
    padding: 48px 0 64px;
}

.section {
    margin-bottom: 54px;
}

.section-title {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.section-title h2 {
    margin: 0;
    font-size: clamp(24px, 4vw, 34px);
    line-height: 1.2;
}

.section-title p {
    margin: 8px 0 0;
    color: var(--muted);
}

.section-more {
    flex: none;
    color: var(--orange-dark);
    font-weight: 750;
}

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

.movie-card {
    min-width: 0;
}

.card-link {
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 26px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster {
    position: relative;
    aspect-ratio: 3 / 4;
    margin: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #7c2d12, #111827);
}

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

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

.poster-badge {
    position: absolute;
    left: 12px;
    top: 12px;
    padding: 4px 10px;
}

.poster-score {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 4px 9px;
    border-radius: 999px;
    color: #fff;
    background: rgba(0, 0, 0, 0.7);
    font-size: 13px;
    font-weight: 700;
}

.card-body {
    padding: 16px;
}

.card-body h3 {
    min-height: 52px;
    margin: 0 0 8px;
    font-size: 18px;
    line-height: 1.45;
    transition: color 0.2s ease;
}

.card-link:hover h3 {
    color: var(--orange-dark);
}

.card-body p {
    display: -webkit-box;
    min-height: 52px;
    margin: 0 0 12px;
    overflow: hidden;
    color: var(--muted);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.card-meta,
.rank-meta {
    color: var(--muted);
    font-size: 13px;
}

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

.category-card {
    display: block;
    min-height: 160px;
    padding: 24px;
    border-radius: 22px;
    color: #fff;
    background: linear-gradient(135deg, #f97316, #991b1b);
    box-shadow: 0 16px 34px rgba(185, 28, 28, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card:nth-child(2n) {
    background: linear-gradient(135deg, #fb923c, #be123c);
}

.category-card:nth-child(3n) {
    background: linear-gradient(135deg, #ea580c, #7c2d12);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 44px rgba(185, 28, 28, 0.28);
}

.category-card h3 {
    margin: 0 0 10px;
    font-size: 24px;
}

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

.category-count {
    display: inline-flex;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 13px;
    font-weight: 700;
}

.filter-panel {
    margin-bottom: 28px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
}

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

.filter-panel input:focus,
.filter-panel select:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.12);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.visible-count {
    margin-top: 12px;
    color: var(--muted);
    font-size: 14px;
}

.page-hero {
    color: #fff;
    background: radial-gradient(circle at 20% 20%, rgba(251, 146, 60, 0.65), transparent 28%), linear-gradient(135deg, #7c2d12, #991b1b);
}

.page-hero .container {
    padding: 64px 0;
}

.page-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.1;
}

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

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 14px;
}

.breadcrumbs a:hover {
    color: #fff;
}

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

.rank-item {
    position: relative;
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 16px;
    padding: 14px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

.rank-item img {
    width: 92px;
    height: 122px;
    border-radius: 14px;
    object-fit: cover;
    background: linear-gradient(135deg, #7c2d12, #111827);
}

.rank-item h3 {
    margin: 4px 0 8px;
    font-size: 18px;
}

.rank-item p {
    display: -webkit-box;
    margin: 0 0 10px;
    overflow: hidden;
    color: var(--muted);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.rank-badge {
    min-width: 34px;
    height: 34px;
}

.detail-layout {
    display: grid;
    grid-template-columns: 330px 1fr;
    gap: 34px;
    align-items: start;
}

.detail-poster {
    overflow: hidden;
    border-radius: 22px;
    background: #111827;
    box-shadow: var(--shadow);
}

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

.detail-info h1 {
    margin: 0 0 16px;
    font-size: clamp(30px, 5vw, 50px);
    line-height: 1.1;
}

.detail-info p {
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 18px;
}

.detail-meta {
    margin-bottom: 18px;
}

.pill {
    padding: 5px 11px;
    background: rgba(255, 255, 255, 0.17);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag {
    display: inline-flex;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fed7aa;
    background: rgba(0, 0, 0, 0.22);
    font-size: 13px;
    font-weight: 700;
}

.player-card,
.text-card {
    overflow: hidden;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

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

.player-box video {
    width: 100%;
    height: 100%;
    background: #020617;
    object-fit: contain;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: radial-gradient(circle at center, rgba(234, 88, 12, 0.2), rgba(0, 0, 0, 0.68));
    cursor: pointer;
}

.player-overlay[hidden] {
    display: none;
}

.play-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 170px;
    min-height: 56px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: var(--orange);
    font-size: 18px;
    font-weight: 800;
    box-shadow: 0 18px 40px rgba(234, 88, 12, 0.4);
}

.player-caption,
.text-card {
    padding: 22px;
}

.player-caption h2,
.text-card h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.player-caption p,
.text-card p {
    margin: 0;
    color: var(--muted);
}

.text-card {
    margin-bottom: 24px;
}

.text-card p + p {
    margin-top: 14px;
}

.site-footer {
    color: #d1d5db;
    background: #111827;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 36px;
    padding: 46px 0;
}

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

.site-footer p {
    max-width: 520px;
    margin: 12px 0 0;
}

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

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

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

.footer-bottom {
    padding: 18px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    color: #9ca3af;
}

.no-results {
    display: none;
    padding: 30px;
    border-radius: 18px;
    background: #fff;
    color: var(--muted);
    text-align: center;
}

.no-results.is-visible {
    display: block;
}

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

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

@media (max-width: 820px) {
    .desktop-nav {
        display: none;
    }

    .mobile-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .hero-carousel {
        min-height: 540px;
    }

    .hero-arrow {
        display: none;
    }

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

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

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

    .detail-poster {
        max-width: 320px;
    }
}

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

    .brand {
        font-size: 20px;
    }

    .hero-carousel {
        min-height: 520px;
    }

    .hero-overlay {
        padding: 76px 0 62px;
    }

    .hero-content p,
    .page-hero p,
    .detail-info p {
        font-size: 16px;
    }

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

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