:root {
    --blue: #2563eb;
    --blue-dark: #1d4ed8;
    --cyan: #06b6d4;
    --teal: #14b8a6;
    --slate: #0f172a;
    --text: #111827;
    --muted: #64748b;
    --soft: #f8fafc;
    --line: rgba(148, 163, 184, 0.25);
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    background: #f8fafc;
}

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

img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

button,
input {
    font: inherit;
}

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

.page-bg {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 45%, #ecfeff 100%);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(18px);
    box-shadow: 0 1px 20px rgba(15, 23, 42, 0.08);
}

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

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: linear-gradient(120deg, var(--blue), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-link {
    position: relative;
    font-size: 15px;
    font-weight: 700;
    color: #334155;
    transition: color 0.2s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 3px;
    transform: scaleX(0);
    transform-origin: center;
    border-radius: 999px;
    background: var(--blue);
    transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--blue);
}

.nav-link:hover::after,
.nav-link.is-active::after {
    transform: scaleX(1);
}

.mobile-toggle {
    display: none;
    width: 42px;
    height: 42px;
    padding: 8px;
    border: 0;
    border-radius: 14px;
    background: #f1f5f9;
}

.mobile-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    border-radius: 99px;
    background: #334155;
}

.mobile-nav {
    padding: 12px 16px 18px;
    border-top: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.95);
}

.mobile-nav-link {
    display: block;
    padding: 12px 16px;
    border-radius: 14px;
    font-weight: 700;
    color: #334155;
}

.mobile-nav-link.is-active,
.mobile-nav-link:hover {
    color: var(--blue);
    background: #eff6ff;
}

.hero {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--blue) 0%, var(--cyan) 54%, var(--teal) 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0.2;
    background-image: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.6) 0 2px, transparent 3px), radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.4) 0 2px, transparent 3px);
    background-size: 58px 58px, 86px 86px;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: none;
    isolation: isolate;
    background-image: linear-gradient(90deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.62), rgba(15, 23, 42, 0.12)), var(--hero-image);
    background-size: cover;
    background-position: center;
}

.hero-slide.is-active {
    display: block;
}

.hero-shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.7), rgba(6, 182, 212, 0.48));
}

.hero-content {
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: center;
    gap: 64px;
    color: #fff;
}

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

.hero-label,
.kicker {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #dbeafe;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

.kicker {
    color: var(--blue);
    background: #eff6ff;
    border-color: #dbeafe;
}

.hero h1 {
    margin: 22px 0 20px;
    font-size: clamp(42px, 7vw, 76px);
    line-height: 1.03;
    letter-spacing: -0.08em;
}

.hero p {
    margin: 0;
    max-width: 680px;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(18px, 2vw, 24px);
    line-height: 1.75;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.hero-tags span,
.tag-row span {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #075985;
    background: rgba(236, 254, 255, 0.92);
}

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

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

.btn:hover {
    transform: translateY(-2px) scale(1.01);
}

.btn.primary {
    color: #fff;
    background: linear-gradient(120deg, var(--blue), var(--cyan));
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.32);
}

.hero .btn.primary {
    color: var(--blue);
    background: #fff;
}

.btn.ghost {
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.13);
}

.btn.text {
    color: #fff;
    padding-inline: 10px;
}

.btn.wide {
    width: 100%;
}

.hero-poster {
    position: relative;
    aspect-ratio: 2 / 3;
    border: 8px solid rgba(255, 255, 255, 0.18);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 32px 80px rgba(15, 23, 42, 0.48);
    transform: rotate(2deg);
}

.hero-poster span {
    position: absolute;
    left: 18px;
    bottom: 18px;
    padding: 8px 12px;
    color: #fff;
    font-weight: 800;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.88);
}

.hero-controls {
    position: absolute;
    left: 50%;
    bottom: 30px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 5;
}

.hero-controls button {
    width: 42px;
    height: 42px;
    border: 0;
    color: #fff;
    font-size: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.hero-dots {
    display: flex;
    gap: 8px;
}

.hero-dots button {
    width: 10px;
    height: 10px;
    padding: 0;
    font-size: 0;
    background: rgba(255, 255, 255, 0.42);
}

.hero-dots button.is-active {
    width: 26px;
    border-radius: 999px;
    background: #fff;
}

.search-band {
    margin-top: -48px;
    position: relative;
    z-index: 8;
}

.search-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    backdrop-filter: blur(16px);
}

.search-panel h2,
.section-heading h2,
.sub-hero h1 {
    margin: 8px 0 0;
    font-size: clamp(26px, 4vw, 42px);
    letter-spacing: -0.06em;
}

.search-box {
    min-width: min(520px, 100%);
    height: 54px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    border: 1px solid #dbeafe;
    border-radius: 999px;
    background: #f8fafc;
}

.search-box input {
    flex: 1;
    border: 0;
    outline: 0;
    color: #0f172a;
    background: transparent;
}

.compact-search {
    min-width: 0;
    width: min(580px, 100%);
    margin-top: 26px;
    background: rgba(255, 255, 255, 0.92);
}

.section-block {
    padding: 76px 0 0;
}

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

.section-heading p {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.7;
}

.section-more {
    display: inline-flex;
    align-items: center;
    color: var(--blue);
    font-weight: 800;
}

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

.category-card {
    position: relative;
    min-height: 220px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    border-radius: 24px;
    color: #fff;
    background: var(--slate);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 60px rgba(15, 23, 42, 0.22);
}

.category-card img {
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.62;
    transition: transform 0.5s ease;
}

.category-card:hover img {
    transform: scale(1.08);
}

.category-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, transparent, rgba(15, 23, 42, 0.92));
}

.category-card span,
.category-card strong,
.category-card em {
    position: relative;
    z-index: 2;
}

.category-card span {
    width: fit-content;
    padding: 5px 10px;
    margin-bottom: 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    background: rgba(37, 99, 235, 0.9);
}

.category-card strong {
    font-size: 20px;
}

.category-card em {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.78);
    font-style: normal;
}

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

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

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

.movie-card {
    overflow: hidden;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-7px);
    box-shadow: 0 24px 52px rgba(15, 23, 42, 0.18);
}

.movie-cover {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe, #cffafe);
}

.movie-cover img {
    transition: transform 0.55s ease;
}

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

.play-badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    background: linear-gradient(120deg, var(--blue), var(--cyan));
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.movie-info {
    padding: 16px;
}

.movie-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.movie-meta-line span:not(:last-child)::after {
    content: "·";
    margin-left: 8px;
    color: #cbd5e1;
}

.movie-card h2,
.ranking-item h2 {
    margin: 10px 0 8px;
    font-size: 18px;
    line-height: 1.35;
}

.movie-card p,
.ranking-item p {
    margin: 0;
    color: #64748b;
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.movie-card.compact p {
    font-size: 13px;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

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

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

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

.ranking-item {
    display: grid;
    grid-template-columns: 52px 86px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    padding: 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.09);
}

.rank-number {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #64748b;
    font-weight: 900;
    background: #f1f5f9;
}

.hot-rank {
    color: #fff;
    background: linear-gradient(135deg, #f97316, #eab308);
}

.rank-thumb {
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 14px;
    background: #dbeafe;
}

.rank-body {
    min-width: 0;
}

.sub-hero {
    padding: 74px 0 58px;
    color: #fff;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(6, 182, 212, 0.9)), radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.32), transparent 32%);
}

.sub-hero p {
    max-width: 760px;
    margin: 16px 0 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 18px;
    line-height: 1.8;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
}

.sub-hero .breadcrumb {
    color: rgba(255, 255, 255, 0.82);
}

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

.category-overview-card {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 22px;
    padding: 18px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
}

.category-collage {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    overflow: hidden;
    border-radius: 18px;
}

.category-collage img {
    aspect-ratio: 1 / 1.25;
}

.category-overview-card h2 {
    margin: 12px 0 10px;
    font-size: 24px;
}

.category-overview-card p {
    color: #64748b;
    line-height: 1.75;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 34px;
    padding-top: 36px;
}

.detail-main {
    min-width: 0;
}

.player-shell {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 28px;
    background: #020617;
    box-shadow: 0 28px 70px rgba(2, 6, 23, 0.35);
}

.movie-player {
    width: 100%;
    height: 100%;
    display: block;
    background: #000;
}

.player-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    color: #fff;
    border: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0.76));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

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

.overlay-play {
    width: 76px;
    height: 76px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding-left: 5px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    box-shadow: 0 20px 42px rgba(37, 99, 235, 0.42);
}

.detail-card,
.side-card {
    margin-top: 24px;
    padding: 28px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow);
}

.detail-card h1 {
    margin: 14px 0 12px;
    font-size: clamp(30px, 4vw, 46px);
    letter-spacing: -0.06em;
}

.lead-text {
    font-size: 18px;
    color: #334155;
}

.detail-card h2,
.side-card h2 {
    margin: 28px 0 12px;
    font-size: 23px;
}

.detail-card p {
    color: #475569;
    line-height: 1.9;
}

.detail-tags span {
    color: #1d4ed8;
    background: #dbeafe;
}

.detail-poster {
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    border-radius: 28px;
    box-shadow: var(--shadow);
    background: #dbeafe;
}

.detail-side {
    position: sticky;
    top: 92px;
    align-self: start;
}

.meta-list {
    list-style: none;
    padding: 0;
    margin: 0 0 22px;
}

.meta-list li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.meta-list span {
    color: #64748b;
}

.meta-list strong {
    text-align: right;
}

.site-footer {
    margin-top: 90px;
    padding: 56px 0 24px;
    color: #cbd5e1;
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 36px;
}

.footer-brand {
    color: #fff;
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
}

.site-footer p {
    color: #94a3b8;
    line-height: 1.8;
}

.site-footer h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 18px;
}

.site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-footer li {
    margin: 9px 0;
}

.site-footer a:hover {
    color: #67e8f9;
}

.footer-bottom {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    padding-top: 22px;
    border-top: 1px solid rgba(148, 163, 184, 0.22);
    color: #94a3b8;
}

[hidden] {
    display: none !important;
}

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

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

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

    .hero-poster,
    .detail-side {
        display: none;
    }

    .category-overview-grid {
        grid-template-columns: 1fr;
    }
}

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

    .mobile-toggle {
        display: block;
    }

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

    .hero h1 {
        font-size: 44px;
    }

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

    .search-box {
        min-width: 0;
        width: 100%;
    }

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

    .category-overview-card {
        grid-template-columns: 1fr;
    }

    .ranking-item {
        grid-template-columns: 42px 68px minmax(0, 1fr);
        gap: 10px;
    }

    .site-footer {
        margin-top: 64px;
    }
}

@media (max-width: 520px) {
    .category-grid,
    .movie-grid,
    .wide-grid,
    .category-list,
    .related-grid,
    .ranking-grid,
    .full-ranking,
    .footer-grid {
        grid-template-columns: 1fr;
    }

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

    .btn.text {
        justify-content: center;
        padding: 0 24px;
        border: 1px solid rgba(255, 255, 255, 0.35);
    }

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