:root {
    --bg: #f9fafb;
    --text: #111827;
    --muted: #6b7280;
    --soft: #f3f4f6;
    --line: #e5e7eb;
    --card: #ffffff;
    --red: #ef4444;
    --red-dark: #dc2626;
    --orange: #f97316;
    --yellow: #f59e0b;
    --black: #020617;
    --radius: 1rem;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.10);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

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

button,
input,
select {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    backdrop-filter: blur(18px);
}

.header-inner {
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 22px;
    color: #111827;
    white-space: nowrap;
}

.logo-mark {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.28);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link,
.mobile-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    color: #374151;
    font-weight: 600;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover,
.nav-link.active,
.mobile-link:hover,
.mobile-link.active {
    color: var(--red-dark);
    background: #fef2f2;
}

.menu-button {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #ffffff;
    color: #111827;
}

.mobile-nav {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: #111827;
    color: #ffffff;
}

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

.hero-slide.active {
    opacity: 1;
}

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

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 25%, rgba(239, 68, 68, 0.36), transparent 34%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.92), rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.24)),
        linear-gradient(0deg, rgba(2, 6, 23, 0.96), transparent 42%);
}

.hero-content {
    position: relative;
    z-index: 2;
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.72fr);
    align-items: center;
    gap: 42px;
    padding: 56px 0;
}

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

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.12);
    color: var(--red);
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hero-kicker {
    color: #ffffff;
    background: rgba(239, 68, 68, 0.92);
}

.hero h1 {
    margin: 22px 0 18px;
    font-size: clamp(40px, 7vw, 76px);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

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

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

.tag {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 12px;
    font-weight: 700;
}

.hero-tags .tag {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 14px 30px rgba(239, 68, 68, 0.32);
}

.btn-ghost {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(12px);
}

.btn-light {
    color: var(--red-dark);
    background: #fff1f2;
    border-color: #fee2e2;
}

.hero-panel {
    display: grid;
    gap: 14px;
}

.hero-mini {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(18px);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.hero-mini:hover,
.hero-mini.active {
    background: rgba(239, 68, 68, 0.48);
    transform: translateX(3px);
}

.hero-mini img {
    width: 92px;
    height: 118px;
    object-fit: cover;
    border-radius: 16px;
}

.hero-mini strong {
    display: block;
    margin-bottom: 4px;
    font-size: 16px;
}

.hero-mini span {
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
}

.section {
    padding: 70px 0;
}

.section.white {
    background: #ffffff;
}

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

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

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

.grid {
    display: grid;
    gap: 22px;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: var(--card);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(229, 231, 235, 0.9);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

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

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

.movie-card:hover img {
    transform: scale(1.06);
    opacity: 0.92;
}

.score,
.rank-badge,
.play-dot {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-weight: 900;
}

.score {
    right: 10px;
    top: 10px;
    min-width: 42px;
    height: 28px;
    color: #ffffff;
    background: rgba(239, 68, 68, 0.94);
}

.rank-badge {
    left: 10px;
    top: 10px;
    width: 34px;
    height: 34px;
    color: #7c2d12;
    background: linear-gradient(135deg, #fde68a, #fb923c);
}

.play-dot {
    left: 50%;
    top: 50%;
    width: 54px;
    height: 54px;
    color: #ffffff;
    background: rgba(239, 68, 68, 0.86);
    transform: translate(-50%, -50%) scale(0.88);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

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

.movie-info {
    padding: 16px;
}

.movie-info h3 {
    margin: 0 0 6px;
    min-height: 48px;
    font-size: 16px;
    line-height: 1.45;
}

.movie-info h3 a:hover {
    color: var(--red-dark);
}

.meta,
.desc {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 13px;
}

.desc {
    min-height: 42px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-card {
    position: relative;
    overflow: hidden;
    padding: 28px;
    min-height: 190px;
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card::before {
    content: "";
    position: absolute;
    right: -40px;
    top: -40px;
    width: 130px;
    height: 130px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.18), rgba(249, 115, 22, 0.12));
}

.category-card h3 {
    position: relative;
    margin: 0 0 8px;
    font-size: 22px;
}

.category-card p {
    position: relative;
    margin: 0 0 18px;
    color: var(--muted);
}

.category-card strong {
    position: relative;
    color: var(--red-dark);
}

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

.stat-card {
    padding: 28px;
    border-radius: 24px;
    text-align: center;
    background: linear-gradient(135deg, #fff1f2, #fff7ed);
}

.stat-card strong {
    display: block;
    color: var(--red);
    font-size: 38px;
    line-height: 1;
}

.stat-card span {
    color: var(--muted);
    font-weight: 700;
}

.page-hero {
    padding: 62px 0 42px;
    background:
        radial-gradient(circle at 20% 20%, rgba(239, 68, 68, 0.16), transparent 28%),
        linear-gradient(135deg, #111827, #1f2937);
    color: #ffffff;
}

.page-hero h1 {
    margin: 12px 0 10px;
    font-size: clamp(34px, 5vw, 54px);
    letter-spacing: -0.04em;
}

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
}

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

.filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px 160px;
    gap: 12px;
    margin-bottom: 24px;
    padding: 18px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

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

.filter-bar input:focus,
.filter-bar select:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

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

.player-card,
.detail-card,
.side-card {
    overflow: hidden;
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

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

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

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.05), rgba(2, 6, 23, 0.56));
    z-index: 3;
}

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

.play-button {
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--red), var(--orange));
    box-shadow: 0 18px 45px rgba(239, 68, 68, 0.42);
    font-size: 32px;
    line-height: 1;
}

.detail-card {
    padding: 28px;
}

.detail-card h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 5vw, 48px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

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

.info-list div {
    padding: 14px;
    border-radius: 18px;
    background: #f9fafb;
}

.info-list span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.info-list strong {
    display: block;
    margin-top: 4px;
}

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

.content-block h2 {
    margin: 0 0 10px;
    font-size: 22px;
}

.content-block p {
    margin: 0;
    color: #374151;
    white-space: pre-line;
}

.side-card {
    padding: 18px;
}

.side-card h2 {
    margin: 0 0 16px;
    font-size: 20px;
}

.related-item {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--line);
}

.related-item:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.related-item img {
    width: 74px;
    height: 96px;
    object-fit: cover;
    border-radius: 14px;
}

.related-item strong {
    display: block;
    margin-bottom: 4px;
}

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

.site-footer {
    padding: 54px 0;
    background: #111827;
    color: #d1d5db;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 32px;
}

.footer-logo {
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 22px;
    font-weight: 900;
}

.site-footer h3 {
    margin: 0 0 12px;
    color: #ffffff;
}

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

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

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

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

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

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

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

    .menu-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-nav.open {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .hero,
    .hero-content {
        min-height: auto;
    }

    .hero-content {
        grid-template-columns: 1fr;
        padding: 58px 0 36px;
    }

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

    .hero-mini {
        grid-template-columns: 68px 1fr;
    }

    .hero-mini img {
        width: 68px;
        height: 88px;
    }

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

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

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

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

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

    .header-inner {
        height: 64px;
    }

    .logo {
        font-size: 18px;
    }

    .logo-mark {
        width: 36px;
        height: 36px;
        border-radius: 12px;
    }

    .hero h1 {
        font-size: 38px;
    }

    .hero-panel,
    .category-grid,
    .stats-grid,
    .movie-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .section {
        padding: 46px 0;
    }

    .movie-info {
        padding: 12px;
    }

    .movie-info h3 {
        min-height: auto;
        font-size: 15px;
    }

    .desc {
        display: none;
    }

    .detail-card,
    .category-card {
        padding: 20px;
    }

    .play-button {
        width: 70px;
        height: 70px;
        font-size: 26px;
    }
}
