* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #0d0f12;
    color: #e9ecef;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(circle at top left, rgba(230, 57, 70, 0.12), transparent 30rem),
        radial-gradient(circle at 80% 10%, rgba(255, 77, 77, 0.08), transparent 28rem),
        #0d0f12;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.container-custom {
    width: min(1280px, calc(100% - 2rem));
    margin-inline: auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(13, 15, 18, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #212529;
}

.nav-inner {
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
    color: #ffffff;
}

.brand-mark {
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    border-radius: 0.65rem;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, #e63946, #8f111a);
    box-shadow: 0 0 10px rgba(255, 77, 77, 0.25);
}

.brand-text {
    font-size: 1.25rem;
    transition: color 0.3s ease;
}

.brand:hover .brand-text {
    color: #ff4d4d;
}

.desktop-nav {
    display: flex;
    gap: 0.25rem;
}

.nav-link,
.mobile-nav-link {
    color: #adb5bd;
    padding: 0.62rem 0.95rem;
    border-radius: 0.65rem;
    transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link.is-active,
.mobile-nav-link:hover,
.mobile-nav-link.is-active {
    color: #ffffff;
    background: #e63946;
    box-shadow: 0 0 10px rgba(255, 77, 77, 0.2);
}

.mobile-menu-button {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 0.65rem;
    background: #1a1d23;
    color: #ffffff;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.25rem;
}

.mobile-menu-button span {
    width: 1.1rem;
    height: 2px;
    background: #ffffff;
    border-radius: 999px;
}

.mobile-nav {
    display: none;
    border-top: 1px solid #212529;
}

.mobile-nav.is-open {
    display: block;
    animation: fadeIn 0.35s ease;
}

.mobile-nav-panel {
    padding-block: 0.8rem;
    display: grid;
    gap: 0.4rem;
}

.hero-slider {
    position: relative;
    height: 70vh;
    min-height: 520px;
    overflow: hidden;
    background: #050607;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, #0d0f12 0%, rgba(13, 15, 18, 0.78) 34%, rgba(13, 15, 18, 0.1) 100%),
        linear-gradient(to right, rgba(5, 6, 7, 0.85), rgba(5, 6, 7, 0.1));
}

.hero-content {
    position: absolute;
    left: 50%;
    bottom: 8%;
    transform: translateX(-50%);
    max-width: 1280px;
    animation: slideUp 0.6s ease;
}

.hero-content h1 {
    margin: 1rem 0;
    max-width: 820px;
    color: #ffffff;
    font-size: clamp(2.5rem, 6vw, 5.5rem);
    line-height: 1;
    font-weight: 900;
    text-shadow: 0 0 30px rgba(0, 0, 0, 0.7);
}

.hero-content p {
    max-width: 760px;
    margin: 0 0 1.6rem;
    color: #dee2e6;
    font-size: clamp(1rem, 2vw, 1.35rem);
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
}

.btn-primary,
.btn-secondary,
.quick-search button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0.65rem;
    padding: 0.78rem 1.45rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-primary,
.quick-search button {
    color: #ffffff;
    background: #e63946;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.24);
}

.btn-primary:hover,
.quick-search button:hover {
    transform: translateY(-2px) scale(1.02);
    background: #c1121f;
    box-shadow: 0 0 20px rgba(255, 77, 77, 0.3);
}

.btn-secondary {
    color: #ffffff;
    background: rgba(0, 0, 0, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(6px);
}

.btn-secondary:hover {
    background: #1a1d23;
    color: #ff4d4d;
}

.hero-control {
    position: absolute;
    top: 50%;
    width: 3rem;
    height: 3rem;
    transform: translateY(-50%);
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(4px);
    font-size: 2.2rem;
    line-height: 1;
    transition: all 0.3s ease;
}

.hero-control:hover {
    background: rgba(0, 0, 0, 0.72);
    box-shadow: 0 0 18px rgba(255, 77, 77, 0.24);
}

.hero-prev {
    left: 1rem;
}

.hero-next {
    right: 1rem;
}

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

.hero-dot {
    width: 0.55rem;
    height: 0.55rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    transition: all 0.3s ease;
}

.hero-dot.is-active {
    width: 2rem;
    background: #e63946;
}

.home-search-band {
    border-bottom: 1px solid #1a1d23;
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.1), rgba(26, 29, 35, 0.35));
}

.search-band-inner {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 560px);
    align-items: center;
    gap: 2rem;
    padding-block: 2rem;
}

.search-band-inner h2 {
    margin: 0.35rem 0 0;
    color: #ffffff;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
}

.quick-search,
.filter-controls {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.7rem;
}

.quick-search input,
.filter-controls input,
.filter-controls select {
    width: 100%;
    border: 1px solid #212529;
    border-radius: 0.65rem;
    color: #ffffff;
    background: #1a1d23;
    outline: none;
    padding: 0.78rem 0.9rem;
    transition: all 0.3s ease;
}

.quick-search input:focus,
.filter-controls input:focus,
.filter-controls select:focus {
    border-color: rgba(230, 57, 70, 0.65);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.18);
}

.page-stack {
    padding-block: 4rem;
    display: grid;
    gap: 4rem;
}

.content-section {
    display: grid;
    gap: 1.5rem;
}

.section-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
}

.kicker {
    display: inline-flex;
    color: #ff4d4d;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 800;
}

.section-header h2,
.filter-panel h2,
.detail-text h2 {
    margin: 0.35rem 0 0;
    color: #ffffff;
    font-size: clamp(1.55rem, 3vw, 2.25rem);
    line-height: 1.15;
}

.section-header p,
.filter-panel p {
    margin: 0.55rem 0 0;
    color: #6c757d;
    max-width: 680px;
}

.section-link {
    color: #adb5bd;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.section-link:hover {
    color: #ff4d4d;
}

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

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

.card {
    overflow: hidden;
    border-radius: 0.75rem;
    background: #1a1d23;
    box-shadow: 0 20px 25px -12px rgba(0, 0, 0, 0.35);
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-0.25rem);
    box-shadow: 0 0 20px rgba(255, 77, 77, 0.24);
    outline: 2px solid rgba(230, 57, 70, 0.25);
}

.movie-card {
    min-width: 0;
}

.poster-box {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #050607;
}

.movie-card:not(.movie-card-horizontal) .poster-box {
    aspect-ratio: 16 / 11;
}

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

.movie-card:hover .poster-box img {
    transform: scale(1.1);
}

.poster-box::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent 60%);
}

.duration-chip,
.rank-badge,
.play-float {
    position: absolute;
    z-index: 2;
}

.duration-chip {
    left: 0.65rem;
    bottom: 0.65rem;
    color: #ffffff;
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.55);
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
}

.rank-badge {
    top: 0.65rem;
    left: 0.65rem;
    width: 2.2rem;
    height: 2.2rem;
    display: grid;
    place-items: center;
    border-radius: 0.5rem;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, #e63946, #8f111a);
    box-shadow: 0 0 15px rgba(255, 77, 77, 0.28);
}

.play-float {
    left: 50%;
    top: 50%;
    width: 3rem;
    height: 3rem;
    display: grid;
    place-items: center;
    transform: translate(-50%, -50%) scale(0.9);
    border-radius: 999px;
    color: #ffffff;
    background: #e63946;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 77, 77, 0.35);
}

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

.movie-card-content {
    padding: 1rem;
    display: grid;
    gap: 0.65rem;
}

.card-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.category-chip,
.rating-chip,
.meta-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 0.35rem;
    font-size: 0.8rem;
    line-height: 1;
    white-space: nowrap;
}

.category-chip {
    color: #ff4d4d;
    background: rgba(230, 57, 70, 0.18);
    padding: 0.42rem 0.55rem;
}

.rating-chip {
    color: #f2c94c;
}

.movie-card h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.08rem;
    line-height: 1.35;
}

.movie-card h3 a {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.3s ease;
}

.movie-card:hover h3 a {
    color: #ff4d4d;
}

.movie-card p {
    margin: 0;
    color: #6c757d;
    font-size: 0.92rem;
    line-height: 1.65;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.movie-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #495057;
    font-size: 0.88rem;
}

.horizontal-list {
    display: grid;
    gap: 1.1rem;
}

.movie-card-horizontal {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
}

.movie-card-horizontal .poster-box {
    min-height: 100%;
}

.page-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #1a1d23;
    background:
        linear-gradient(135deg, rgba(230, 57, 70, 0.14), rgba(13, 15, 18, 0.2)),
        #111419;
}

.page-hero-small {
    padding-block: 4rem;
}

.page-hero h1 {
    margin: 0.75rem 0;
    color: #ffffff;
    font-size: clamp(2.1rem, 5vw, 4rem);
    line-height: 1.05;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: #adb5bd;
    line-height: 1.8;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 1.5rem;
    color: #6c757d;
    font-size: 0.92rem;
}

.breadcrumbs a:hover {
    color: #ff4d4d;
}

.filter-panel {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 620px);
    gap: 1.25rem;
    align-items: end;
    padding: 1.25rem;
    border: 1px solid #212529;
    border-radius: 0.85rem;
    background: rgba(26, 29, 35, 0.8);
}

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

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

.category-tile {
    display: grid;
    gap: 1rem;
    min-height: 230px;
    padding: 1.35rem;
    border: 1px solid #212529;
    border-radius: 0.9rem;
    background:
        linear-gradient(135deg, rgba(230, 57, 70, 0.12), transparent),
        #1a1d23;
}

.category-tile h2 {
    margin: 0;
    color: #ffffff;
    font-size: 1.55rem;
}

.category-tile p {
    margin: 0;
    color: #adb5bd;
    line-height: 1.7;
}

.category-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: auto;
}

.category-preview span {
    color: #adb5bd;
    background: #111419;
    border-radius: 999px;
    padding: 0.32rem 0.6rem;
    font-size: 0.82rem;
}

.detail-hero {
    padding-block: 3rem;
    background:
        linear-gradient(135deg, rgba(230, 57, 70, 0.12), rgba(13, 15, 18, 0.15)),
        #111419;
    border-bottom: 1px solid #1a1d23;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(220px, 340px) 1fr;
    gap: 2rem;
    align-items: center;
}

.detail-poster {
    aspect-ratio: 3 / 4;
}

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

.detail-info h1 {
    margin: 1rem 0;
    color: #ffffff;
    font-size: clamp(2.2rem, 6vw, 5rem);
    line-height: 1.02;
}

.detail-one-line {
    max-width: 820px;
    margin: 0 0 1.35rem;
    color: #dee2e6;
    font-size: 1.12rem;
    line-height: 1.8;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    color: #adb5bd;
    margin-bottom: 1rem;
}

.detail-meta span {
    padding: 0.42rem 0.68rem;
    border-radius: 0.45rem;
    background: #1a1d23;
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1.4rem;
}

.meta-badge {
    color: #adb5bd;
    background: #111419;
    padding: 0.42rem 0.62rem;
}

.detail-stack {
    padding-top: 3rem;
}

.player-section {
    scroll-margin-top: 5rem;
}

.player-frame {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    background: #000000;
    aspect-ratio: 16 / 9;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45);
}

.video-element {
    width: 100%;
    height: 100%;
    background: #000000;
}

.player-cover {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
    border: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.player-cover-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to top, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.15)),
        rgba(0, 0, 0, 0.25);
}

.player-play-icon {
    position: relative;
    z-index: 1;
    width: 5rem;
    height: 5rem;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
    background: #e63946;
    font-size: 2rem;
    box-shadow: 0 0 28px rgba(255, 77, 77, 0.45);
    transition: all 0.3s ease;
}

.player-cover:hover .player-play-icon {
    transform: scale(1.08);
    background: #c1121f;
}

.player-frame.is-playing .player-cover {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.detail-text {
    padding: 1.5rem;
}

.detail-text p {
    color: #adb5bd;
    line-height: 1.9;
    margin: 0.8rem 0 0;
}

.site-footer {
    margin-top: 2rem;
    border-top: 1px solid #1a1d23;
    background: #050607;
}

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

.site-footer p {
    max-width: 520px;
    color: #6c757d;
    line-height: 1.8;
}

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

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

.footer-links a {
    color: #6c757d;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    padding-block: 1.3rem;
    border-top: 1px solid #1a1d23;
    color: #495057;
    text-align: center;
    font-size: 0.9rem;
}

[data-movie-card].is-hidden {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

    .filter-panel,
    .search-band-inner {
        grid-template-columns: 1fr;
    }
}

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

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

    .hero-slider {
        height: 78vh;
        min-height: 560px;
    }

    .hero-content {
        bottom: 12%;
    }

    .hero-control {
        display: none;
    }

    .hero-dots {
        bottom: 1.2rem;
    }

    .quick-search,
    .filter-controls {
        grid-template-columns: 1fr;
    }

    .section-header {
        align-items: start;
        flex-direction: column;
    }

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

    .movie-card-horizontal,
    .detail-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .detail-poster {
        max-width: 320px;
    }

    .page-stack {
        gap: 3rem;
        padding-block: 3rem;
    }
}
