:root {
    --site-cyan: #06b6d4;
    --site-blue: #2563eb;
    --site-dark: #0f172a;
    --site-muted: #64748b;
    --site-card: #ffffff;
    --site-bg: #f8fafc;
    --site-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--site-bg);
    color: #1f2937;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

img {
    display: block;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    color: #ffffff;
    background: linear-gradient(90deg, #06b6d4 0%, #2563eb 100%);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.25);
}

.site-nav {
    min-height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.site-brand-icon {
    font-size: 2rem;
    line-height: 1;
    transition: transform 0.25s ease;
}

.site-brand:hover .site-brand-icon {
    transform: scale(1.08) rotate(-4deg);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 1.6rem;
    font-weight: 600;
}

.desktop-nav a,
.nav-dropdown-button {
    color: rgba(255, 255, 255, 0.94);
    transition: color 0.2s ease, background 0.2s ease;
}

.desktop-nav a:hover,
.nav-dropdown-button:hover {
    color: #cffafe;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-dropdown-menu {
    position: absolute;
    left: 0;
    top: calc(100% + 0.7rem);
    width: 13rem;
    padding: 0.45rem;
    color: #1f2937;
    background: #ffffff;
    border-radius: 0.85rem;
    box-shadow: var(--site-shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.35rem);
    transition: all 0.22s ease;
}

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

.nav-dropdown-menu a {
    display: block;
    padding: 0.65rem 0.85rem;
    color: #334155;
    border-radius: 0.65rem;
}

.nav-dropdown-menu a:hover {
    color: #0f172a;
    background: #ecfeff;
}

.nav-search {
    position: relative;
    width: min(18rem, 26vw);
}

.nav-search input,
.page-filter-input,
.hero-search-input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    outline: none;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.nav-search input {
    padding: 0.55rem 1rem;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

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

.nav-search input:focus,
.page-filter-input:focus,
.hero-search-input:focus {
    border-color: #67e8f9;
    box-shadow: 0 0 0 4px rgba(103, 232, 249, 0.2);
}

.search-results {
    position: absolute;
    right: 0;
    top: calc(100% + 0.65rem);
    width: min(26rem, 92vw);
    max-height: 28rem;
    overflow: auto;
    padding: 0.6rem;
    color: #0f172a;
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: var(--site-shadow);
    display: none;
}

.search-results.is-open {
    display: block;
}

.search-result-item {
    display: grid;
    grid-template-columns: 3.5rem 1fr;
    gap: 0.75rem;
    align-items: center;
    padding: 0.55rem;
    border-radius: 0.8rem;
    transition: background 0.2s ease;
}

.search-result-item:hover {
    background: #f1f5f9;
}

.search-result-item img {
    width: 3.5rem;
    height: 4.7rem;
    object-fit: cover;
    border-radius: 0.55rem;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

.mobile-menu-button {
    display: none;
    padding: 0.55rem;
    border-radius: 0.75rem;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

.mobile-panel {
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(29, 78, 216, 0.95);
}

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

.mobile-panel a {
    display: block;
    padding: 0.7rem 0;
    color: #ffffff;
}

.hero-section {
    position: relative;
    min-height: 34rem;
    color: #ffffff;
    overflow: hidden;
    background: linear-gradient(135deg, #22d3ee 0%, #2563eb 52%, #1e40af 100%);
}

.hero-section::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 22%, rgba(255, 255, 255, 0.24), transparent 22rem),
        linear-gradient(90deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.18));
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 2;
    min-height: 34rem;
    display: flex;
    align-items: center;
}

.hero-slide {
    display: none;
    width: 100%;
    grid-template-columns: minmax(0, 1.02fr) minmax(18rem, 0.78fr);
    align-items: center;
    gap: 3rem;
}

.hero-slide.is-active {
    display: grid;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.42rem 0.82rem;
    margin-bottom: 1.2rem;
    color: #cffafe;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    backdrop-filter: blur(10px);
}

.hero-title {
    max-width: 52rem;
    margin: 0 0 1rem;
    font-size: clamp(2.4rem, 5vw, 4.75rem);
    line-height: 1.06;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.hero-desc {
    max-width: 45rem;
    color: #cffafe;
    font-size: 1.1rem;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-top: 1.7rem;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3rem;
    padding: 0.8rem 1.35rem;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.primary-button {
    color: #2563eb;
    background: #ffffff;
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.2);
}

.primary-button:hover,
.secondary-button:hover {
    transform: translateY(-2px);
}

.primary-button:hover {
    background: #ecfeff;
}

.secondary-button {
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.86);
}

.secondary-button:hover {
    background: rgba(255, 255, 255, 0.14);
}

.hero-poster {
    position: relative;
    padding: 0.85rem;
    border-radius: 1.8rem;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.33);
    backdrop-filter: blur(14px);
}

.hero-poster img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    border-radius: 1.3rem;
    background: linear-gradient(135deg, #e0f2fe, #bfdbfe);
}

.hero-poster-caption {
    position: absolute;
    left: 1.4rem;
    right: 1.4rem;
    bottom: 1.4rem;
    padding: 0.9rem;
    border-radius: 1rem;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(12px);
}

.hero-controls {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: 1.5rem;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.hero-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.45);
    transition: width 0.2s ease, background 0.2s ease;
}

.hero-dot.is-active {
    width: 2.2rem;
    background: #ffffff;
}

.hero-search-box {
    position: relative;
    margin-top: 1.5rem;
    max-width: 34rem;
}

.hero-search-input {
    padding: 0.95rem 1.2rem;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.96);
}

.section-block {
    padding: 4rem 0;
}

.section-title {
    margin-bottom: 2.2rem;
    text-align: center;
}

.section-title h2,
.section-title h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    letter-spacing: -0.03em;
}

.title-line {
    width: 5rem;
    height: 0.25rem;
    margin: 1rem auto 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #06b6d4, #2563eb);
}

.section-lead {
    max-width: 48rem;
    margin: 0.85rem auto 0;
    color: var(--site-muted);
    line-height: 1.8;
}

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

.movie-card {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    color: #0f172a;
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
    position: relative;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

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

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

.quality-badge,
.rank-badge {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    z-index: 2;
    padding: 0.25rem 0.5rem;
    color: #ffffff;
    background: linear-gradient(90deg, #f97316, #ef4444);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
}

.movie-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 0.85rem;
}

.movie-card-title {
    margin: 0 0 0.35rem;
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.35;
}

.movie-card-meta {
    margin-bottom: 0.55rem;
    color: #64748b;
    font-size: 0.78rem;
}

.movie-card-desc {
    color: #475569;
    font-size: 0.82rem;
    line-height: 1.62;
}

.line-clamp-2,
.line-clamp-3 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
}

.line-clamp-2 {
    -webkit-line-clamp: 2;
}

.line-clamp-3 {
    -webkit-line-clamp: 3;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.7rem;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    min-height: 1.55rem;
    padding: 0.22rem 0.55rem;
    color: #0369a1;
    background: #e0f2fe;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}

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

.category-card {
    display: flex;
    min-height: 12rem;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.25rem;
    overflow: hidden;
    color: #ffffff;
    border-radius: 1.25rem;
    background: linear-gradient(135deg, #06b6d4, #2563eb);
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.18);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 24px 45px rgba(37, 99, 235, 0.26);
}

.category-card h3 {
    margin: 0 0 0.7rem;
    font-size: 1.35rem;
    font-weight: 900;
}

.category-card p {
    color: rgba(255, 255, 255, 0.86);
    line-height: 1.75;
}

.page-hero {
    padding: 4.5rem 0;
    color: #ffffff;
    background: linear-gradient(90deg, #06b6d4, #2563eb);
}

.page-filter-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

.page-filter-input {
    padding: 0.85rem 1rem;
    color: #0f172a;
    background: #f8fafc;
    border-color: #e2e8f0;
}

.filter-hint {
    color: #64748b;
    font-size: 0.92rem;
}

.ranking-list {
    display: grid;
    gap: 0.85rem;
}

.ranking-item {
    display: grid;
    grid-template-columns: 4rem 5rem minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 0.85rem;
    color: #0f172a;
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.ranking-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--site-shadow);
}

.ranking-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    color: #ffffff;
    background: linear-gradient(135deg, #f97316, #ef4444);
    border-radius: 999px;
    font-weight: 900;
}

.ranking-cover {
    width: 5rem;
    height: 6.8rem;
    object-fit: cover;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

.detail-wrap {
    padding: 2rem 0 4rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
    margin-bottom: 1.2rem;
    color: #64748b;
    font-size: 0.95rem;
}

.breadcrumb a {
    color: #2563eb;
}

.detail-card {
    overflow: hidden;
    background: #ffffff;
    border-radius: 1.5rem;
    box-shadow: var(--site-shadow);
}

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

.player-stage video {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    color: #ffffff;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.24), rgba(15, 23, 42, 0.78));
    cursor: pointer;
}

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

.play-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 5rem;
    height: 5rem;
    border-radius: 999px;
    color: #2563eb;
    background: #ffffff;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
    font-size: 2rem;
}

.detail-content {
    padding: 2rem;
}

.detail-title {
    margin: 0 0 0.85rem;
    color: #0f172a;
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 900;
    letter-spacing: -0.03em;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1.3rem;
}

.detail-meta span {
    padding: 0.35rem 0.7rem;
    color: #0369a1;
    background: #e0f2fe;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.86rem;
}

.detail-section {
    margin-top: 1.8rem;
}

.detail-section h2 {
    margin: 0 0 0.75rem;
    color: #0f172a;
    font-size: 1.45rem;
    font-weight: 900;
}

.detail-section p {
    color: #475569;
    line-height: 1.9;
}

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

.prev-next {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
}

.prev-next a {
    flex: 1;
    padding: 1rem;
    color: #0f172a;
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.07);
}

.site-footer {
    color: #ffffff;
    background: linear-gradient(180deg, #1f2937, #111827);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 2rem;
}

.footer-grid h3,
.footer-grid h4 {
    margin: 0 0 1rem;
    font-weight: 900;
}

.footer-grid p,
.footer-grid a,
.footer-bottom {
    color: #cbd5e1;
}

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

.footer-links {
    display: grid;
    gap: 0.55rem;
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    text-align: center;
    font-size: 0.92rem;
}

.empty-filter {
    display: none;
    padding: 2rem;
    color: #64748b;
    text-align: center;
    background: #ffffff;
    border-radius: 1rem;
}

.empty-filter.is-open {
    display: block;
}

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

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

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

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

    .hero-slide {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 4rem 0 5rem;
    }

    .hero-poster {
        max-width: 20rem;
    }

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

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

    .ranking-item {
        grid-template-columns: 3rem 4.2rem minmax(0, 1fr);
    }

    .ranking-action {
        display: none;
    }

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

@media (max-width: 620px) {
    .hero-section,
    .hero-inner {
        min-height: auto;
    }

    .hero-title {
        font-size: 2.35rem;
    }

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

    .category-grid {
        grid-template-columns: 1fr;
    }

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

    .detail-content {
        padding: 1.25rem;
    }

    .prev-next {
        flex-direction: column;
    }

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