:root {
    --brand-blue: #2563eb;
    --brand-blue-dark: #1d4ed8;
    --brand-orange: #f97316;
    --ink: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f8fafc;
    --card: #ffffff;
    --footer: #111827;
    --shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #f9fafb 0%, #ffffff 40%, #f8fafc 100%);
    color: var(--ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.header-inner {
    max-width: 1280px;
    height: 64px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

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

.brand-icon,
.footer-brand span {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand-blue), #7c3aed);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.25);
}

.brand-text {
    color: #1f2937;
    font-size: 20px;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link,
.mobile-link {
    color: #374151;
    font-weight: 650;
    transition: color 0.2s ease;
}

.nav-link:hover,
.mobile-link:hover,
.nav-link.is-active,
.mobile-link.is-active {
    color: var(--brand-blue);
}

.menu-button {
    display: none;
    border: 0;
    background: transparent;
    color: #374151;
    font-size: 26px;
    cursor: pointer;
}

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

.mobile-nav.is-open {
    display: grid;
    gap: 12px;
}

.hero {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: #020617;
}

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

.hero-slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.hero-image-link,
.hero-image-link img {
    width: 100%;
    height: 100%;
}

.hero-image-link img {
    object-fit: cover;
    transform: scale(1.02);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.46) 52%, rgba(0, 0, 0, 0.24));
}

.hero-copy {
    position: absolute;
    left: max(24px, calc((100vw - 1280px) / 2 + 24px));
    right: 24px;
    bottom: 84px;
    max-width: 760px;
    color: #ffffff;
}

.hero-tags,
.tag-row,
.hero-meta,
.hero-actions,
.movie-meta,
.quick-cats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 13px;
    line-height: 1;
    backdrop-filter: blur(10px);
}

.movie-card .tag-chip,
.detail-tags .tag-chip {
    background: #eff6ff;
    color: #2563eb;
}

.hero h1,
.hero h2 {
    margin: 16px 0 10px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: 0.98;
    font-weight: 900;
    letter-spacing: -0.055em;
}

.hero-subtitle {
    margin: 0 0 12px;
    font-size: clamp(20px, 3vw, 34px);
    font-weight: 750;
    color: rgba(255, 255, 255, 0.92);
}

.hero-desc {
    max-width: 660px;
    margin: 0 0 24px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.8;
}

.hero-meta span {
    border-radius: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.92);
}

.primary-button,
.ghost-button,
.section-link,
.search-strip-form button,
.search-box button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 999px;
    padding: 0 20px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button,
.search-strip-form button,
.search-box button {
    border: 0;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand-blue), #7c3aed);
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.28);
    cursor: pointer;
}

.ghost-button {
    border: 1px solid rgba(255, 255, 255, 0.38);
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
}

.primary-button:hover,
.ghost-button:hover,
.section-link:hover,
.search-strip-form button:hover,
.search-box button:hover {
    transform: translateY(-2px);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.45);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    transform: translateY(-50%);
}

.hero-prev {
    left: 24px;
}

.hero-next {
    right: 24px;
}

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

.hero-dot {
    width: 9px;
    height: 9px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    cursor: pointer;
    transition: width 0.2s ease, background 0.2s ease;
}

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

.search-strip {
    max-width: 1280px;
    margin: -34px auto 0;
    padding: 0 24px;
    position: relative;
    z-index: 7;
}

.search-strip-form,
.search-box,
.filter-panel {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: var(--shadow);
}

.search-strip-form label,
.filter-panel label {
    font-weight: 800;
    white-space: nowrap;
}

.search-strip input,
.search-box input,
.search-box select,
.filter-panel input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 16px;
    color: #111827;
    outline: none;
}

.search-strip input:focus,
.search-box input:focus,
.search-box select:focus,
.filter-panel input:focus {
    border-color: var(--brand-blue);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.quick-cats {
    margin-top: 16px;
    justify-content: center;
}

.quick-cats a {
    border-radius: 999px;
    padding: 8px 14px;
    color: #1f2937;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.page-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 72px 24px;
}

.page-top {
    padding-top: 44px;
}

.content-section + .content-section {
    margin-top: 76px;
}

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

.section-kicker {
    margin: 0 0 6px;
    color: var(--brand-blue);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.section-heading h2,
.page-hero h1,
.detail-article h1 {
    margin: 0;
    color: #111827;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.section-heading h2 {
    font-size: clamp(26px, 4vw, 38px);
}

.section-link {
    color: var(--brand-blue);
    background: #eff6ff;
}

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

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

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

.movie-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border-radius: 18px;
    background: var(--card);
    border: 1px solid rgba(229, 231, 235, 0.85);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: 0 24px 52px rgba(15, 23, 42, 0.16);
}

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

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

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

.poster-mask {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(0, 0, 0, 0);
    transition: background 0.25s ease;
}

.movie-card:hover .poster-mask {
    background: rgba(0, 0, 0, 0.24);
}

.play-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(37, 99, 235, 0.86);
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.movie-card:hover .play-icon {
    opacity: 1;
    transform: scale(1);
}

.rank-badge,
.list-rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    color: #ffffff;
    background: linear-gradient(135deg, #ef4444, #f97316);
}

.rank-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    min-width: 34px;
    height: 34px;
    border-radius: 12px;
}

.movie-card-body {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.movie-title {
    color: #111827;
    font-size: 17px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-desc {
    min-height: 44px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta em {
    font-style: normal;
    color: #64748b;
    font-size: 12px;
    border-radius: 8px;
    padding: 5px 8px;
    background: #f1f5f9;
}

.wide-list,
.ranking-list,
.side-list {
    display: grid;
    gap: 16px;
}

.wide-card {
    display: flex;
    gap: 16px;
    overflow: hidden;
    border-radius: 16px;
    padding: 12px;
    background: #ffffff;
    border: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wide-card:hover {
    transform: translateX(4px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.11);
}

.wide-poster {
    width: 150px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 12px;
    background: #e5e7eb;
    flex: 0 0 auto;
}

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

.wide-content {
    min-width: 0;
    display: grid;
    align-content: center;
    gap: 8px;
}

.wide-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #111827;
    font-size: 18px;
}

.list-rank {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    flex: 0 0 auto;
}

.wide-summary {
    color: var(--muted);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.page-hero {
    border-radius: 28px;
    padding: 42px;
    color: #ffffff;
    background: radial-gradient(circle at 20% 20%, rgba(59, 130, 246, 0.9), rgba(37, 99, 235, 0.72) 30%, rgba(15, 23, 42, 0.96));
    box-shadow: var(--shadow);
}

.small-hero h1 {
    color: #ffffff;
    font-size: clamp(32px, 5vw, 56px);
    margin-bottom: 14px;
}

.small-hero p {
    max-width: 800px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.8;
}

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

.category-card {
    display: grid;
    gap: 14px;
    min-height: 260px;
    padding: 24px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 52px rgba(15, 23, 42, 0.14);
}

.category-card-title {
    font-size: 24px;
    font-weight: 900;
    color: var(--brand-blue);
}

.category-card-desc {
    color: var(--muted);
    line-height: 1.7;
}

.category-sample ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
    color: #374151;
    font-size: 14px;
}

.category-sample a:hover {
    color: var(--brand-blue);
}

.filter-panel {
    margin: 28px 0;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
    color: #64748b;
    font-size: 14px;
}

.breadcrumb a:hover {
    color: var(--brand-blue);
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 28px;
}

.detail-main,
.detail-side {
    min-width: 0;
}

.player-card,
.detail-article,
.side-box,
.side-poster {
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid rgba(229, 231, 235, 0.9);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

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

.video-shell video,
.player-layer,
.player-cover,
.player-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.video-shell video {
    z-index: 1;
}

.player-layer {
    z-index: 2;
    padding: 0;
    border: 0;
    cursor: pointer;
    color: #ffffff;
    background: transparent;
}

.player-layer.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.player-cover img {
    object-fit: cover;
}

.player-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.22));
}

.player-start {
    position: relative;
    z-index: 3;
    width: 86px;
    height: 86px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.94);
    box-shadow: 0 22px 52px rgba(37, 99, 235, 0.36);
    font-size: 42px;
}

.detail-article {
    margin-top: 24px;
    padding: 32px;
}

.detail-article h1 {
    font-size: clamp(30px, 4vw, 48px);
    margin-bottom: 18px;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.detail-meta span {
    border-radius: 10px;
    padding: 8px 12px;
    color: #334155;
    background: #f1f5f9;
}

.detail-article h2,
.side-box h2,
.site-footer h2 {
    color: #111827;
    font-size: 22px;
    margin: 28px 0 12px;
}

.detail-article p {
    color: #374151;
    font-size: 17px;
    line-height: 1.9;
}

.side-poster {
    margin-bottom: 20px;
}

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

.side-box {
    padding: 20px;
}

.side-list .wide-card {
    box-shadow: none;
}

.side-list .wide-poster {
    width: 110px;
}

.search-page {
    display: grid;
    gap: 28px;
    margin-top: 32px;
}

.search-box {
    flex-wrap: wrap;
}

.search-box input {
    flex: 1 1 320px;
}

.search-box select {
    flex: 0 0 170px;
}

.site-footer {
    background: var(--footer);
    color: #d1d5db;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 46px 24px 26px;
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 36px;
    padding-bottom: 32px;
}

.footer-brand {
    color: #ffffff;
    margin-bottom: 14px;
}

.site-footer p {
    max-width: 440px;
    color: #9ca3af;
    line-height: 1.8;
}

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

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 10px;
}

.site-footer a:hover,
.site-footer button:hover {
    color: #60a5fa;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #9ca3af;
}

.footer-bottom button {
    border: 0;
    color: #9ca3af;
    background: transparent;
    cursor: pointer;
}

.is-filtered-out {
    display: none !important;
}

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

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

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

    .detail-side {
        display: grid;
        grid-template-columns: 280px minmax(0, 1fr);
        gap: 20px;
    }
}

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

    .menu-button {
        display: block;
    }

    .header-inner {
        padding: 0 16px;
    }

    .hero {
        min-height: 620px;
        height: 76vh;
    }

    .hero-copy {
        left: 20px;
        right: 20px;
        bottom: 86px;
    }

    .hero-desc {
        font-size: 16px;
    }

    .hero-meta,
    .hero-actions {
        gap: 8px;
    }

    .hero-arrow {
        display: none;
    }

    .search-strip,
    .page-shell {
        padding-left: 16px;
        padding-right: 16px;
    }

    .search-strip-form,
    .search-box,
    .filter-panel {
        align-items: stretch;
        flex-direction: column;
        border-radius: 18px;
    }

    .movie-grid,
    .feature-grid,
    .compact-grid,
    .category-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

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

    .wide-card {
        gap: 12px;
    }

    .wide-poster {
        width: 112px;
    }

    .wide-summary {
        -webkit-line-clamp: 1;
    }

    .page-hero,
    .detail-article {
        padding: 24px;
        border-radius: 20px;
    }

    .detail-side {
        display: block;
    }

    .footer-main {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .brand-text {
        font-size: 17px;
    }

    .movie-grid,
    .feature-grid,
    .compact-grid,
    .category-overview {
        grid-template-columns: 1fr;
    }

    .hero h1,
    .hero h2 {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 22px;
    }

    .player-start {
        width: 68px;
        height: 68px;
        font-size: 34px;
    }
}
