:root {
    --blue: #2563eb;
    --cyan: #06b6d4;
    --deep-blue: #1d4ed8;
    --orange: #f97316;
    --red: #ef4444;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f8fafc;
    --white: #ffffff;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
    --radius: 22px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: #f3f4f6;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: var(--white);
    background: linear-gradient(90deg, var(--deep-blue), var(--cyan));
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.25);
}

.nav-wrap {
    max-width: 1280px;
    height: 68px;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    white-space: nowrap;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
    font-size: 16px;
}

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

.desktop-nav > a,
.nav-dropdown > a {
    font-weight: 700;
    opacity: 0.95;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.desktop-nav > a:hover,
.nav-dropdown:hover > a,
.desktop-nav .active {
    color: #cffafe;
    opacity: 1;
}

.nav-dropdown {
    position: relative;
    padding: 22px 0;
}

.dropdown-panel {
    position: absolute;
    top: 62px;
    left: 50%;
    width: 210px;
    padding: 10px;
    transform: translateX(-50%) translateY(10px);
    border-radius: 18px;
    color: #1f2937;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-panel a,
.mobile-cats a {
    display: block;
    padding: 9px 12px;
    border-radius: 10px;
    color: #1f2937;
    font-weight: 650;
}

.dropdown-panel a:hover,
.mobile-cats a:hover {
    background: #eff6ff;
    color: var(--deep-blue);
}

.nav-search {
    width: 280px;
    position: relative;
}

.nav-search input {
    width: 100%;
    height: 40px;
    padding: 0 46px 0 18px;
    border: 0;
    border-radius: 999px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    outline: none;
    backdrop-filter: blur(10px);
}

.nav-search input::placeholder {
    color: rgba(255, 255, 255, 0.78);
}

.nav-search button {
    position: absolute;
    top: 4px;
    right: 6px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    color: var(--white);
    cursor: pointer;
    background: rgba(255, 255, 255, 0.16);
}

.mobile-toggle {
    display: none;
    border: 0;
    color: var(--white);
    background: rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    width: 42px;
    height: 42px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 22px 18px;
}

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

.mobile-panel form {
    display: flex;
    gap: 10px;
    margin: 4px 0 12px;
}

.mobile-panel input {
    flex: 1;
    min-width: 0;
    padding: 10px 14px;
    border: 0;
    border-radius: 14px;
}

.mobile-panel button {
    border: 0;
    border-radius: 14px;
    padding: 0 16px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.2);
}

.mobile-panel > a {
    display: block;
    padding: 9px 0;
    font-weight: 700;
}

.mobile-cats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 10px;
}

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

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

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

.hero-slide img,
.detail-backdrop img {
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.12));
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    height: 100%;
    margin: 0 auto;
    padding: 0 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: var(--white);
}

.hero-content h1 {
    max-width: 780px;
    margin: 14px 0 18px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 24px;
    color: #e5e7eb;
    font-size: clamp(17px, 2vw, 22px);
}

.hero-kicker,
.kicker {
    display: inline-flex;
    width: max-content;
    align-items: center;
    padding: 7px 15px;
    border-radius: 999px;
    color: var(--white);
    background: linear-gradient(90deg, var(--orange), var(--red));
    font-weight: 800;
    font-size: 14px;
    box-shadow: 0 12px 30px rgba(239, 68, 68, 0.26);
}

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

.hero-meta span,
.detail-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    font-weight: 700;
}

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

.centered-actions {
    justify-content: center;
}

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

.primary-btn {
    color: var(--white);
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    box-shadow: 0 16px 30px rgba(6, 182, 212, 0.28);
}

.primary-btn:hover,
.ghost-btn:hover,
.section-link:hover {
    transform: translateY(-2px);
}

.ghost-btn {
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
}

.ghost-btn.light {
    color: var(--white);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

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

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

.hero-dot.active {
    width: 34px;
    background: var(--white);
}

.content-section {
    max-width: 1280px;
    margin: 0 auto;
    padding: 54px 22px;
}

.category-strip {
    padding-top: 28px;
    padding-bottom: 12px;
}

.quick-categories {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

.quick-categories a,
.category-card,
.story-card,
.player-card {
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.quick-categories a {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-categories a:hover,
.movie-card:hover,
.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.quick-categories em {
    color: var(--cyan);
    font-size: 26px;
    font-style: normal;
}

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

.section-heading h2 {
    margin: 12px 0 8px;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.1;
}

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

.section-link {
    color: var(--deep-blue);
    background: #dbeafe;
    white-space: nowrap;
}

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

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

.movie-card {
    overflow: hidden;
    border-radius: 20px;
    background: var(--white);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.poster-link {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #cffafe);
}

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

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

.year-badge,
.rank-mark {
    position: absolute;
    top: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    color: var(--white);
    background: rgba(0, 0, 0, 0.58);
    backdrop-filter: blur(8px);
    font-size: 13px;
    font-weight: 800;
}

.year-badge {
    right: 12px;
}

.rank-mark {
    left: 12px;
    min-width: 34px;
    background: linear-gradient(90deg, var(--orange), var(--red));
}

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

.card-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.card-tags span,
.detail-tags span {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 999px;
    color: #075985;
    background: #e0f2fe;
    font-size: 12px;
    font-weight: 800;
}

.movie-card h3 {
    margin: 10px 0 8px;
    font-size: 17px;
    line-height: 1.32;
}

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

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

.movie-meta {
    gap: 8px;
    color: #64748b;
    font-size: 13px;
}

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

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

.page-hero {
    text-align: center;
    padding: 86px 22px 78px;
    color: var(--white);
    background: radial-gradient(circle at top left, rgba(6, 182, 212, 0.65), transparent 35%), linear-gradient(120deg, #1d4ed8, #0891b2 55%, #0f172a);
}

.page-hero .kicker {
    margin: 0 auto;
}

.page-hero h1 {
    margin: 18px auto 14px;
    max-width: 900px;
    font-size: clamp(36px, 6vw, 62px);
    line-height: 1.08;
    font-weight: 900;
}

.page-hero p {
    max-width: 760px;
    margin: 0 auto;
    color: #e5faff;
    font-size: 18px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.category-card {
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.category-card-main {
    display: block;
    padding: 26px;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue), var(--cyan));
}

.category-card-main span {
    display: block;
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 10px;
}

.category-card-main p {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
}

.category-card-links {
    display: grid;
    gap: 8px;
    padding: 18px 22px 22px;
}

.category-card-links a {
    color: #334155;
    font-weight: 700;
}

.category-card-links a:hover {
    color: var(--deep-blue);
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 160px 180px 180px;
    gap: 12px;
    margin-bottom: 24px;
}

.filter-bar input,
.filter-bar select,
.big-search input {
    width: 100%;
    height: 48px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 0 14px;
    color: var(--text);
    background: var(--white);
    outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus,
.big-search input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.13);
}

.detail-hero {
    position: relative;
    overflow: hidden;
    min-height: 600px;
    color: var(--white);
    background: #020617;
}

.detail-backdrop {
    position: absolute;
    inset: 0;
    opacity: 0.46;
    filter: blur(2px);
}

.detail-backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.96), rgba(2, 6, 23, 0.68), rgba(2, 6, 23, 0.88));
}

.detail-content {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    min-height: 600px;
    margin: 0 auto;
    padding: 70px 22px;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 42px;
    align-items: center;
}

.poster-panel {
    overflow: hidden;
    border-radius: 28px;
    aspect-ratio: 2 / 3;
    background: linear-gradient(135deg, #dbeafe, #cffafe);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

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

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #cbd5e1;
    font-weight: 700;
}

.breadcrumbs a:hover {
    color: #67e8f9;
}

.detail-copy h1 {
    margin: 20px 0 16px;
    font-size: clamp(36px, 5.5vw, 64px);
    line-height: 1.08;
}

.detail-one-line {
    max-width: 820px;
    margin: 0 0 22px;
    color: #e2e8f0;
    font-size: 20px;
}

.detail-tags {
    margin-top: 18px;
}

.detail-main {
    display: grid;
    gap: 26px;
}

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

.player-box {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 20px;
    background: #020617;
}

.player-box video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    cursor: pointer;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    cursor: pointer;
    color: var(--white);
    background: radial-gradient(circle, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.44));
}

.play-overlay span {
    width: 88px;
    height: 88px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--cyan), var(--blue));
    box-shadow: 0 20px 50px rgba(6, 182, 212, 0.32);
    font-size: 32px;
}

.play-overlay.is-hidden {
    display: none;
}

.story-card h2 {
    margin: 0 0 14px;
    font-size: 28px;
}

.story-card h2:not(:first-child) {
    margin-top: 28px;
}

.story-card p {
    margin: 0;
    color: #334155;
    font-size: 17px;
}

.related-section {
    padding-top: 10px;
}

.big-search {
    max-width: 720px;
    margin: 30px auto 0;
    display: flex;
    gap: 12px;
}

.big-search button {
    min-width: 120px;
    border: 0;
    border-radius: 14px;
    color: var(--white);
    background: linear-gradient(90deg, var(--orange), var(--red));
    font-weight: 900;
    cursor: pointer;
}

.search-results-section:has(#searchResults:empty) {
    display: none;
}

.site-footer {
    margin-top: 40px;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 42px 22px;
    display: grid;
    gap: 14px;
}

.footer-inner p {
    max-width: 780px;
    margin: 0;
    color: #94a3b8;
}

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

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

.is-filter-hidden {
    display: none !important;
}

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

    .quick-categories {
        grid-template-columns: repeat(4, 1fr);
    }
}

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

    .mobile-toggle {
        display: inline-grid;
        place-items: center;
        margin-left: auto;
    }

    .nav-wrap {
        gap: 14px;
    }

    .hero-carousel {
        height: 660px;
    }

    .hero-overlay {
        background: linear-gradient(0deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.32));
    }

    .hero-content {
        justify-content: end;
        padding-bottom: 90px;
    }

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

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

    .filter-input {
        grid-column: 1 / -1;
    }

    .detail-content {
        grid-template-columns: 1fr;
        padding-top: 42px;
    }

    .poster-panel {
        max-width: 260px;
    }
}

@media (max-width: 560px) {
    .brand {
        font-size: 19px;
    }

    .content-section {
        padding: 40px 16px;
    }

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

    .hero-content h1,
    .page-hero h1,
    .detail-copy h1 {
        font-size: 34px;
    }

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

    .quick-categories,
    .movie-grid,
    .compact-grid,
    .rank-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar,
    .big-search {
        grid-template-columns: 1fr;
        display: grid;
    }

    .section-heading {
        display: block;
    }

    .section-link {
        margin-top: 16px;
    }

    .player-card,
    .story-card {
        padding: 14px;
    }
}
