* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    color: #212529;
    background: #f8f9fa;
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.container {
    width: min(100%, 88rem);
    margin: 0 auto;
    padding: 0 1rem;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid #e9ecef;
    backdrop-filter: blur(16px);
}

.header-inner {
    height: 4rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 1.35rem;
    font-weight: 650;
    color: #212529;
    white-space: nowrap;
}

.logo-mark {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: linear-gradient(135deg, #486581, #243b53);
    box-shadow: 0 10px 24px rgba(36, 59, 83, 0.24);
    font-size: 0.85rem;
}

.desktop-nav {
    display: none;
    align-items: center;
    gap: 1.25rem;
    margin-left: auto;
}

.nav-link {
    color: #495057;
    font-weight: 550;
    padding: 0.55rem 0;
    background: transparent;
    border: 0;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #486581;
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 13rem;
    padding: 0.5rem;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    box-shadow: 0 18px 45px rgba(33, 37, 41, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(0.5rem);
    transition: all 0.2s ease;
}

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

.dropdown-menu a {
    display: block;
    padding: 0.7rem 0.85rem;
    color: #495057;
    border-radius: 0.55rem;
}

.dropdown-menu a:hover {
    background: #f8f9fa;
    color: #486581;
}

.header-search {
    display: none;
    width: 16rem;
}

.header-search input,
.mobile-search input,
.filter-panel input,
.filter-panel select,
.search-panel input {
    width: 100%;
    border: 1px solid #dee2e6;
    border-radius: 0.7rem;
    background: #ffffff;
    color: #212529;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.header-search input {
    padding: 0.55rem 0.85rem;
}

.header-search input:focus,
.mobile-search input:focus,
.filter-panel input:focus,
.filter-panel select:focus,
.search-panel input:focus {
    border-color: #627d98;
    box-shadow: 0 0 0 3px rgba(98, 125, 152, 0.18);
}

.menu-button {
    width: 2.5rem;
    height: 2.5rem;
    margin-left: auto;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    border: 0;
    border-radius: 0.6rem;
    background: transparent;
}

.menu-button span {
    width: 1.25rem;
    height: 2px;
    background: #495057;
    border-radius: 999px;
}

.mobile-panel {
    display: none;
    padding: 0 1rem 1rem;
    border-top: 1px solid #e9ecef;
    background: #ffffff;
}

.mobile-panel.is-open {
    display: block;
    animation: slideDown 0.25s ease;
}

.mobile-search {
    margin: 1rem auto;
    max-width: 88rem;
}

.mobile-search input {
    padding: 0.75rem 0.85rem;
}

.mobile-panel nav {
    max-width: 88rem;
    margin: 0 auto;
    display: grid;
    gap: 0.25rem;
}

.mobile-link,
.mobile-sub-link,
.mobile-section-title {
    display: block;
    padding: 0.65rem 0.85rem;
    border-radius: 0.6rem;
}

.mobile-link:hover,
.mobile-link.is-active,
.mobile-sub-link:hover {
    background: #f1f3f5;
    color: #486581;
}

.mobile-section-title {
    color: #212529;
    font-weight: 650;
}

.hero-slider {
    position: relative;
    height: 72vh;
    min-height: 34rem;
    overflow: hidden;
    background: #212529;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.hero-slide.is-active {
    opacity: 1;
    visibility: visible;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.44;
    transform: scale(1.02);
}

.hero-slide.is-active .hero-image {
    animation: heroZoom 8s linear both;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #212529 0%, rgba(33, 37, 41, 0.66) 45%, rgba(33, 37, 41, 0.2) 100%);
}

.hero-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding-bottom: 5rem;
}

.hero-copy {
    max-width: 52rem;
    color: #ffffff;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1rem;
    color: #fb923c;
    font-weight: 650;
    letter-spacing: 0.02em;
}

.hero-copy h1,
.hero-copy h2 {
    margin: 0 0 1rem;
    font-size: clamp(2.4rem, 6vw, 5.2rem);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.hero-movie-title {
    font-size: clamp(1.55rem, 3vw, 2.5rem) !important;
    letter-spacing: -0.02em !important;
    color: #e9ecef;
}

.hero-copy p {
    margin: 0 0 1.5rem;
    max-width: 44rem;
    color: #e9ecef;
    font-size: clamp(1rem, 1.6vw, 1.3rem);
}

.hero-tags,
.detail-meta,
.caption-meta,
.movie-meta-row,
.tag-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.hero-tags span,
.tag-row span,
.detail-meta span {
    display: inline-flex;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #f1f3f5;
    padding: 0.35rem 0.7rem;
    font-size: 0.86rem;
    backdrop-filter: blur(8px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0.72rem 1.45rem;
    border-radius: 0.72rem;
    border: 0;
    font-weight: 650;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

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

.btn-primary {
    background: #486581;
    color: #ffffff;
    box-shadow: 0 14px 34px rgba(72, 101, 129, 0.28);
}

.btn-primary:hover {
    background: #334e68;
}

.btn-secondary {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 3rem;
    height: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 2rem;
    line-height: 1;
    backdrop-filter: blur(8px);
}

.hero-prev {
    left: 1rem;
}

.hero-next {
    right: 1rem;
}

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

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

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

.section-block {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
}

.white-section {
    background: #ffffff;
}

.soft-section {
    background: linear-gradient(to bottom, #f8f9fa, #ffffff);
}

.dark-section {
    background: #212529;
    color: #ffffff;
}

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

.section-head h2,
.center-title,
.content-card h2,
.watch-block h2,
.ranking-block h2 {
    margin: 0;
    color: #212529;
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.2;
    font-weight: 650;
    letter-spacing: -0.025em;
}

.section-head p {
    margin: 0.35rem 0 0;
    color: #6c757d;
}

.section-head a {
    color: #486581;
    font-weight: 650;
    white-space: nowrap;
}

.light-head h2,
.light-head a,
.dark-section .movie-card-horizontal h3,
.dark-section .movie-card-horizontal p {
    color: #ffffff;
}

.grid {
    display: grid;
    gap: 1.5rem;
}

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

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

.compact-grid {
    gap: 1.15rem;
}

.movie-card {
    overflow: hidden;
    border-radius: 0.75rem;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(33, 37, 41, 0.06);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.movie-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 42px rgba(33, 37, 41, 0.12);
}

.movie-link {
    display: block;
    height: 100%;
}

.movie-thumb {
    position: relative;
    height: 15rem;
    overflow: hidden;
    background: #dee2e6;
}

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

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

.thumb-shade {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.58), transparent);
    transition: opacity 0.25s ease;
}

.movie-card:hover .thumb-shade {
    opacity: 1;
}

.movie-info {
    padding: 1rem;
}

.movie-info h3,
.horizontal-info h3,
.large-caption h3 {
    margin: 0.65rem 0 0.45rem;
    color: #212529;
    font-size: 1.05rem;
    line-height: 1.35;
    font-weight: 650;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
}

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

.movie-info p,
.horizontal-info p,
.large-caption p {
    margin: 0;
    color: #6c757d;
    font-size: 0.92rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-meta-row {
    justify-content: space-between;
    color: #adb5bd;
    font-size: 0.8rem;
}

.category-pill {
    color: #486581;
    background: #f0f4f8;
    padding: 0.25rem 0.5rem;
    border-radius: 0.35rem;
    font-weight: 650;
}

.movie-card-large .movie-link,
.large-thumb {
    height: 100%;
}

.large-thumb {
    min-height: 26rem;
}

.large-thumb .thumb-shade {
    opacity: 1;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.28), transparent);
}

.large-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.4rem;
    color: #ffffff;
}

.large-caption h3 {
    color: #ffffff;
    font-size: 1.5rem;
}

.large-caption p,
.caption-meta {
    color: #e9ecef;
}

.glass-pill {
    display: inline-flex;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 650;
}

.stack-list {
    display: grid;
    gap: 1rem;
}

.movie-card-horizontal .movie-link {
    display: grid;
    grid-template-columns: 8.5rem 1fr;
}

.horizontal-thumb {
    height: 100%;
    min-height: 11rem;
}

.horizontal-info {
    padding: 1rem;
}

.rank-badge {
    position: absolute;
    top: 0.7rem;
    left: 0.7rem;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #fb923c;
    color: #ffffff;
    font-weight: 750;
    box-shadow: 0 8px 20px rgba(251, 146, 60, 0.3);
}

.tag-row {
    margin-top: 0.85rem;
}

.tag-row span {
    color: #495057;
    background: #f1f3f5;
    font-size: 0.78rem;
}

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

.category-tile {
    position: relative;
    min-height: 8rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 0.75rem;
    overflow: hidden;
    color: #ffffff;
    background: linear-gradient(135deg, #486581, #243b53);
    box-shadow: 0 1px 2px rgba(33, 37, 41, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 42px rgba(33, 37, 41, 0.12);
}

.category-tile span {
    font-size: 1.15rem;
    font-weight: 700;
}

.category-tile em {
    color: #e9ecef;
    font-style: normal;
    font-size: 0.9rem;
}

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

.page-hero {
    color: #ffffff;
    background: radial-gradient(circle at top left, rgba(251, 146, 60, 0.25), transparent 32rem), linear-gradient(135deg, #212529, #243b53);
}

.mini-hero {
    padding: 5.5rem 0 4.5rem;
}

.page-hero h1 {
    max-width: 55rem;
    margin: 0 0 1rem;
    font-size: clamp(2rem, 4.6vw, 4rem);
    line-height: 1.12;
    letter-spacing: -0.04em;
}

.page-hero p {
    max-width: 48rem;
    margin: 0;
    color: #e9ecef;
    font-size: 1.1rem;
}

.category-overview-block,
.ranking-block {
    margin-bottom: 4rem;
}

.small-overview-grid .movie-card:nth-child(n+5) {
    display: none;
}

.filter-panel,
.search-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 0.9rem;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(33, 37, 41, 0.04);
}

.filter-panel input,
.filter-panel select,
.search-panel input {
    padding: 0.8rem 0.9rem;
}

.search-panel .btn {
    width: 100%;
}

.search-status {
    margin-bottom: 1rem;
    color: #6c757d;
    font-weight: 650;
}

.detail-top {
    padding: 3.5rem 0;
    color: #ffffff;
    background: linear-gradient(135deg, #212529, #243b53);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

.detail-cover {
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
}

.detail-cover img {
    width: 100%;
    height: min(80vw, 30rem);
    object-fit: cover;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #ced4da;
    font-size: 0.92rem;
}

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

.detail-copy h1 {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 5vw, 4.2rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.detail-line {
    max-width: 48rem;
    margin: 0 0 1.25rem;
    color: #e9ecef;
    font-size: 1.15rem;
}

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

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

.detail-copy .btn {
    margin-top: 1.35rem;
}

.watch-block {
    padding-top: 4rem;
}

.watch-block h2 {
    margin-bottom: 1.2rem;
}

.player-shell {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    background: #000000;
    box-shadow: 0 20px 60px rgba(33, 37, 41, 0.18);
    aspect-ratio: 16 / 9;
}

.player-video {
    width: 100%;
    height: 100%;
    display: block;
    background: #000000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    border: 0;
    color: #ffffff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.18));
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 2;
}

.player-overlay.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.play-icon {
    width: 4rem;
    height: 4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(72, 101, 129, 0.92);
    color: #ffffff;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

.detail-content {
    display: grid;
    gap: 1.25rem;
}

.content-card {
    padding: 1.5rem;
    border-radius: 0.9rem;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(33, 37, 41, 0.05);
}

.content-card p {
    margin: 1rem 0 0;
    color: #495057;
}

.site-footer {
    margin-top: 5rem;
    background: #212529;
    color: #ced4da;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-top: 3.5rem;
    padding-bottom: 3rem;
}

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

.footer-brand p {
    max-width: 34rem;
    color: #adb5bd;
}

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

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.55rem;
}

.site-footer a:hover {
    color: #9fb3c8;
}

.footer-bottom {
    border-top: 1px solid #343a40;
    padding: 1rem;
    text-align: center;
    color: #868e96;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-0.5rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroZoom {
    from {
        transform: scale(1.02);
    }
    to {
        transform: scale(1.08);
    }
}

@media (min-width: 640px) {
    .movie-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .filter-panel,
    .search-panel {
        grid-template-columns: 1fr auto;
        align-items: center;
    }

    .search-panel .btn {
        width: auto;
    }
}

@media (min-width: 768px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

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

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

    .detail-grid {
        grid-template-columns: minmax(16rem, 25rem) 1fr;
    }

    .detail-cover img {
        height: 34rem;
    }

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

@media (min-width: 1024px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .desktop-nav,
    .header-search {
        display: flex;
    }

    .menu-button {
        display: none;
    }

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

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

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

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

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

@media (max-width: 767px) {
    .hero-slider {
        min-height: 38rem;
    }

    .hero-content {
        padding-bottom: 4.5rem;
    }

    .hero-arrow {
        display: none;
    }

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

    .movie-card-horizontal .movie-link {
        grid-template-columns: 7.2rem 1fr;
    }

    .horizontal-thumb {
        min-height: 10rem;
    }
}
