:root {
    --cyan: #0891b2;
    --cyan-dark: #0e7490;
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --orange: #f97316;
    --red: #ef4444;
    --teal: #14b8a6;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --soft-shadow: 0 12px 28px rgba(15, 23, 42, 0.09);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--slate-800);
    background: linear-gradient(180deg, var(--slate-50) 0%, var(--white) 42%, var(--slate-50) 100%);
    line-height: 1.6;
}

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

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

button,
input,
select {
    font: inherit;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: linear-gradient(90deg, var(--cyan-dark), var(--blue), var(--blue-dark));
    box-shadow: 0 16px 35px rgba(37, 99, 235, 0.25);
}

.header-inner {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-weight: 800;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.logo-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(12px);
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.86);
    font-weight: 650;
    transition: color 0.22s ease, transform 0.22s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--white);
    transform: translateY(-1px);
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 280px;
}

.header-search input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    padding: 10px 16px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    outline: none;
    transition: background 0.22s ease, box-shadow 0.22s ease;
}

.header-search input::placeholder {
    color: rgba(255, 255, 255, 0.66);
}

.header-search input:focus {
    background: rgba(255, 255, 255, 0.18);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.16);
}

.header-search button,
.primary-button,
.secondary-button,
.ghost-button,
.play-button,
.filter-button {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    font-weight: 750;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.header-search button {
    padding: 10px 16px;
    color: var(--blue-dark);
    background: var(--white);
}

.menu-button {
    display: none;
    border: 0;
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
}

.hero {
    position: relative;
    height: clamp(520px, 72vh, 720px);
    overflow: hidden;
    background: var(--slate-900);
}

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

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

.hero-image {
    position: absolute;
    inset: 0;
}

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

.hero-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.94) 0%, rgba(15, 23, 42, 0.72) 42%, rgba(15, 23, 42, 0.16) 100%), linear-gradient(90deg, rgba(8, 145, 178, 0.48), rgba(37, 99, 235, 0.18));
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding-bottom: clamp(56px, 8vw, 96px);
}

.hero-copy {
    max-width: 760px;
    color: var(--white);
}

.hero-eyebrow {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.hero-eyebrow span,
.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--white);
    background: rgba(8, 145, 178, 0.92);
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(36px, 6vw, 72px);
    line-height: 1.04;
    letter-spacing: -0.04em;
}

.hero p {
    margin: 0;
    max-width: 680px;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(17px, 2.4vw, 22px);
}

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

.primary-button,
.secondary-button,
.ghost-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
}

.primary-button {
    color: var(--white);
    background: var(--cyan);
    box-shadow: 0 12px 30px rgba(8, 145, 178, 0.34);
}

.secondary-button {
    color: var(--white);
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.ghost-button {
    color: var(--cyan-dark);
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

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

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

.hero-dot {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 999px;
    padding: 0;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease;
}

.hero-dot.active {
    width: 34px;
    background: var(--white);
}

.section {
    padding: 56px 0;
}

.section-soft {
    background: linear-gradient(90deg, rgba(20, 184, 166, 0.1), rgba(8, 145, 178, 0.12));
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.section-title-icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    border-radius: 16px;
    background: linear-gradient(135deg, var(--orange), var(--red));
    box-shadow: var(--soft-shadow);
}

.section-title h2,
.page-hero h1,
.detail-title h1,
.filter-panel h2 {
    margin: 0;
    color: var(--slate-800);
    line-height: 1.15;
}

.section-title h2 {
    font-size: clamp(26px, 4vw, 36px);
}

.section-head p,
.page-hero p,
.category-intro p,
.detail-summary p {
    margin: 8px 0 0;
    color: var(--slate-600);
}

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

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

.movie-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.86);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--soft-shadow);
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow);
    border-color: rgba(8, 145, 178, 0.25);
}

.movie-card-list {
    flex-direction: row;
}

.movie-card-featured {
    min-height: 280px;
}

.movie-poster {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, var(--slate-200), var(--slate-100));
}

.movie-card-list .movie-poster {
    width: 180px;
    flex: 0 0 180px;
    aspect-ratio: 3 / 4;
}

.movie-card-featured .movie-poster {
    aspect-ratio: 16 / 9;
}

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

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

.movie-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    color: var(--white);
    font-size: 13px;
    font-weight: 800;
    background: rgba(8, 145, 178, 0.92);
    backdrop-filter: blur(10px);
}

.movie-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 18px;
}

.movie-meta-row,
.movie-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--slate-500);
    font-size: 13px;
}

.movie-meta-row span:first-child {
    color: var(--cyan-dark);
    font-weight: 800;
}

.movie-body h3 {
    margin: 9px 0 9px;
    color: var(--slate-900);
    font-size: 19px;
    line-height: 1.26;
}

.movie-body h3 a:hover {
    color: var(--cyan-dark);
}

.movie-body p {
    flex: 1;
    margin: 0 0 14px;
    color: var(--slate-600);
    font-size: 14px;
}

.movie-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.movie-tags span,
.detail-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    color: var(--cyan-dark);
    background: rgba(8, 145, 178, 0.08);
    font-size: 12px;
    font-weight: 700;
}

.movie-foot strong {
    color: var(--orange);
    font-size: 16px;
}

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

.category-card {
    position: relative;
    min-height: 176px;
    overflow: hidden;
    border-radius: var(--radius);
    padding: 24px;
    color: var(--slate-800);
    background: linear-gradient(135deg, rgba(236, 254, 255, 0.96), rgba(219, 234, 254, 0.96));
    box-shadow: var(--soft-shadow);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.category-card h2,
.category-card h3 {
    margin: 0 0 10px;
    font-size: 22px;
}

.category-card p {
    margin: 0 0 18px;
    color: var(--slate-600);
    font-size: 14px;
}

.category-card span {
    color: var(--cyan-dark);
    font-weight: 800;
}

.list-stack {
    display: grid;
    gap: 18px;
}

.page-hero {
    padding: 54px 0;
    color: var(--white);
    background: linear-gradient(90deg, var(--cyan-dark), var(--blue), var(--blue-dark));
}

.page-hero h1,
.page-hero p {
    color: var(--white);
}

.page-hero p {
    max-width: 760px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
}

.page-layout {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    padding: 42px 0 70px;
}

.filter-panel {
    position: sticky;
    top: 92px;
    border-radius: var(--radius);
    padding: 22px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.filter-panel h2 {
    font-size: 21px;
    margin-bottom: 18px;
}

.filter-group {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.filter-group label {
    color: var(--slate-600);
    font-size: 14px;
    font-weight: 700;
}

.filter-group input,
.filter-group select {
    width: 100%;
    border: 1px solid var(--slate-200);
    border-radius: 14px;
    padding: 11px 12px;
    color: var(--slate-800);
    background: var(--white);
    outline: none;
}

.filter-group input:focus,
.filter-group select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.12);
}

.filter-button {
    width: 100%;
    padding: 12px 16px;
    color: var(--white);
    background: var(--cyan);
}

.filter-result {
    margin: 0 0 18px;
    color: var(--slate-500);
    font-weight: 700;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.1fr) minmax(320px, 0.9fr);
    gap: 28px;
    padding: 38px 0 70px;
}

.player-box,
.detail-card,
.side-card,
.category-intro {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

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

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

.player-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(8, 145, 178, 0.18), rgba(2, 6, 23, 0.68));
    cursor: pointer;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    color: var(--white);
    background: var(--cyan);
    box-shadow: 0 16px 38px rgba(8, 145, 178, 0.42);
}

.detail-card {
    margin-top: 24px;
    padding: 28px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--slate-500);
    font-size: 14px;
}

.breadcrumb a {
    color: var(--cyan-dark);
    font-weight: 700;
}

.detail-title h1 {
    font-size: clamp(30px, 4.4vw, 46px);
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.detail-meta span {
    border-radius: 999px;
    padding: 6px 12px;
    color: var(--slate-600);
    background: var(--slate-100);
    font-weight: 700;
    font-size: 14px;
}

.detail-summary h2,
.side-card h2,
.category-intro h2 {
    margin: 0 0 12px;
    color: var(--slate-800);
    font-size: 24px;
}

.detail-summary {
    display: grid;
    gap: 24px;
    margin-top: 24px;
}

.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.side-card {
    padding: 22px;
    margin-bottom: 22px;
}

.side-list {
    display: grid;
    gap: 14px;
}

.side-item {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.side-item img {
    width: 78px;
    height: 98px;
    object-fit: cover;
    border-radius: 14px;
    background: var(--slate-100);
}

.side-item h3 {
    margin: 0 0 4px;
    font-size: 15px;
    line-height: 1.28;
}

.side-item p {
    margin: 0;
    color: var(--slate-500);
    font-size: 13px;
}

.category-intro {
    padding: 26px;
    margin-bottom: 24px;
}

.pagination-line {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 36px;
}

.pagination-line a {
    border-radius: 999px;
    padding: 10px 16px;
    color: var(--cyan-dark);
    background: rgba(8, 145, 178, 0.08);
    font-weight: 800;
}

.rank-list {
    display: grid;
    gap: 16px;
}

.rank-item {
    display: grid;
    grid-template-columns: 64px 120px minmax(0, 1fr) 120px;
    gap: 18px;
    align-items: center;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius);
    padding: 16px;
    background: var(--white);
    box-shadow: var(--soft-shadow);
}

.rank-number {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    border-radius: 16px;
    background: linear-gradient(135deg, var(--orange), var(--red));
    font-size: 20px;
    font-weight: 900;
}

.rank-item img {
    width: 120px;
    height: 150px;
    object-fit: cover;
    border-radius: 18px;
    background: var(--slate-100);
}

.rank-info h2 {
    margin: 0 0 8px;
    font-size: 22px;
}

.rank-info p {
    margin: 0 0 12px;
    color: var(--slate-600);
}

.rank-score {
    color: var(--orange);
    font-size: 24px;
    font-weight: 900;
    text-align: right;
}

.site-footer {
    color: rgba(255, 255, 255, 0.8);
    background: var(--slate-900);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
    padding: 44px 0;
}

.footer-grid p {
    max-width: 520px;
    color: rgba(255, 255, 255, 0.62);
}

.footer-grid h2 {
    margin: 0 0 14px;
    color: var(--white);
    font-size: 18px;
}

.footer-grid a:not(.footer-logo) {
    display: block;
    margin: 8px 0;
    color: rgba(255, 255, 255, 0.66);
}

.footer-grid a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 16px;
    color: rgba(255, 255, 255, 0.55);
    text-align: center;
}

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

.no-results {
    display: none;
    border: 1px dashed var(--slate-200);
    border-radius: var(--radius);
    padding: 32px;
    color: var(--slate-500);
    background: var(--white);
    text-align: center;
}

.no-results.show {
    display: block;
}

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

    .detail-layout,
    .page-layout {
        grid-template-columns: 1fr;
    }

    .filter-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .header-inner {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 0;
    }

    .main-nav {
        order: 5;
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 12px 0;
    }

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

    .nav-link {
        padding: 10px 12px;
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.08);
    }

    .header-search {
        order: 4;
        width: 100%;
        min-width: 0;
    }

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

    .hero {
        height: 620px;
    }

    .hero-content {
        align-items: center;
        padding: 80px 0 70px;
    }

    .movie-grid,
    .movie-grid-wide,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

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

    .movie-card-list,
    .rank-item {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }

    .movie-card-list .movie-poster {
        width: 100%;
        flex-basis: auto;
        aspect-ratio: 16 / 10;
    }

    .rank-item img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 10;
    }

    .rank-score {
        text-align: left;
    }

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

@media (max-width: 500px) {
    .container {
        width: min(100% - 22px, 1180px);
    }

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

    .hero-actions,
    .detail-meta {
        align-items: stretch;
        flex-direction: column;
    }

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