:root {
    --sky-50: #f0f9ff;
    --sky-100: #e0f2fe;
    --sky-200: #bae6fd;
    --sky-400: #38bdf8;
    --sky-500: #0ea5e9;
    --sky-600: #0284c7;
    --cyan-400: #22d3ee;
    --blue-500: #3b82f6;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-500: #6b7280;
    --gray-700: #374151;
    --gray-900: #111827;
    --white: #ffffff;
    --black: #020617;
    --radius-lg: 18px;
    --radius-xl: 28px;
    --shadow-sm: 0 8px 20px rgba(15, 23, 42, 0.08);
    --shadow-md: 0 18px 48px rgba(14, 116, 144, 0.18);
    --shadow-lg: 0 28px 80px rgba(15, 23, 42, 0.28);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--gray-900);
    background: linear-gradient(180deg, #ffffff 0%, var(--sky-50) 45%, #ecfeff 100%);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

img {
    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: 60;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(186, 230, 253, 0.8);
    backdrop-filter: blur(16px);
}

.header-inner {
    width: min(1240px, calc(100% - 28px));
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 22px;
}

.site-logo,
.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    color: var(--sky-700, #0369a1);
}

.logo-mark {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sky-500), var(--cyan-400));
    box-shadow: 0 12px 26px rgba(14, 165, 233, 0.35);
}

.logo-text {
    white-space: nowrap;
    font-size: 1.1rem;
}

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

.nav-link {
    padding: 9px 12px;
    color: var(--gray-700);
    border-radius: 999px;
    font-size: 0.94rem;
    transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--sky-600);
    background: var(--sky-50);
}

.header-search {
    width: min(260px, 24vw);
}

.header-search input,
.page-search,
.genre-filter {
    width: 100%;
    border: 1px solid var(--sky-200);
    border-radius: 999px;
    padding: 11px 16px;
    background: #ffffff;
    outline: none;
    color: var(--gray-700);
    transition: all 0.2s ease;
}

.header-search input:focus,
.page-search:focus,
.genre-filter:focus {
    border-color: var(--sky-400);
    box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18);
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 14px;
    background: var(--sky-50);
    padding: 10px;
}

.menu-toggle span {
    display: block;
    height: 2px;
    margin: 5px 0;
    background: var(--sky-600);
    border-radius: 2px;
}

.mobile-panel {
    display: none;
    width: min(1240px, calc(100% - 28px));
    margin: 0 auto 14px;
    padding: 12px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.mobile-panel.is-open {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.mobile-link {
    padding: 10px 12px;
    border-radius: 14px;
    color: var(--gray-700);
    background: var(--sky-50);
}

.hero-carousel {
    position: relative;
    min-height: 620px;
    overflow: hidden;
    background: radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.45), transparent 32%), linear-gradient(135deg, var(--sky-400), var(--blue-500) 54%, var(--cyan-400));
    color: #ffffff;
}

.hero-carousel::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 90px;
    background: linear-gradient(0deg, #ffffff, rgba(255, 255, 255, 0));
    pointer-events: none;
}

.hero-slide {
    position: absolute;
    inset: 0;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(310px, 0.8fr);
    align-items: center;
    gap: 46px;
    opacity: 0;
    transform: translateY(16px) scale(0.99);
    transition: opacity 0.55s ease, transform 0.55s ease;
    pointer-events: none;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: -80px calc(50% - 50vw);
    background-image: linear-gradient(90deg, rgba(3, 105, 161, 0.88), rgba(3, 105, 161, 0.55)), var(--hero-image);
    background-size: cover;
    background-position: center;
    filter: blur(1px);
    opacity: 0.28;
}

.hero-slide.is-active {
    position: relative;
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.hero-copy,
.hero-visual {
    position: relative;
    z-index: 2;
}

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

.hero-eyebrow span,
.card-meta span,
.detail-facts span,
.detail-tags a,
.tag-row span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.hero-eyebrow span {
    padding: 7px 12px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(2.6rem, 7vw, 5.8rem);
    line-height: 1.02;
    letter-spacing: -0.06em;
    text-shadow: 0 16px 42px rgba(2, 6, 23, 0.32);
}

.hero-copy p {
    max-width: 660px;
    margin: 22px 0 0;
    font-size: clamp(1.05rem, 2.2vw, 1.36rem);
    color: rgba(255, 255, 255, 0.9);
}

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

.btn-primary,
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 800;
    transition: all 0.2s ease;
}

.btn-primary {
    background: #ffffff;
    color: var(--sky-600);
    box-shadow: 0 18px 32px rgba(14, 116, 144, 0.28);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 24px 42px rgba(14, 116, 144, 0.34);
}

.btn-ghost {
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.12);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.22);
}

.hero-visual {
    border-radius: 34px;
    overflow: hidden;
    transform: rotate(2deg);
    box-shadow: var(--shadow-lg);
}

.hero-visual img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
}

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

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

.hero-dot.is-active {
    width: 34px;
    background: #ffffff;
}

.quick-search-band {
    padding: 28px 0 10px;
}

.search-shell,
.filter-bar {
    display: grid;
    grid-template-columns: 1fr minmax(280px, 420px);
    gap: 20px;
    align-items: center;
    padding: 24px;
    border: 1px solid var(--sky-200);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow-sm);
}

.search-shell h2,
.search-shell p {
    margin: 0;
}

.search-shell h2 {
    font-size: 1.45rem;
}

.search-shell p {
    color: var(--gray-500);
}

.page-section {
    padding: 52px 0;
}

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

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.35rem);
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.section-heading p {
    max-width: 520px;
    margin: 0;
    color: var(--gray-500);
}

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

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

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

.movie-card {
    overflow: hidden;
    border: 1px solid rgba(186, 230, 253, 0.85);
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.movie-card:hover {
    transform: translateY(-6px);
    border-color: var(--sky-300, #7dd3fc);
    box-shadow: var(--shadow-md);
}

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

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

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

.card-play {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--sky-600);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-sm);
}

.card-body {
    padding: 18px;
}

.card-meta,
.detail-facts,
.tag-row,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.card-meta span,
.tag-row span {
    padding: 4px 9px;
    color: var(--sky-700, #0369a1);
    background: var(--sky-100);
}

.movie-card h3 {
    margin: 12px 0 8px;
    font-size: 1.12rem;
    line-height: 1.35;
}

.movie-card p {
    min-height: 3.2em;
    margin: 0 0 14px;
    color: var(--gray-500);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

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

.category-tile {
    padding: 18px;
    border: 1px solid var(--sky-200);
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff, var(--sky-50));
    box-shadow: var(--shadow-sm);
    transition: all 0.22s ease;
}

.category-tile:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.category-thumb-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.category-thumb-row img {
    aspect-ratio: 1 / 1;
    width: 100%;
    border-radius: 16px;
    object-fit: cover;
}

.category-tile strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1.2rem;
}

.category-tile em,
.mini-card em,
.rank-item em,
.ranking-row em {
    display: block;
    color: var(--gray-500);
    font-style: normal;
    font-size: 0.88rem;
}

.two-column-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}

.rank-panel,
.detail-side,
.detail-article,
.player-shell {
    border: 1px solid var(--sky-200);
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-sm);
}

.rank-panel {
    position: sticky;
    top: 96px;
    padding: 22px;
}

.rank-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.rank-heading h2 {
    margin: 0;
}

.rank-heading a {
    color: var(--sky-600);
    font-weight: 700;
}

.rank-list,
.side-list,
.mini-card-grid {
    display: grid;
    gap: 12px;
}

.rank-item,
.mini-card {
    display: grid;
    grid-template-columns: 34px 62px 1fr;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 18px;
    transition: background 0.18s ease;
}

.mini-card {
    grid-template-columns: 78px 1fr;
    border: 1px solid var(--sky-100);
    background: #ffffff;
}

.rank-item:hover,
.mini-card:hover {
    background: var(--sky-50);
}

.rank-item > span {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #ffffff;
    background: var(--sky-500);
    font-weight: 800;
}

.rank-item img,
.mini-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 14px;
    object-fit: cover;
}

.rank-item strong,
.mini-card strong {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.sub-hero {
    position: relative;
    overflow: hidden;
    padding: 84px 0 78px;
    color: #ffffff;
    background: linear-gradient(135deg, var(--sky-500), var(--blue-500) 60%, var(--cyan-400));
}

.sub-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.3), transparent 32%);
}

.sub-hero .container {
    position: relative;
}

.sub-hero span {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-weight: 800;
}

.sub-hero h1 {
    margin: 16px 0 10px;
    font-size: clamp(2.3rem, 5vw, 4.5rem);
    line-height: 1.08;
}

.sub-hero p {
    max-width: 700px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.1rem;
}

.filter-bar {
    grid-template-columns: 1fr 220px;
    margin-bottom: 28px;
}

.genre-filter {
    border-radius: 18px;
}

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

.ranking-row a {
    display: grid;
    grid-template-columns: 54px 92px 1fr minmax(260px, 0.8fr);
    align-items: center;
    gap: 18px;
    padding: 14px;
    border: 1px solid var(--sky-200);
    border-radius: 22px;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.ranking-row a:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.rank-number {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sky-500), var(--cyan-400));
    font-weight: 900;
}

.ranking-row img {
    width: 92px;
    aspect-ratio: 1 / 1;
    border-radius: 18px;
    object-fit: cover;
}

.ranking-row p {
    margin: 0;
    color: var(--gray-500);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.detail-hero {
    position: relative;
    padding: 88px 0 78px;
    overflow: hidden;
    color: #ffffff;
    background: var(--black);
}

.detail-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: linear-gradient(90deg, rgba(2, 6, 23, 0.84), rgba(2, 132, 199, 0.55)), var(--detail-backdrop);
    background-size: cover;
    background-position: center;
    filter: blur(2px);
    transform: scale(1.03);
}

.detail-hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 38px;
    align-items: center;
}

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

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.8);
}

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

.detail-copy h1 {
    margin: 0;
    font-size: clamp(2.4rem, 5.2vw, 4.7rem);
    line-height: 1.08;
    letter-spacing: -0.05em;
}

.detail-one-line {
    max-width: 760px;
    margin: 20px 0;
    font-size: 1.18rem;
    color: rgba(255, 255, 255, 0.88);
}

.detail-facts span,
.detail-tags a {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.detail-tags {
    margin: 16px 0 28px;
}

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

.player-shell {
    position: relative;
    overflow: hidden;
    background: #000000;
}

.movie-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000000;
    cursor: pointer;
}

.player-cover-button {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    border: 0;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(2, 6, 23, 0.38), rgba(2, 6, 23, 0.18));
    cursor: pointer;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.player-cover-button span {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--sky-600);
    background: rgba(255, 255, 255, 0.95);
    font-size: 2.2rem;
    box-shadow: var(--shadow-lg);
}

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

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

.detail-article,
.detail-side {
    padding: 26px;
}

.detail-article h2,
.detail-side h2 {
    margin: 0 0 16px;
    font-size: 1.55rem;
}

.detail-article p {
    margin: 0 0 26px;
    color: var(--gray-700);
    font-size: 1.04rem;
}

.site-footer {
    margin-top: 40px;
    padding: 42px 0;
    border-top: 1px solid var(--sky-200);
    background: #ffffff;
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 24px;
    align-items: start;
}

.footer-inner p {
    max-width: 480px;
    color: var(--gray-500);
}

.footer-links {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px 16px;
    color: var(--gray-500);
}

.footer-links a:hover {
    color: var(--sky-600);
}

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

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

    .header-search {
        margin-left: auto;
        width: min(340px, 44vw);
    }

    .menu-toggle {
        display: block;
    }

    .hero-slide {
        grid-template-columns: 1fr 330px;
    }

    .featured-grid,
    .movie-grid,
    .category-movie-grid,
    .category-grid,
    .category-grid.large,
    .mini-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .two-column-section,
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .rank-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .header-inner {
        min-height: 66px;
        gap: 12px;
    }

    .header-search {
        display: none;
    }

    .mobile-panel.is-open {
        grid-template-columns: 1fr;
    }

    .hero-carousel {
        min-height: 720px;
    }

    .hero-slide {
        grid-template-columns: 1fr;
        align-content: center;
        gap: 26px;
        padding: 58px 0 110px;
    }

    .hero-visual {
        max-width: 280px;
        margin: 0 auto;
        order: -1;
    }

    .search-shell,
    .filter-bar,
    .footer-inner,
    .detail-hero-inner,
    .ranking-row a {
        grid-template-columns: 1fr;
    }

    .section-heading {
        display: block;
    }

    .section-heading p {
        margin-top: 8px;
    }

    .featured-grid,
    .movie-grid,
    .category-movie-grid,
    .category-grid,
    .category-grid.large,
    .mini-card-grid {
        grid-template-columns: 1fr;
    }

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

    .footer-links {
        justify-content: flex-start;
    }

    .detail-hero {
        padding: 56px 0;
    }

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

    .ranking-row img {
        width: 100%;
        aspect-ratio: 16 / 9;
    }
}
