:root {
    --site-bg: #f8fafc;
    --surface: #ffffff;
    --surface-soft: #ecfeff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --brand: #0d9488;
    --brand-dark: #0f766e;
    --brand-bright: #06b6d4;
    --warm: #f97316;
    --shadow-soft: 0 20px 45px rgba(15, 23, 42, 0.10);
    --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.08);
}

body {
    background:
        radial-gradient(circle at top left, rgba(13, 148, 136, 0.12), transparent 34rem),
        radial-gradient(circle at top right, rgba(8, 145, 178, 0.10), transparent 30rem),
        var(--site-bg);
    color: var(--ink);
}

img {
    display: block;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
    backdrop-filter: blur(18px);
}

.nav-wrap {
    min-height: 4.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--ink);
    white-space: nowrap;
}

.logo-mark {
    width: 2.35rem;
    height: 2.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.85rem;
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-bright));
    box-shadow: 0 10px 25px rgba(13, 148, 136, 0.25);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 700;
    color: #334155;
}

.site-nav > a {
    padding: 0.65rem 0.85rem;
    border-radius: 999px;
    transition: all 0.2s ease;
}

.site-nav > a:hover,
.site-nav > a.active {
    color: var(--brand-dark);
    background: rgba(13, 148, 136, 0.10);
}

.nav-category-strip {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding-left: 0.75rem;
    border-left: 1px solid var(--line);
}

.nav-category-strip a {
    padding: 0.45rem 0.6rem;
    border-radius: 999px;
    font-size: 0.9rem;
    color: var(--muted);
}

.nav-category-strip a:hover {
    color: var(--brand-dark);
    background: rgba(13, 148, 136, 0.08);
}

.nav-toggle {
    display: none;
    padding: 0.6rem 0.85rem;
    border-radius: 0.8rem;
    color: #ffffff;
    background: var(--brand);
    font-weight: 800;
}

.hero-slider {
    position: relative;
    min-height: 72vh;
    overflow: hidden;
    background: #0f172a;
}

.hero-track {
    position: relative;
    min-height: 72vh;
}

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

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

.hero-slide img {
    width: 100%;
    height: 72vh;
    object-fit: cover;
    filter: saturate(1.08) contrast(1.04);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(15, 23, 42, 0.94), rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.20)),
        linear-gradient(0deg, rgba(15, 23, 42, 0.82), transparent 45%);
}

.hero-content {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
}

.hero-kicker,
.section-kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 0.75rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    color: var(--brand-dark);
    background: rgba(204, 251, 241, 0.94);
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.hero-content h1 {
    max-width: 52rem;
    margin: 0 0 1rem;
    font-size: clamp(2.8rem, 7vw, 6.4rem);
    line-height: 0.95;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.hero-content p {
    max-width: 45rem;
    margin: 0 0 1.5rem;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.1rem;
    line-height: 1.9;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-bottom: 1.35rem;
}

.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.9rem;
    padding: 0.75rem 1.2rem;
    border-radius: 999px;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand), var(--brand-bright));
    box-shadow: 0 14px 30px rgba(13, 148, 136, 0.30);
}

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

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

.hero-tags,
.detail-tags,
.tag-row,
.detail-meta,
.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hero-tags span,
.detail-tags span,
.tag-badge,
.detail-meta span,
.movie-meta-line span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.3rem 0.6rem;
    font-size: 0.82rem;
    font-weight: 700;
}

.hero-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 1.5rem;
    display: flex;
    gap: 0.5rem;
    transform: translateX(-50%);
}

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

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

.search-panel-wrap,
.content-section,
.split-section,
.player-section,
.detail-content {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.search-panel,
.content-section,
.ranking-preview,
.latest-panel,
.detail-content article {
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-card);
}

.search-panel {
    display: grid;
    grid-template-columns: 1fr minmax(18rem, 30rem);
    align-items: center;
    gap: 2rem;
    padding: 1.5rem;
}

.search-panel h2,
.inner-hero h1,
.detail-info h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.6rem);
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.search-panel p,
.inner-hero p,
.category-overview-card p,
.category-card p,
.detail-info p,
.detail-content p {
    color: var(--muted);
    line-height: 1.85;
}

.search-box {
    display: grid;
    gap: 0.5rem;
    color: #334155;
    font-weight: 800;
}

.search-box input {
    width: 100%;
    min-height: 3.15rem;
    border: 1px solid var(--line);
    border-radius: 1rem;
    padding: 0 1rem;
    background: #ffffff;
    outline: none;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus {
    border-color: rgba(13, 148, 136, 0.65);
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12);
}

.page-search {
    max-width: 34rem;
    margin-top: 1.5rem;
}

.content-section {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.section-heading h2 {
    margin-bottom: 0;
}

.section-heading a {
    color: var(--brand-dark);
    font-weight: 900;
}

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

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

.movie-card {
    height: 100%;
    border: 1px solid rgba(226, 232, 240, 0.72);
}

.movie-card-link {
    display: flex;
    height: 100%;
    flex-direction: column;
}

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

.poster-wrap img,
.detail-poster img,
.category-card img,
.category-overview-card img,
.rank-row img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.poster-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 46%, rgba(15, 23, 42, 0.82));
}

.type-badge,
.year-badge {
    position: absolute;
    z-index: 2;
    top: 0.75rem;
    border-radius: 999px;
    padding: 0.3rem 0.6rem;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 900;
    backdrop-filter: blur(10px);
}

.type-badge {
    left: 0.75rem;
    background: rgba(13, 148, 136, 0.84);
}

.year-badge {
    right: 0.75rem;
    background: rgba(15, 23, 42, 0.58);
}

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

.movie-card-body h3 {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 900;
    color: var(--ink);
}

.movie-card-body p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.65;
}

.movie-meta-line span {
    color: #475569;
    background: #f1f5f9;
}

.tag-row {
    margin-top: auto;
}

.tag-badge {
    color: var(--brand-dark);
    background: rgba(13, 148, 136, 0.10);
}

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

.category-card,
.category-overview-card a {
    position: relative;
    display: flex;
    min-height: 13rem;
    overflow: hidden;
    border-radius: 1.25rem;
    background: #0f172a;
    box-shadow: var(--shadow-card);
}

.category-card img,
.category-overview-card img {
    position: absolute;
    inset: 0;
    opacity: 0.46;
    transition: transform 0.35s ease;
}

.category-card:hover img,
.category-overview-card:hover img {
    transform: scale(1.06);
}

.category-card span,
.category-card p,
.category-overview-card div {
    position: relative;
    z-index: 2;
}

.category-card {
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.25rem;
    color: #ffffff;
}

.category-card:after,
.category-overview-card a:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.16));
}

.category-card span {
    font-size: 1.35rem;
    font-weight: 900;
}

.category-card p {
    margin: 0.45rem 0 0;
    color: rgba(255, 255, 255, 0.82);
}

.category-overview-card a {
    min-height: 16rem;
    align-items: flex-end;
    padding: 1.5rem;
}

.category-overview-card div {
    color: #ffffff;
}

.category-overview-card h2 {
    margin: 0 0 0.45rem;
    font-size: 1.7rem;
    font-weight: 900;
}

.category-overview-card p {
    color: rgba(255, 255, 255, 0.84);
}

.split-section {
    display: grid;
    grid-template-columns: 0.72fr 1.28fr;
    gap: 1.5rem;
}

.compact-list {
    display: grid;
    gap: 0.6rem;
}

.compact-card a {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    background: #f8fafc;
    transition: background 0.2s ease, transform 0.2s ease;
}

.compact-card a:hover {
    background: #ecfeff;
    transform: translateX(4px);
}

.compact-title {
    color: var(--ink);
    font-weight: 900;
}

.compact-meta {
    color: var(--muted);
    font-size: 0.86rem;
}

.inner-hero,
.detail-hero {
    padding: 4.5rem 0;
    background:
        linear-gradient(135deg, rgba(15, 118, 110, 0.92), rgba(8, 145, 178, 0.82)),
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.25), transparent 28rem);
    color: #ffffff;
}

.inner-hero p {
    max-width: 48rem;
    color: rgba(255, 255, 255, 0.86);
}

.inner-hero .search-box span {
    color: #ffffff;
}

.detail-grid {
    display: grid;
    grid-template-columns: minmax(16rem, 24rem) minmax(0, 1fr);
    gap: 2rem;
    align-items: center;
}

.detail-poster {
    overflow: hidden;
    border: 6px solid rgba(255, 255, 255, 0.25);
    border-radius: 1.5rem;
    aspect-ratio: 2 / 3;
    box-shadow: var(--shadow-soft);
    background: #0f172a;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
}

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

.detail-info p {
    max-width: 52rem;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.06rem;
}

.detail-meta {
    margin: 1rem 0;
}

.detail-meta span,
.detail-tags span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

.detail-tags {
    margin-bottom: 1.4rem;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 1.5rem;
    background: #020617;
    box-shadow: var(--shadow-soft);
    aspect-ratio: 16 / 9;
}

.movie-player {
    width: 100%;
    height: 100%;
    background: #020617;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.65));
    cursor: pointer;
}

.play-overlay span {
    width: 5rem;
    height: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding-left: 0.25rem;
    background: linear-gradient(135deg, var(--brand), var(--brand-bright));
    box-shadow: 0 20px 45px rgba(13, 148, 136, 0.35);
    font-size: 2rem;
}

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

.detail-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.detail-content article {
    padding: 1.5rem;
}

.detail-content h2 {
    margin: 0 0 0.8rem;
    font-size: 1.45rem;
    font-weight: 900;
}

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

.rank-list {
    display: grid;
    gap: 0.75rem;
}

.rank-row a {
    display: grid;
    grid-template-columns: 4rem 5rem minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    padding: 0.85rem;
    border: 1px solid var(--line);
    border-radius: 1.1rem;
    background: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-row a:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

.rank-number {
    color: var(--brand-dark);
    font-size: 1.35rem;
    font-weight: 900;
    text-align: center;
}

.rank-row img {
    aspect-ratio: 2 / 3;
    border-radius: 0.8rem;
    background: #0f172a;
}

.rank-body {
    display: grid;
    gap: 0.25rem;
    min-width: 0;
}

.rank-body strong {
    font-size: 1.08rem;
    font-weight: 900;
}

.rank-body em {
    color: var(--muted);
    font-style: normal;
    line-height: 1.55;
}

.rank-body small {
    color: #475569;
    font-weight: 700;
}

.site-footer {
    margin-top: 2rem;
    padding: 3rem 0;
    background: #0f172a;
    color: #cbd5e1;
}

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

.footer-logo {
    color: #ffffff;
    margin-bottom: 1rem;
}

.site-footer p {
    max-width: 34rem;
    color: #94a3b8;
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 1rem;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 900;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.footer-links a {
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.footer-links a:hover {
    background: rgba(13, 148, 136, 0.45);
}

.movie-filter-item.is-hidden {
    display: none;
}

@media (max-width: 1180px) {
    .nav-category-strip {
        display: none;
    }

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

@media (max-width: 900px) {
    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: absolute;
        left: 1rem;
        right: 1rem;
        top: 4.7rem;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        border: 1px solid var(--line);
        border-radius: 1.2rem;
        background: #ffffff;
        box-shadow: var(--shadow-soft);
    }

    .site-nav.is-open {
        display: flex;
    }

    .site-nav > a {
        width: 100%;
    }

    .search-panel,
    .split-section,
    .detail-grid,
    .detail-content,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .hero-slider,
    .hero-track,
    .hero-slide img {
        min-height: 64vh;
        height: 64vh;
    }
}

@media (max-width: 560px) {
    .container-custom {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .site-logo {
        font-size: 1rem;
    }

    .hero-content h1 {
        font-size: 2.7rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .movie-grid,
    .mini-grid,
    .related-grid,
    .category-grid,
    .category-overview-grid {
        grid-template-columns: 1fr;
    }

    .rank-row a {
        grid-template-columns: 3.2rem 4rem minmax(0, 1fr);
        gap: 0.7rem;
    }

    .rank-body em {
        display: none;
    }
}
