:root {
    --site-max: 1400px;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(74, 144, 164, 0.24), transparent 32rem),
        radial-gradient(circle at 80% 10%, rgba(212, 165, 116, 0.16), transparent 28rem),
        var(--color-bg-primary);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(10, 25, 41, 0.82);
    backdrop-filter: blur(16px);
}

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

.site-logo {
    display: inline-flex;
    align-items: center;
    color: var(--color-text-primary);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.site-logo::before {
    content: "";
    width: 34px;
    height: 34px;
    margin-right: 10px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--color-secondary), var(--color-accent));
    box-shadow: 0 12px 30px rgba(74, 144, 164, 0.38);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    color: var(--color-text-secondary);
    padding: 10px 16px;
    border-radius: 999px;
    transition: all 0.25s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-text-primary);
    background: rgba(74, 144, 164, 0.18);
}

.menu-toggle {
    width: 42px;
    height: 42px;
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 0 auto;
    background: var(--color-text-primary);
    border-radius: 999px;
}

.home-hero {
    position: relative;
    height: 70vh;
    min-height: 560px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.8s ease, transform 1.2s ease;
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.hero-slide > img,
.detail-hero > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(10, 25, 41, 0.96) 0%, rgba(10, 25, 41, 0.76) 42%, rgba(10, 25, 41, 0.20) 100%),
        linear-gradient(0deg, var(--color-bg-primary) 0%, transparent 36%);
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding-bottom: 88px;
}

.hero-copy {
    max-width: 720px;
    animation: slideUp 0.6s ease both;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--color-secondary);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 26px;
    height: 2px;
    background: var(--color-secondary);
    border-radius: 99px;
}

.hero-copy h1,
.page-hero h1,
.detail-copy h1 {
    margin-bottom: 18px;
    color: var(--color-text-primary);
    font-size: clamp(2.2rem, 6vw, 5rem);
    line-height: 1.05;
    font-weight: 900;
    text-shadow: 0 12px 36px rgba(0, 0, 0, 0.42);
}

.hero-copy p,
.page-hero p,
.detail-copy p {
    max-width: 760px;
    color: var(--color-text-secondary);
    font-size: 18px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
}

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

.primary-btn {
    color: #ffffff;
    background: linear-gradient(135deg, var(--color-accent), var(--color-primary-light));
    box-shadow: 0 16px 32px rgba(74, 144, 164, 0.32);
}

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

.ghost-btn {
    color: var(--color-text-primary);
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.hero-meta,
.detail-meta,
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--color-text-muted);
    font-size: 14px;
}

.hero-meta {
    margin-top: 22px;
    color: var(--color-text-secondary);
}

.hero-meta span,
.detail-meta span,
.card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hero-meta span:not(:last-child)::after,
.detail-meta span:not(:last-child)::after,
.card-meta span:not(:last-child)::after {
    content: "";
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.55;
}

.hero-controls {
    position: absolute;
    right: clamp(20px, 5vw, 72px);
    bottom: 86px;
    display: flex;
    gap: 12px;
    z-index: 5;
}

.hero-controls button,
.hero-dot {
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(10, 25, 41, 0.5);
    color: var(--color-text-primary);
    backdrop-filter: blur(8px);
}

.hero-controls button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
}

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

.hero-dot {
    width: 36px;
    height: 5px;
    border-radius: 999px;
    padding: 0;
    opacity: 0.55;
}

.hero-dot.active {
    width: 54px;
    background: var(--color-secondary);
    opacity: 1;
}

.search-band,
.filter-section {
    padding: 28px 0;
    background: rgba(19, 47, 76, 0.72);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.search-panel,
.filter-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.search-panel h2 {
    font-size: 26px;
    margin-bottom: 6px;
}

.search-panel p {
    color: var(--color-text-secondary);
}

.search-input {
    width: min(520px, 100%);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 8px 8px 18px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 18px;
    background: rgba(10, 25, 41, 0.74);
}

.search-input.wide {
    width: 100%;
}

.search-input span {
    color: var(--color-secondary);
    font-weight: 800;
    white-space: nowrap;
}

.search-input input {
    width: 100%;
    min-height: 42px;
    color: var(--color-text-primary);
    outline: none;
    background: transparent;
}

.content-section {
    padding: 72px 0;
}

.alt-section {
    background: rgba(19, 47, 76, 0.42);
}

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

.section-heading h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 900;
}

.section-heading h2 span {
    color: var(--color-secondary);
}

.section-heading p {
    margin-top: 8px;
    color: var(--color-text-secondary);
}

.section-more {
    color: var(--color-accent-light);
    font-weight: 800;
    white-space: nowrap;
}

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 22px;
    background: rgba(19, 47, 76, 0.76);
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-8px);
    border-color: rgba(109, 179, 199, 0.55);
    box-shadow: var(--shadow-xl);
}

.card-link,
.movie-card > a {
    display: block;
    height: 100%;
    color: inherit;
}

.poster-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-bg-secondary), var(--color-bg-tertiary));
}

.poster-wrap img,
.rank-item img,
.category-thumbs img,
.detail-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

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

.poster-badge {
    position: absolute;
    right: 10px;
    top: 10px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(10, 25, 41, 0.68);
    backdrop-filter: blur(8px);
}

.card-content {
    padding: 16px;
}

.card-content h3,
.rank-item h3 {
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 800;
    color: var(--color-text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-content p,
.rank-item p {
    min-height: 46px;
    color: var(--color-text-secondary);
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.tag-row span {
    color: var(--color-text-secondary);
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
}

.tag-row.large span {
    font-size: 13px;
    padding: 6px 11px;
}

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

.ranking-list.full {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.rank-item > a {
    display: grid;
    grid-template-columns: 54px 92px 1fr;
    align-items: center;
    gap: 18px;
    padding: 14px;
}

.rank-number {
    color: var(--color-secondary);
    font-size: 28px;
    font-weight: 900;
    text-align: center;
}

.rank-item img {
    width: 92px;
    height: 122px;
    border-radius: 14px;
}

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

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

.category-card {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    background: rgba(19, 47, 76, 0.74);
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.category-card:hover {
    transform: translateY(-6px);
    border-color: rgba(212, 165, 116, 0.48);
}

.category-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    height: 150px;
    overflow: hidden;
}

.category-body {
    padding: 20px;
}

.category-body h2 {
    margin-bottom: 10px;
    font-size: 22px;
    font-weight: 900;
}

.category-body p {
    min-height: 74px;
    color: var(--color-text-secondary);
    font-size: 14px;
}

.category-body span {
    display: inline-flex;
    margin-top: 14px;
    color: var(--color-secondary-light);
    font-weight: 800;
}

.page-main {
    min-height: 70vh;
}

.page-hero {
    position: relative;
    padding: 110px 0 70px;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(26, 77, 109, 0.9), rgba(10, 25, 41, 0.92)),
        radial-gradient(circle at 70% 20%, rgba(212, 165, 116, 0.18), transparent 32rem);
}

.small-hero h1 {
    max-width: 900px;
    font-size: clamp(2.1rem, 4vw, 4rem);
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.quick-links a {
    padding: 9px 14px;
    border-radius: 999px;
    color: var(--color-text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.sticky-filter {
    position: sticky;
    top: 72px;
    z-index: 10;
}

.detail-hero {
    position: relative;
    min-height: 640px;
    overflow: hidden;
}

.detail-hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(10, 25, 41, 0.98), rgba(10, 25, 41, 0.76), rgba(10, 25, 41, 0.42)),
        linear-gradient(0deg, var(--color-bg-primary), transparent 45%);
    backdrop-filter: blur(2px);
}

.detail-hero-content {
    position: relative;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    align-items: end;
    gap: 42px;
    min-height: 640px;
    padding-top: 120px;
    padding-bottom: 70px;
}

.detail-poster {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: var(--shadow-xl);
    background: var(--color-bg-secondary);
}

.detail-copy h1 {
    font-size: clamp(2.4rem, 5vw, 5rem);
}

.detail-meta {
    margin-bottom: 18px;
    color: var(--color-text-secondary);
}

.player-section {
    padding: 72px 0 36px;
}

.player-section h2 {
    margin-bottom: 22px;
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 900;
}

.video-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #000;
    box-shadow: var(--shadow-xl);
}

.movie-video {
    width: 100%;
    height: 100%;
    background: #000;
}

.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(10, 25, 41, 0.20), rgba(10, 25, 41, 0.66));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.play-overlay span {
    width: 92px;
    height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 6px;
    border-radius: 50%;
    color: #ffffff;
    font-size: 34px;
    background: linear-gradient(135deg, var(--color-accent), var(--color-secondary));
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
}

.video-shell.playing .play-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.prose-card {
    padding: 28px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    background: rgba(19, 47, 76, 0.72);
}

.prose-card h2 {
    margin-bottom: 14px;
    font-size: 24px;
    font-weight: 900;
}

.prose-card p {
    color: var(--color-text-secondary);
    line-height: 1.9;
    white-space: pre-line;
}

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

.movie-card.compact .card-content p {
    min-height: auto;
}

.site-footer {
    padding: 52px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(10, 25, 41, 0.88);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 32px;
    align-items: center;
}

.footer-logo {
    margin-bottom: 14px;
}

.site-footer p {
    max-width: 640px;
    color: var(--color-text-secondary);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
}

.footer-links a {
    color: var(--color-text-secondary);
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
}

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

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

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

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

    .site-nav {
        position: absolute;
        top: 72px;
        left: 16px;
        right: 16px;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 14px;
        border: 1px solid rgba(255, 255, 255, 0.10);
        border-radius: 20px;
        background: rgba(10, 25, 41, 0.96);
        box-shadow: var(--shadow-xl);
    }

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

    .home-hero {
        min-height: 620px;
    }

    .hero-content {
        padding-bottom: 105px;
    }

    .hero-controls {
        left: 24px;
        right: auto;
        bottom: 38px;
    }

    .hero-dots {
        left: auto;
        right: 24px;
        transform: none;
    }

    .search-panel,
    .filter-panel,
    .section-heading,
    .footer-grid {
        flex-direction: column;
        align-items: stretch;
    }

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

    .detail-hero-content,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        width: min(280px, 72vw);
    }

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

@media (max-width: 620px) {
    .nav-wrap {
        min-height: 64px;
    }

    .site-logo {
        font-size: 20px;
    }

    .site-nav {
        top: 64px;
    }

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

    .hero-copy p,
    .page-hero p,
    .detail-copy p {
        font-size: 16px;
    }

    .hero-actions {
        align-items: stretch;
    }

    .primary-btn,
    .ghost-btn {
        width: 100%;
    }

    .content-section {
        padding: 48px 0;
    }

    .movie-grid,
    .category-grid,
    .category-grid.large,
    .ranking-list,
    .related-grid {
        grid-template-columns: 1fr;
    }

    .rank-item > a {
        grid-template-columns: 42px 78px 1fr;
        gap: 12px;
    }

    .rank-item img {
        width: 78px;
        height: 104px;
    }

    .category-thumbs {
        height: 120px;
    }

    .page-hero {
        padding: 86px 0 52px;
    }

    .detail-hero,
    .detail-hero-content {
        min-height: 560px;
    }

    .detail-hero-content {
        padding-top: 92px;
        padding-bottom: 46px;
    }

    .player-section {
        padding-top: 48px;
    }

    .video-shell {
        border-radius: 18px;
    }

    .play-overlay span {
        width: 72px;
        height: 72px;
        font-size: 28px;
    }
}
