:root {
    --page-bg: #f8fafc;
    --text-main: #1f2937;
    --text-soft: #64748b;
    --card-bg: #ffffff;
    --line: #e2e8f0;
    --dark: #0f172a;
    --cyan: #06b6d4;
    --cyan-dark: #0891b2;
    --teal: #14b8a6;
    --amber: #f59e0b;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --radius: 18px;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    color: var(--text-main);
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 48%, #f8fafc 100%);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

img {
    background: linear-gradient(135deg, #0f172a, #155e75);
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.28);
    backdrop-filter: blur(16px);
}

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

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.brand-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--teal));
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(6, 182, 212, 0.35);
}

.main-nav,
.footer-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.main-nav a,
.footer-nav a {
    color: rgba(255, 255, 255, 0.84);
    font-size: 15px;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.footer-nav a:hover {
    color: #67e8f9;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 240px;
    padding: 8px 10px;
    background: rgba(30, 41, 59, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
}

.header-search input {
    width: 100%;
    color: #ffffff;
    outline: none;
    background: transparent;
}

.header-search button {
    color: #cffafe;
    font-weight: 700;
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    color: #ffffff;
    border-radius: 12px;
    background: rgba(30, 41, 59, 0.9);
}

.mobile-menu {
    display: none;
    padding: 0 0 18px;
}

.mobile-menu a {
    display: block;
    padding: 12px 0;
    color: rgba(255, 255, 255, 0.9);
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.hero-carousel {
    position: relative;
    min-height: 70vh;
    overflow: hidden;
    color: #ffffff;
    background: #0f172a;
}

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

.hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 72% 30%, rgba(6, 182, 212, 0.28), transparent 28%),
        linear-gradient(90deg, rgba(2, 6, 23, 0.88) 0%, rgba(15, 23, 42, 0.68) 46%, rgba(15, 23, 42, 0.1) 100%),
        linear-gradient(180deg, rgba(15, 23, 42, 0.1) 0%, rgba(15, 23, 42, 0.78) 100%);
}

.hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    min-height: 70vh;
    padding: 80px 0;
}

.hero-copy {
    max-width: 720px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    color: #ecfeff;
    font-size: 14px;
    font-weight: 800;
    background: rgba(6, 182, 212, 0.86);
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.28);
}

.hero-copy h1,
.hero-copy h2 {
    margin-top: 20px;
    font-size: clamp(38px, 6vw, 70px);
    line-height: 1.05;
    font-weight: 900;
    text-shadow: 0 8px 26px rgba(0, 0, 0, 0.42);
}

.hero-copy p {
    max-width: 660px;
    margin-top: 18px;
    color: rgba(226, 232, 240, 0.96);
    font-size: clamp(16px, 2vw, 20px);
    line-height: 1.85;
}

.hero-tags,
.meta-line,
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tags {
    margin-top: 18px;
}

.hero-tags span,
.tag-list span,
.meta-pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    color: #155e75;
    font-size: 13px;
    font-weight: 700;
    background: #ecfeff;
    border-radius: 999px;
}

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

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

.btn-primary {
    color: #ffffff;
    background: linear-gradient(135deg, var(--cyan), var(--teal));
    box-shadow: 0 14px 30px rgba(6, 182, 212, 0.34);
}

.btn-secondary {
    color: #0f172a;
    background: #ffffff;
}

.btn-light {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
}

.btn-primary:hover,
.btn-secondary:hover,
.btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.22);
}

.hero-controls {
    position: absolute;
    right: max(24px, calc((100vw - 1180px) / 2));
    bottom: 34px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hero-arrow,
.hero-dot {
    display: grid;
    place-items: center;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
}

.hero-arrow {
    width: 42px;
    height: 42px;
    border-radius: 14px;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    opacity: 0.7;
}

.hero-dot.is-active {
    width: 28px;
    background: var(--cyan);
    opacity: 1;
}

.section {
    padding: 64px 0 0;
}

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

.section-kicker {
    margin-bottom: 8px;
    color: var(--cyan-dark);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.section-title {
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 900;
    color: #0f172a;
}

.section-desc {
    max-width: 720px;
    margin-top: 10px;
    color: var(--text-soft);
    line-height: 1.8;
}

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

.movie-card {
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid rgba(226, 232, 240, 0.82);
    border-radius: var(--radius);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

.poster-wrap {
    position: relative;
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: linear-gradient(135deg, #0f172a, #164e63);
}

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

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

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 35%, rgba(15, 23, 42, 0.86));
    opacity: 0.8;
}

.card-badge,
.rank-badge {
    position: absolute;
    z-index: 2;
    left: 12px;
    top: 12px;
    padding: 5px 9px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(6, 182, 212, 0.92);
    border-radius: 999px;
}

.play-badge {
    position: absolute;
    z-index: 2;
    right: 12px;
    bottom: 12px;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    color: #ffffff;
    background: rgba(6, 182, 212, 0.9);
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.36);
}

.movie-card-body {
    padding: 16px;
}

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--text-soft);
    font-size: 12px;
}

.movie-card h3 {
    min-height: 48px;
    color: #0f172a;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 900;
}

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

.movie-card p {
    display: -webkit-box;
    min-height: 48px;
    margin-top: 8px;
    overflow: hidden;
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.7;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tag-list {
    margin-top: 12px;
}

.tag-list span {
    color: #0e7490;
    background: #ecfeff;
}

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

.category-card {
    position: relative;
    overflow: hidden;
    min-height: 168px;
    padding: 24px;
    color: #ffffff;
    background:
        radial-gradient(circle at 82% 18%, rgba(103, 232, 249, 0.42), transparent 26%),
        linear-gradient(135deg, #0f172a, #164e63 58%, #0891b2);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.category-card h3 {
    position: relative;
    z-index: 1;
    font-size: 22px;
    font-weight: 900;
}

.category-card p {
    position: relative;
    z-index: 1;
    margin-top: 12px;
    color: rgba(236, 254, 255, 0.88);
    line-height: 1.7;
}

.category-card span {
    position: relative;
    z-index: 1;
    display: inline-flex;
    margin-top: 18px;
    font-weight: 800;
    color: #a5f3fc;
}

.ranking-panel {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
}

.ranking-list {
    display: grid;
    gap: 12px;
}

.ranking-row {
    display: grid;
    grid-template-columns: 54px 82px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.ranking-num {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--amber), #ef4444);
    border-radius: 14px;
}

.ranking-row img {
    width: 82px;
    height: 112px;
    object-fit: cover;
    border-radius: 14px;
}

.ranking-row h3 {
    font-size: 18px;
    font-weight: 900;
}

.ranking-row p {
    margin-top: 6px;
    color: var(--text-soft);
    line-height: 1.6;
}

.score {
    color: #b45309;
    font-weight: 900;
}

.page-hero {
    padding: 58px 0;
    color: #ffffff;
    background:
        radial-gradient(circle at 75% 25%, rgba(6, 182, 212, 0.35), transparent 28%),
        linear-gradient(135deg, #0f172a, #164e63);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
    color: rgba(226, 232, 240, 0.82);
    font-size: 14px;
}

.breadcrumb a:hover {
    color: #67e8f9;
}

.page-hero h1 {
    max-width: 900px;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.16;
    font-weight: 900;
}

.page-hero p {
    max-width: 780px;
    margin-top: 14px;
    color: rgba(226, 232, 240, 0.92);
    line-height: 1.85;
}

.filter-bar {
    display: grid;
    grid-template-columns: 1fr 180px 180px;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.filter-bar input,
.filter-bar select,
.search-lab input,
.search-lab select {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    color: #0f172a;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus,
.search-lab input:focus,
.search-lab select:focus {
    border-color: #67e8f9;
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.12);
}

.detail-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 34px;
    align-items: start;
}

.detail-poster {
    overflow: hidden;
    background: #0f172a;
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.detail-poster img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.detail-card {
    padding: 28px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.detail-card h2,
.content-card h2 {
    font-size: 28px;
    font-weight: 900;
    color: #0f172a;
}

.detail-card p,
.content-card p {
    margin-top: 14px;
    color: #475569;
    line-height: 1.9;
}

.content-card {
    padding: 28px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.watch-panel {
    overflow: hidden;
    background: #020617;
    border-radius: 26px;
    box-shadow: 0 22px 60px rgba(2, 6, 23, 0.32);
}

.player-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #020617;
}

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

.player-start {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: radial-gradient(circle at center, rgba(6, 182, 212, 0.22), rgba(2, 6, 23, 0.58));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.player-start span {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    padding-left: 6px;
    font-size: 34px;
    background: linear-gradient(135deg, var(--cyan), var(--teal));
    border-radius: 999px;
    box-shadow: 0 20px 42px rgba(6, 182, 212, 0.42);
}

.player-frame.is-playing .player-start {
    visibility: hidden;
    opacity: 0;
}

.player-title {
    padding: 18px 22px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.search-lab {
    display: grid;
    grid-template-columns: 1fr 180px 180px 120px;
    gap: 12px;
    margin: 26px 0;
}

.search-results {
    min-height: 260px;
}

.empty-state {
    padding: 42px;
    text-align: center;
    color: var(--text-soft);
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 24px;
}

.site-footer {
    margin-top: 80px;
    color: #cbd5e1;
    background: #0f172a;
}

.footer-shell {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 38px;
    padding: 46px 0;
}

.site-footer h3 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 900;
}

.site-footer p {
    margin-top: 12px;
    line-height: 1.8;
}

.footer-nav {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px 18px;
    margin-top: 14px;
}

.footer-bottom {
    padding: 20px 0;
    color: #94a3b8;
    text-align: center;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

@media (max-width: 1024px) {
    .main-nav,
    .nav-shell > .header-search {
        display: none;
    }

    .mobile-menu .header-search {
        display: flex;
        min-width: 0;
        margin-top: 12px;
    }

    .mobile-toggle {
        display: grid;
        place-items: center;
    }

    .site-header.is-open .mobile-menu {
        display: block;
    }

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

    .ranking-panel,
    .detail-layout,
    .footer-shell {
        grid-template-columns: 1fr;
    }
}

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

    .hero-carousel,
    .hero-inner {
        min-height: 76vh;
    }

    .hero-controls {
        right: 18px;
        bottom: 18px;
    }

    .section {
        padding-top: 46px;
    }

    .section-header {
        display: block;
    }

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

    .movie-card-body {
        padding: 13px;
    }

    .movie-card h3 {
        font-size: 16px;
    }

    .filter-bar,
    .search-lab {
        grid-template-columns: 1fr;
    }

    .ranking-row {
        grid-template-columns: 42px 72px 1fr;
    }

    .ranking-row .score {
        grid-column: 3;
    }

    .ranking-row img {
        width: 72px;
        height: 98px;
    }

    .detail-card,
    .content-card {
        padding: 22px;
    }
}

@media (max-width: 460px) {
    .movie-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .hero-copy h1,
    .hero-copy h2 {
        font-size: 36px;
    }
}
