:root {
    --bg: #f9fafb;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --card: #ffffff;
    --soft: #fff1f2;
    --red: #ef4444;
    --red-dark: #dc2626;
    --ink: #0f172a;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.09);
    --radius: 22px;
}

* {
    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;
    color: var(--text);
    background: var(--bg);
    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;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.93);
    border-bottom: 1px solid rgba(229, 231, 235, 0.8);
    backdrop-filter: blur(18px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--ink);
    white-space: nowrap;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #fb7185 55%, #f59e0b);
    box-shadow: 0 12px 25px rgba(239, 68, 68, 0.26);
    font-size: 14px;
}

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

.desktop-nav a,
.mobile-panel nav a {
    font-weight: 700;
    color: #374151;
    transition: color 0.2s ease;
}

.desktop-nav a:hover,
.desktop-nav a.active,
.mobile-panel nav a:hover,
.mobile-panel nav a.active {
    color: var(--red);
}

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

.header-search input,
.mobile-panel input,
.search-panel input,
.filter-line input {
    width: 230px;
    border: 1px solid var(--line);
    outline: none;
    border-radius: 999px;
    background: #ffffff;
    color: var(--text);
    padding: 10px 15px;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.header-search input:focus,
.mobile-panel input:focus,
.search-panel input:focus,
.filter-line input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

.header-search button,
.mobile-panel button,
.search-panel button,
.btn-primary,
.btn-ghost,
.play-overlay,
.hero-dot,
.hero-arrow,
.menu-button {
    border: 0;
    cursor: pointer;
}

.header-search button,
.mobile-panel button,
.search-panel button,
.btn-primary {
    border-radius: 999px;
    padding: 10px 18px;
    background: var(--red);
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(239, 68, 68, 0.22);
    transition: transform 0.2s ease, background 0.2s ease;
}

.header-search button:hover,
.mobile-panel button:hover,
.search-panel button:hover,
.btn-primary:hover {
    background: var(--red-dark);
    transform: translateY(-1px);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.28);
    font-weight: 800;
    backdrop-filter: blur(12px);
}

.menu-button {
    display: none;
    margin-left: auto;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--soft);
    color: var(--red);
    font-size: 24px;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

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

.mobile-panel form {
    display: flex;
    gap: 8px;
}

.mobile-panel input {
    width: 100%;
}

.mobile-panel nav {
    display: grid;
    gap: 12px;
    padding-top: 14px;
}

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

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

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(239, 68, 68, 0.42), transparent 32%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(127, 29, 29, 0.78));
    z-index: 2;
}

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

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

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

.hero-content {
    position: relative;
    z-index: 3;
    min-height: 640px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    align-items: center;
    gap: 54px;
    padding: 70px 0;
}

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

.eyebrow {
    margin: 0 0 14px;
    color: var(--red);
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: #fecaca;
}

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

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

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0 30px;
}

.hero-tags span,
.movie-tags span,
.tag-list span,
.poster-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 13px;
    font-weight: 800;
}

.hero-tags span {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

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

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

.hero-mini-card {
    display: grid;
    grid-template-columns: 92px 1fr;
    gap: 14px;
    padding: 12px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(18px);
}

.hero-mini-card img {
    width: 92px;
    height: 64px;
    object-fit: cover;
    border-radius: 14px;
}

.hero-mini-card strong {
    display: block;
    margin-bottom: 4px;
    line-height: 1.2;
}

.hero-mini-card span {
    display: block;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
}

.hero-controls {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 34px;
    width: min(1180px, calc(100% - 32px));
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
}

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

.hero-dot {
    width: 34px;
    height: 5px;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.38);
}

.hero-dot.active {
    background: #ffffff;
}

.hero-arrows {
    display: flex;
    gap: 10px;
    pointer-events: auto;
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
    font-size: 22px;
}

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

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(26px, 3vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

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

.more-link {
    color: var(--red);
    font-weight: 900;
    white-space: nowrap;
}

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

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

.movie-card:hover {
    transform: translateY(-5px);
    border-color: rgba(239, 68, 68, 0.26);
    box-shadow: var(--shadow);
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #fee2e2, #f3f4f6);
}

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

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

.poster-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.64), transparent 62%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

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

.poster-chip {
    position: absolute;
    left: 12px;
    bottom: 12px;
    background: rgba(239, 68, 68, 0.95);
    color: #ffffff;
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    border-radius: 12px;
    background: #ffffff;
    color: var(--red);
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.14);
}

.movie-card-body {
    padding: 17px;
}

.movie-card h3 {
    min-height: 48px;
    margin: 0 0 10px;
    font-size: 17px;
    line-height: 1.4;
}

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

.movie-card p {
    min-height: 47px;
    margin: 0 0 13px;
    color: var(--muted);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    color: #6b7280;
    font-size: 12px;
}

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

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

.category-card {
    min-height: 190px;
    padding: 22px;
    border-radius: 22px;
    background: linear-gradient(135deg, #ffffff, #fff1f2);
    border: 1px solid rgba(239, 68, 68, 0.13);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.05);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

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

.category-card strong {
    display: block;
    margin-bottom: 10px;
    font-size: 22px;
    letter-spacing: -0.03em;
}

.category-card p {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 14px;
}

.category-card span {
    color: var(--red);
    font-weight: 900;
}

.rank-panel,
.search-panel,
.detail-card,
.player-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.06);
}

.rank-panel {
    padding: 10px;
}

.rank-row {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 14px;
    border-radius: 16px;
    transition: background 0.2s ease, color 0.2s ease;
}

.rank-row:hover {
    background: var(--soft);
    color: var(--red-dark);
}

.rank-row span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: var(--red);
    color: #ffffff;
    font-weight: 900;
}

.rank-row strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-row em {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    font-style: normal;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-hero {
    padding: 70px 0;
    background:
        radial-gradient(circle at top left, rgba(239, 68, 68, 0.17), transparent 35%),
        linear-gradient(135deg, #ffffff, #f8fafc);
    border-bottom: 1px solid var(--line);
}

.page-hero h1 {
    max-width: 900px;
    color: var(--ink);
}

.page-hero p {
    max-width: 760px;
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 18px;
}

.filter-line,
.search-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.filter-line input,
.search-panel input {
    width: min(520px, 100%);
}

.search-panel {
    padding: 18px;
}

.empty-note {
    display: none;
    color: var(--muted);
    font-weight: 700;
}

.empty-note.show {
    display: block;
}

.detail-hero {
    padding: 44px 0;
    background:
        radial-gradient(circle at 80% 20%, rgba(239, 68, 68, 0.16), transparent 30%),
        linear-gradient(135deg, #111827, #7f1d1d);
    color: #ffffff;
}

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

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

.detail-layout {
    display: grid;
    grid-template-columns: 350px minmax(0, 1fr);
    gap: 34px;
    align-items: center;
}

.detail-cover {
    overflow: hidden;
    border-radius: 26px;
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.24);
}

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

.detail-copy h1 {
    margin: 0;
    font-size: clamp(34px, 5vw, 64px);
    line-height: 1.06;
    letter-spacing: -0.05em;
}

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

.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 22px 0 0;
}

.movie-tags span,
.tag-list span {
    background: var(--soft);
    color: var(--red-dark);
}

.detail-hero .movie-tags span {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.player-card {
    overflow: hidden;
    padding: 18px;
}

.video-frame {
    position: relative;
    overflow: hidden;
    border-radius: 22px;
    background: #000000;
    aspect-ratio: 16 / 9;
}

.video-frame video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.68), rgba(0, 0, 0, 0.18));
    color: #ffffff;
    font-size: 64px;
}

.play-overlay span {
    display: grid;
    place-items: center;
    width: 112px;
    height: 112px;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.94);
    box-shadow: 0 18px 42px rgba(239, 68, 68, 0.35);
    transform: translateX(4px);
}

.play-overlay.hide {
    display: none;
}

.detail-card {
    padding: 28px;
}

.detail-card h2 {
    margin: 0 0 14px;
    font-size: 28px;
    letter-spacing: -0.03em;
}

.detail-card p {
    margin: 0 0 18px;
    color: #374151;
}

.detail-card p:last-child {
    margin-bottom: 0;
}

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

.info-item {
    padding: 15px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.info-item small {
    display: block;
    color: rgba(255, 255, 255, 0.64);
}

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

.prev-next {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.prev-next a {
    display: block;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
    color: var(--ink);
    font-weight: 900;
}

.prev-next a span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

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

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

.footer-brand {
    color: #ffffff;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #ffffff;
    font-size: 17px;
}

.site-footer p {
    margin: 12px 0 0;
    color: #9ca3af;
}

.site-footer a:not(.footer-brand) {
    display: block;
    margin: 8px 0;
    color: #d1d5db;
}

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

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

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

    .menu-button {
        display: inline-grid;
        place-items: center;
    }

    .hero-content {
        grid-template-columns: 1fr;
    }

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

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

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

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

@media (max-width: 760px) {
    .header-inner {
        width: min(100% - 24px, 1180px);
        height: 62px;
    }

    .brand span:last-child {
        font-size: 17px;
    }

    .hero,
    .hero-content {
        min-height: 720px;
    }

    .hero-side,
    .movie-grid,
    .category-grid,
    .detail-layout,
    .info-grid,
    .prev-next,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-content {
        padding: 50px 0 96px;
    }

    .hero-controls {
        bottom: 24px;
    }

    .section-heading {
        display: block;
    }

    .section-heading .more-link {
        display: inline-block;
        margin-top: 8px;
    }

    .section-block {
        padding: 40px 0;
    }

    .detail-cover {
        max-width: 260px;
    }

    .filter-line,
    .search-panel,
    .mobile-panel form {
        flex-direction: column;
        align-items: stretch;
    }

    .play-overlay span {
        width: 84px;
        height: 84px;
        font-size: 48px;
    }
}
