:root {
    --bg: #f4f8ff;
    --card: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --sky: #0284c7;
    --blue: #2563eb;
    --deep: #071a2f;
    --soft: #e0f2fe;
    --shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
    --small-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);
    --radius: 24px;
}

body {
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, 0.16), transparent 32rem),
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 34rem),
        var(--bg);
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

main {
    overflow: hidden;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(226, 232, 240, 0.86);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(18px);
}

.nav-wrap,
.footer-wrap,
.home-hero,
.content-section,
.page-hero,
.detail-hero {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

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

.brand,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    text-decoration: none;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    color: #ffffff;
    font-weight: 900;
    background: linear-gradient(135deg, var(--sky), var(--blue));
    box-shadow: 0 12px 26px rgba(2, 132, 199, 0.34);
}

.brand-text {
    display: grid;
    line-height: 1.05;
}

.brand-text strong,
.footer-logo {
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--sky), var(--blue));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 0.78rem;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 0.95rem;
    font-weight: 700;
}

.desktop-nav a,
.mobile-panel a,
.site-footer a,
.section-head a,
.panel-head a {
    color: #334155;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.desktop-nav a:hover,
.mobile-panel a:hover,
.site-footer a:hover,
.section-head a:hover,
.panel-head a:hover {
    color: var(--sky);
}

.mobile-toggle {
    display: none;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 16px;
    color: var(--sky);
    background: #ffffff;
    font-weight: 800;
}

.mobile-panel {
    display: none;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto 16px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--small-shadow);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mobile-panel.is-open {
    display: grid;
}

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    padding: 34px 0 18px;
}

.hero-shell,
.hero-side,
.page-hero,
.detail-hero,
.soft-panel,
.ranking-panel,
.article-panel,
.info-panel,
.category-detail-card,
.filter-panel {
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}

.hero-shell {
    position: relative;
    overflow: hidden;
    padding: 26px;
}

.hero-topline,
.section-head,
.panel-head,
.category-detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.hero-topline span,
.eyebrow {
    display: inline-flex;
    align-items: center;
    color: var(--sky);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-topline a {
    color: var(--sky);
    text-decoration: none;
    font-weight: 800;
}

.hero-shell > h1,
.page-hero h1,
.detail-copy h1 {
    margin: 16px 0 12px;
    font-size: clamp(2rem, 4vw, 4.8rem);
    line-height: 1.03;
    letter-spacing: -0.06em;
    font-weight: 950;
}

.hero-intro,
.page-hero p,
.detail-lead {
    max-width: 780px;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.8;
}

.hero-slider {
    position: relative;
    min-height: 430px;
    margin-top: 24px;
    border-radius: 28px;
    overflow: hidden;
    background: var(--deep);
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    align-items: center;
    gap: 26px;
    padding: 42px;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.65s ease, transform 0.65s ease;
    pointer-events: none;
}

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

.hero-copy {
    color: #ffffff;
    position: relative;
    z-index: 2;
}

.hero-copy h2 {
    margin: 14px 0;
    font-size: clamp(2rem, 4vw, 4rem);
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.05em;
}

.hero-copy p {
    max-width: 620px;
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.8;
    font-size: 1rem;
}

.hero-tags,
.tag-row,
.poster-tags,
.detail-tag-links,
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.hero-tags span,
.tag-row span,
.poster-tags span,
.detail-tag-links a,
.tag-cloud a {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 11px;
    color: #0369a1;
    background: #e0f2fe;
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
}

.hero-tags span {
    color: #e0f2fe;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 22px;
}

.primary-btn,
.ghost-btn,
.card-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 999px;
    padding: 0 18px;
    text-decoration: none;
    font-weight: 900;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn,
.card-action {
    color: #ffffff;
    background: linear-gradient(135deg, var(--sky), var(--blue));
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
}

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

.primary-btn:hover,
.ghost-btn:hover,
.card-action:hover {
    transform: translateY(-2px);
}

.hero-poster {
    position: relative;
    z-index: 2;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 54px rgba(0, 0, 0, 0.34);
}

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

.hero-controls {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.hero-dot {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: #cbd5e1;
    cursor: pointer;
}

.hero-dot.is-active {
    background: linear-gradient(135deg, var(--sky), var(--blue));
}

.hero-side {
    padding: 24px;
    align-self: stretch;
}

.hero-side h2,
.section-head h2,
.panel-head h2,
.tag-cloud-panel h2,
.article-panel h2,
.info-panel h2,
.category-detail-card h2,
.player-poster h2 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.mini-link {
    display: grid;
    grid-template-columns: 62px 1fr;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--line);
}

.mini-link img {
    width: 62px;
    height: 78px;
    border-radius: 14px;
    object-fit: cover;
}

.mini-link span {
    font-weight: 900;
    line-height: 1.35;
}

.hero-search {
    margin-top: 20px;
    display: grid;
    gap: 10px;
}

.hero-search label,
.filter-field label {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 800;
}

.hero-search div {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.hero-search input,
.filter-field input,
.filter-field select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 12px 14px;
    color: var(--ink);
    background: #ffffff;
    outline: none;
}

.hero-search button {
    border: 0;
    border-radius: 999px;
    padding: 0 16px;
    color: #ffffff;
    background: var(--sky);
    font-weight: 900;
}

.content-section {
    padding: 42px 0;
}

.soft-panel {
    padding: 28px;
}

.section-head {
    margin-bottom: 22px;
}

.section-head p,
.category-detail-card p,
.tag-cloud-panel p,
.article-panel p,
.rank-card p {
    color: var(--muted);
    line-height: 1.75;
}

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

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.92);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--small-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.poster-link {
    position: relative;
    display: block;
    background: #dbeafe;
    overflow: hidden;
}

.poster-link img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
    transition: transform 0.35s ease;
}

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

.score-badge {
    position: absolute;
    right: 12px;
    top: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 30px;
    border-radius: 999px;
    color: #ffffff;
    font-weight: 950;
    background: rgba(2, 132, 199, 0.9);
    backdrop-filter: blur(8px);
}

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

.movie-meta {
    color: var(--sky);
    font-size: 0.82rem;
    font-weight: 900;
}

.movie-card h3,
.rank-card h2 {
    margin: 8px 0;
    font-size: 1.08rem;
    line-height: 1.35;
    font-weight: 950;
}

.movie-card h3 a,
.rank-card h2 a {
    color: var(--ink);
    text-decoration: none;
}

.movie-card p {
    color: var(--muted);
    line-height: 1.65;
    min-height: 72px;
}

.card-action {
    margin-top: 14px;
    min-height: 38px;
    padding: 0 14px;
    font-size: 0.9rem;
}

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

.category-card {
    display: grid;
    gap: 12px;
    min-height: 190px;
    padding: 22px;
    border: 1px solid rgba(14, 165, 233, 0.18);
    border-radius: 22px;
    color: var(--ink);
    background: linear-gradient(135deg, #ffffff, #eff6ff);
    text-decoration: none;
    box-shadow: var(--small-shadow);
}

.category-card strong {
    font-size: 1.28rem;
    font-weight: 950;
}

.category-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.category-card div {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-card span {
    border-radius: 999px;
    padding: 5px 9px;
    color: #0369a1;
    background: var(--soft);
    font-size: 0.75rem;
    font-weight: 800;
}

.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: start;
}

.ranking-panel {
    padding: 24px;
    position: sticky;
    top: 96px;
}

.ranking-list {
    display: grid;
    gap: 10px;
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.ranking-list a {
    display: grid;
    grid-template-columns: 34px 52px 1fr auto;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
}

.ranking-list img {
    width: 52px;
    height: 68px;
    border-radius: 12px;
    object-fit: cover;
}

.rank-no {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    color: #ffffff;
    font-weight: 950;
    background: linear-gradient(135deg, var(--sky), var(--blue));
}

.rank-title {
    font-weight: 900;
}

.rank-meta {
    color: var(--muted);
    font-size: 0.82rem;
}

.tag-cloud-panel {
    border-radius: var(--radius);
    padding: 28px;
    background: linear-gradient(135deg, #ffffff, #eff6ff);
}

.page-hero,
.detail-hero {
    margin-top: 34px;
    padding: 38px;
    background-size: cover;
    background-position: center;
}

.simple-hero,
.category-hero,
.search-hero {
    background:
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.18), transparent 28rem),
        rgba(255, 255, 255, 0.88);
}

.ranking-hero {
    color: #ffffff;
    overflow: hidden;
}

.ranking-hero p,
.ranking-hero .eyebrow {
    color: rgba(255, 255, 255, 0.82);
}

.filter-panel {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 160px 150px 150px;
    gap: 12px;
    padding: 18px;
    margin-bottom: 22px;
}

.filter-field {
    display: grid;
    gap: 7px;
}

.empty-state {
    display: none;
    margin-top: 20px;
    padding: 26px;
    border-radius: 20px;
    color: var(--muted);
    background: #ffffff;
    text-align: center;
    font-weight: 800;
}

.empty-state.is-visible {
    display: block;
}

.category-detail-card {
    padding: 24px;
}

.mini-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
    margin-top: 14px;
}

.rank-feed {
    display: grid;
    gap: 14px;
}

.rank-card {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--small-shadow);
}

.rank-cover {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 18px;
}

.rank-cover img {
    width: 110px;
    height: 148px;
    object-fit: cover;
}

.rank-cover span {
    position: absolute;
    left: 8px;
    top: 8px;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    color: #ffffff;
    font-weight: 950;
    background: rgba(2, 132, 199, 0.92);
}

.detail-hero {
    background:
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.18), transparent 28rem),
        rgba(255, 255, 255, 0.88);
}

.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
    color: var(--muted);
    font-weight: 800;
}

.breadcrumbs a {
    color: var(--sky);
    text-decoration: none;
}

.detail-layout {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 28px;
    align-items: center;
}

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

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

.poster-tags {
    padding: 14px;
}

.detail-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.detail-stats span {
    border-radius: 999px;
    padding: 9px 13px;
    color: #0f172a;
    background: #e0f2fe;
    font-weight: 900;
}

.player-section {
    padding-bottom: 16px;
}

.player-shell {
    position: relative;
    overflow: hidden;
    min-height: 520px;
    border-radius: 30px;
    background: #020617;
    box-shadow: var(--shadow);
}

.player-video {
    width: 100%;
    height: 100%;
    min-height: 520px;
    display: block;
    background: #020617;
}

.player-poster {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: end;
    gap: 24px;
    padding: 38px;
    color: #ffffff;
    background-size: cover;
    background-position: center;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.play-trigger {
    width: 86px;
    height: 86px;
    border: 0;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--sky), var(--blue));
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.4);
    cursor: pointer;
}

.play-trigger span {
    width: 0;
    height: 0;
    margin-left: 6px;
    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 24px solid #ffffff;
}

.player-poster p {
    max-width: 680px;
    color: rgba(255, 255, 255, 0.82);
    line-height: 1.7;
}

.detail-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
}

.article-panel,
.info-panel {
    padding: 28px;
}

.article-panel h2 + p {
    margin-top: 10px;
}

.info-panel dl {
    display: grid;
    grid-template-columns: 74px 1fr;
    gap: 12px;
    margin: 18px 0;
}

.info-panel dt {
    color: var(--muted);
    font-weight: 900;
}

.info-panel dd {
    margin: 0;
    color: var(--ink);
    font-weight: 800;
}

.info-panel a {
    color: var(--sky);
    text-decoration: none;
}

.site-footer {
    margin-top: 34px;
    border-top: 1px solid var(--line);
    background: #ffffff;
}

.footer-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.8fr);
    gap: 28px;
    padding: 34px 0;
}

.footer-wrap p {
    max-width: 620px;
    color: var(--muted);
    line-height: 1.7;
}

.footer-wrap nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    align-content: start;
}

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

    .mobile-toggle {
        display: inline-flex;
    }

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

    .ranking-panel {
        position: static;
    }

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

@media (max-width: 860px) {
    .hero-slide {
        grid-template-columns: 1fr;
        padding: 28px;
    }

    .hero-poster {
        display: none;
    }

    .hero-slider {
        min-height: 480px;
    }

    .movie-grid,
    .featured-grid,
    .compact-grid,
    .listing-grid,
    .category-grid,
    .category-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

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

    .rank-card {
        grid-template-columns: 88px minmax(0, 1fr);
    }

    .rank-card .card-action {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .rank-cover img {
        width: 88px;
        height: 118px;
    }

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

@media (max-width: 560px) {
    .nav-wrap,
    .footer-wrap,
    .home-hero,
    .content-section,
    .page-hero,
    .detail-hero,
    .mobile-panel {
        width: min(100% - 22px, 1180px);
    }

    .brand-text small {
        display: none;
    }

    .hero-shell,
    .hero-side,
    .page-hero,
    .detail-hero,
    .soft-panel,
    .article-panel,
    .info-panel {
        padding: 20px;
        border-radius: 20px;
    }

    .hero-slider {
        min-height: 540px;
        border-radius: 20px;
    }

    .hero-slide {
        padding: 22px;
    }

    .hero-copy h2 {
        font-size: 2.2rem;
    }

    .movie-grid,
    .featured-grid,
    .compact-grid,
    .listing-grid,
    .category-grid,
    .category-detail-grid,
    .mini-grid {
        grid-template-columns: 1fr;
    }

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

    .ranking-list a {
        grid-template-columns: 30px 48px 1fr;
    }

    .rank-meta {
        display: none;
    }

    .player-shell,
    .player-video {
        min-height: 360px;
    }

    .player-poster {
        grid-template-columns: 1fr;
        align-content: end;
        padding: 22px;
    }

    .play-trigger {
        width: 72px;
        height: 72px;
    }
}
