html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;
    color: #111827;
    background: #f8fafc;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.menu-open {
    overflow: hidden;
}

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

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, #0f172a, #1e3a8a, #0f172a);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.2);
}

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

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 68px;
    gap: 24px;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: #bfdbfe;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.18);
    box-shadow: inset 0 0 0 1px rgba(191, 219, 254, 0.28);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 26px;
    color: #e5e7eb;
    font-size: 15px;
}

.nav-links a,
.nav-links button {
    border: 0;
    padding: 0;
    color: inherit;
    background: none;
    font: inherit;
    cursor: pointer;
}

.nav-links a:hover,
.nav-links button:hover {
    color: #fff;
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 14px);
    left: 0;
    width: 210px;
    padding: 8px;
    color: #1f2937;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 22px 45px rgba(15, 23, 42, 0.2);
    visibility: hidden;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.nav-dropdown:hover .dropdown-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 10px 12px;
    border-radius: 9px;
    color: #374151;
}

.dropdown-menu a:hover {
    color: #2563eb;
    background: #eff6ff;
}

.header-search {
    position: relative;
    width: 260px;
}

.header-search input,
.filter-input,
.search-box input {
    width: 100%;
    box-sizing: border-box;
    border: 0;
    outline: 0;
    border-radius: 999px;
    background: #0f172a;
    color: #fff;
    padding: 12px 44px 12px 18px;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.35);
}

.header-search input::placeholder,
.filter-input::placeholder,
.search-box input::placeholder {
    color: #94a3b8;
}

.search-button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    color: #bfdbfe;
    background: rgba(59, 130, 246, 0.22);
    cursor: pointer;
}

.mobile-menu-button {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 0;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    cursor: pointer;
}

.mobile-panel {
    display: none;
    padding: 14px 0 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
}

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

.mobile-panel a {
    display: block;
    padding: 12px 10px;
    color: #e5e7eb;
    border-radius: 10px;
}

.mobile-panel a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.hero {
    position: relative;
    height: 620px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #1e3a8a 48%, #164e63);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: center;
    opacity: 0;
    transition: opacity 0.8s ease;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    background-position: center;
    background-size: cover;
    opacity: 0.2;
    transform: scale(1.04);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 72% 38%, rgba(59, 130, 246, 0.28), transparent 34%), linear-gradient(90deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.64), rgba(15, 23, 42, 0.2));
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 710px;
    padding-top: 28px;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 13px;
    border-radius: 999px;
    color: #bfdbfe;
    background: rgba(59, 130, 246, 0.16);
    box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.24);
    font-size: 13px;
    font-weight: 700;
}

.hero h1 {
    margin: 22px 0 18px;
    font-size: clamp(42px, 7vw, 72px);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.gradient-text {
    display: block;
    color: transparent;
    background: linear-gradient(90deg, #60a5fa, #22d3ee);
    -webkit-background-clip: text;
    background-clip: text;
}

.hero-description {
    max-width: 620px;
    margin: 0 0 28px;
    color: #d1d5db;
    font-size: 20px;
    line-height: 1.75;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
}

.meta-pill,
.tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    color: #e0f2fe;
    background: rgba(15, 23, 42, 0.5);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.13);
    font-size: 13px;
    font-weight: 700;
}

.hero-actions,
.page-actions {
    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: 999px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    color: #fff;
    background: #3b82f6;
    box-shadow: 0 18px 34px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-glass {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

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

.hero-dot {
    width: 34px;
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.32);
    cursor: pointer;
}

.hero-dot.is-active {
    background: #60a5fa;
}

.hero-fade {
    position: absolute;
    z-index: 4;
    left: 0;
    right: 0;
    bottom: 0;
    height: 130px;
    background: linear-gradient(0deg, #f8fafc, rgba(248, 250, 252, 0));
}

.section {
    padding: 72px 0;
}

.section-soft {
    background: linear-gradient(90deg, #ecfdf5, #ecfeff);
}

.section-blue {
    background: linear-gradient(180deg, #eff6ff, #ecfeff);
}

.section-orange {
    background: linear-gradient(135deg, #fff7ed, #fef2f2);
}

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

.section-title {
    margin: 12px 0 0;
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.18;
    color: #0f172a;
    letter-spacing: -0.03em;
}

.section-desc {
    max-width: 760px;
    margin: 12px 0 0;
    color: #64748b;
    line-height: 1.75;
}

.section-link {
    flex: 0 0 auto;
    color: #2563eb;
    font-weight: 800;
}

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

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

.movie-card {
    position: relative;
    overflow: hidden;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.16);
}

.movie-cover {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e5e7eb;
}

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

.movie-card:hover img {
    transform: scale(1.09);
}

.movie-cover::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    background: rgba(15, 23, 42, 0.42);
    transition: opacity 0.2s ease;
}

.movie-card:hover .movie-cover::after {
    opacity: 1;
}

.play-badge {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    color: #fff;
    background: rgba(37, 99, 235, 0.88);
    border-radius: 999px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

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

.type-badge,
.rank-badge {
    position: absolute;
    z-index: 3;
    top: 12px;
    right: 12px;
    padding: 6px 10px;
    color: #fff;
    background: #2563eb;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.rank-badge {
    left: 12px;
    right: auto;
    background: linear-gradient(135deg, #f97316, #ef4444);
}

.movie-body {
    padding: 18px;
}

.movie-title {
    margin: 0 0 10px;
    color: #111827;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.35;
}

.movie-card:hover .movie-title {
    color: #2563eb;
}

.movie-line {
    display: -webkit-box;
    min-height: 48px;
    margin: 0 0 14px;
    overflow: hidden;
    color: #64748b;
    font-size: 14px;
    line-height: 1.7;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #64748b;
    font-size: 13px;
}

.movie-meta span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.horizontal-scroll {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 320px;
    gap: 22px;
    overflow-x: auto;
    padding: 4px 2px 18px;
    scrollbar-width: thin;
}

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

.category-card {
    min-height: 170px;
    padding: 24px;
    color: #fff;
    background: linear-gradient(135deg, #1e3a8a, #0f766e);
    border-radius: 22px;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.16);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.category-card:nth-child(3n + 2) {
    background: linear-gradient(135deg, #7c3aed, #2563eb);
}

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

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 45px rgba(15, 23, 42, 0.22);
}

.category-card h3 {
    margin: 0 0 12px;
    font-size: 22px;
}

.category-card p {
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.65;
}

.page-hero {
    color: #fff;
    background: linear-gradient(135deg, #0f172a, #1e3a8a 54%, #164e63);
    padding: 72px 0 74px;
}

.page-hero h1 {
    max-width: 880px;
    margin: 16px 0 14px;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 800px;
    margin: 0;
    color: #d1d5db;
    font-size: 18px;
    line-height: 1.8;
}

.filter-bar,
.search-box {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0 0 28px;
    padding: 18px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.filter-input {
    background: #f1f5f9;
    color: #111827;
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.24);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: #bfdbfe;
    font-size: 14px;
}

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

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

.player-card,
.detail-card,
.text-card {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.1);
    overflow: hidden;
}

.player-shell {
    position: relative;
    background: #020617;
}

.player-shell video {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #020617;
}

.play-layer {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(2, 6, 23, 0.18), rgba(2, 6, 23, 0.66));
    cursor: pointer;
}

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

.big-play {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 86px;
    height: 86px;
    border: 0;
    color: #fff;
    background: #2563eb;
    border-radius: 999px;
    box-shadow: 0 22px 42px rgba(37, 99, 235, 0.45);
    cursor: pointer;
}

.player-info {
    padding: 22px;
}

.player-info h2,
.text-card h2,
.detail-card h2 {
    margin: 0 0 12px;
    color: #0f172a;
    font-size: 24px;
}

.player-info p,
.text-card p,
.detail-card p {
    margin: 0;
    color: #475569;
    line-height: 1.85;
}

.detail-card {
    padding: 22px;
}

.detail-poster {
    overflow: hidden;
    border-radius: 18px;
    background: #e5e7eb;
    aspect-ratio: 16 / 11;
    margin-bottom: 18px;
}

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

.info-list {
    display: grid;
    gap: 10px;
    margin: 16px 0;
    color: #475569;
    font-size: 14px;
}

.info-list strong {
    color: #111827;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.tag-list .tag-pill {
    color: #1d4ed8;
    background: #dbeafe;
    box-shadow: none;
}

.text-stack {
    display: grid;
    gap: 22px;
    margin-top: 28px;
}

.text-card {
    padding: 26px;
}

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

.search-box {
    max-width: 760px;
    margin-top: 28px;
}

.search-box input {
    background: #fff;
    color: #111827;
    box-shadow: inset 0 0 0 1px #cbd5e1;
}

.empty-state {
    padding: 34px;
    color: #64748b;
    text-align: center;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.site-footer {
    color: #cbd5e1;
    background: linear-gradient(180deg, #0f172a, #020617);
    padding: 54px 0 28px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 30px;
}

.footer-title {
    margin: 0 0 14px;
    color: #fff;
    font-size: 18px;
    font-weight: 800;
}

.footer-text,
.footer-list a,
.footer-bottom {
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.75;
}

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

.footer-list a:hover {
    color: #60a5fa;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 34px;
    padding-top: 24px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

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

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

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

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

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

    .mobile-menu-button {
        display: inline-flex;
    }

    .hero {
        height: 680px;
    }

    .hero-content {
        padding-top: 0;
    }

    .hero-description {
        font-size: 17px;
    }

    .section {
        padding: 52px 0;
    }

    .section-head,
    .filter-bar,
    .footer-bottom {
        align-items: stretch;
        flex-direction: column;
    }

    .movie-grid,
    .movie-grid.three,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

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

    .horizontal-scroll {
        grid-auto-columns: 280px;
    }
}

@media (max-width: 520px) {
    .site-container {
        width: min(100% - 22px, 1180px);
    }

    .logo {
        font-size: 20px;
    }

    .hero {
        height: 720px;
    }

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

    .movie-grid,
    .movie-grid.three,
    .related-grid,
    .category-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .movie-cover {
        aspect-ratio: 16 / 9;
    }
}
