:root {
    --jelly-bg-primary: #f8f9fe;
    --jelly-bg-secondary: #ffffff;
    --jelly-text-primary: #2d3748;
    --jelly-text-secondary: #718096;
    --jelly-accent-mint: #b8e6d5;
    --jelly-accent-lavender: #d4c5f9;
    --jelly-accent-pink: #ffc4dd;
    --jelly-accent-blue: #c4ddff;
    --jelly-accent-peach: #ffd4c4;
    --jelly-moon: #e8eaf6;
    --jelly-purple: #764ba2;
    --jelly-pink: #f093fb;
    --jelly-blue: #4facfe;
    --jelly-shadow: 0 8px 32px rgba(31, 38, 135, 0.15), 0 2px 8px rgba(31, 38, 135, 0.1);
    --jelly-shadow-hover: 0 16px 48px rgba(31, 38, 135, 0.25), 0 4px 12px rgba(31, 38, 135, 0.15);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
    color: var(--jelly-text-primary);
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb, #4facfe, #00f2fe);
    background-size: 400% 400%;
    animation: gradientShift 30s ease infinite;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 8% 12%, rgba(255, 255, 255, 0.28), transparent 28%),
        radial-gradient(circle at 88% 18%, rgba(255, 196, 221, 0.32), transparent 24%),
        radial-gradient(circle at 45% 90%, rgba(196, 221, 255, 0.32), transparent 32%);
    z-index: -1;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

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

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

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.jelly-card,
.jelly-glass {
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: var(--jelly-shadow);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

.jelly-card {
    border-radius: 1.5rem;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    border-width: 0 0 1px;
}

.site-header-inner {
    max-width: 1280px;
    height: 76px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.35rem;
    white-space: nowrap;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    background: linear-gradient(135deg, #a78bfa, #f9a8d4);
    box-shadow: 0 0 32px rgba(232, 234, 246, 0.7);
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 26px;
    margin-left: auto;
}

.nav-link {
    font-weight: 650;
    color: #475569;
    transition: color 0.25s ease;
}

.nav-link:hover,
.nav-link.is-active {
    color: #7e22ce;
}

.nav-dropdown {
    position: relative;
    padding: 26px 0;
}

.dropdown-panel {
    position: absolute;
    top: 66px;
    left: -24px;
    width: 260px;
    border-radius: 22px;
    padding: 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.25s ease;
}

.nav-dropdown:hover .dropdown-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-panel a,
.mobile-panel a {
    padding: 10px 12px;
    border-radius: 14px;
    color: #475569;
    transition: background 0.25s ease, color 0.25s ease;
}

.dropdown-panel a:hover,
.mobile-panel a:hover {
    background: rgba(255, 255, 255, 0.55);
    color: #7e22ce;
}

.header-search,
.mobile-search {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-search input,
.mobile-search input,
.local-search input {
    border: 1px solid rgba(255, 255, 255, 0.36);
    outline: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: #334155;
    padding: 11px 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
    transition: box-shadow 0.25s ease, background 0.25s ease;
}

.header-search input {
    width: 220px;
}

.header-search button,
.mobile-search button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.74);
    color: #7e22ce;
}

.header-search input:focus,
.mobile-search input:focus,
.local-search input:focus {
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.35);
}

.menu-toggle {
    display: none;
    border: 0;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: #7e22ce;
    font-size: 1.35rem;
}

.mobile-panel {
    display: none;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 18px;
}

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

.mobile-panel nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 14px;
}

.mobile-search input {
    flex: 1;
    min-width: 0;
}

.mobile-search button {
    width: auto;
    padding: 0 18px;
}

.page-main {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding-top: 112px;
    padding-bottom: 64px;
}

.hero-section {
    position: relative;
    min-height: 560px;
    margin-bottom: 64px;
    background: rgba(255, 255, 255, 0.28);
}

.hero-stage {
    position: relative;
    height: 560px;
    overflow: hidden;
}

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

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

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform 8s ease;
}

.hero-slide.is-active img {
    transform: scale(1.1);
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.86), rgba(15, 23, 42, 0.46), rgba(15, 23, 42, 0.12)), linear-gradient(0deg, rgba(15, 23, 42, 0.75), transparent 55%);
}

.hero-content {
    position: absolute;
    left: clamp(28px, 7vw, 72px);
    right: clamp(28px, 7vw, 72px);
    bottom: clamp(34px, 7vw, 72px);
    max-width: 780px;
    color: #ffffff;
}

.hero-badge,
.soft-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 16px;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
}

.hero-badge {
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(16px);
}

.soft-badge {
    color: #7e22ce;
    background: rgba(255, 255, 255, 0.68);
}

.hero-content h1,
.hero-content h2 {
    margin: 18px 0 14px;
    font-size: clamp(2.2rem, 6vw, 4.9rem);
    line-height: 1.04;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.28);
}

.hero-content p {
    max-width: 720px;
    margin: 0 0 22px;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1rem, 1.6vw, 1.24rem);
    line-height: 1.75;
}

.hero-meta,
.movie-meta-line,
.detail-meta-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-meta span,
.movie-meta-line span,
.detail-meta-grid span,
.card-tags span,
.detail-tags span,
.filter-pills button {
    border-radius: 999px;
    padding: 5px 11px;
    background: rgba(255, 255, 255, 0.62);
    color: #5b21b6;
    font-size: 0.82rem;
    font-weight: 650;
}

.hero-meta span {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
}

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

.primary-button,
.ghost-button,
.full-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 12px 22px;
    font-weight: 800;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.primary-button {
    color: #ffffff;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
    box-shadow: 0 14px 28px rgba(168, 85, 247, 0.28);
}

.ghost-button {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(18px);
}

.primary-button:hover,
.ghost-button:hover,
.full-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(31, 38, 135, 0.22);
}

.hero-dots {
    position: absolute;
    left: clamp(28px, 7vw, 72px);
    bottom: 22px;
    display: flex;
    gap: 8px;
    z-index: 4;
}

.hero-dot {
    width: 34px;
    height: 8px;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.42);
    transition: width 0.25s ease, background 0.25s ease;
}

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

.section-block {
    margin-bottom: 58px;
}

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

.section-heading h2,
.page-hero h1,
.detail-content h1,
.detail-content h2,
.site-footer h2,
.category-overview-card h2 {
    margin: 0;
    background: linear-gradient(135deg, #667eea, #764ba2, #f093fb);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.section-heading h2 {
    font-size: clamp(1.55rem, 3vw, 2.2rem);
}

.section-heading a {
    color: #6d28d9;
    font-weight: 750;
}

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

.category-chip {
    padding: 20px;
}

.category-chip span {
    display: block;
    font-weight: 850;
    font-size: 1.12rem;
    margin-bottom: 8px;
}

.category-chip small {
    display: block;
    color: #64748b;
    line-height: 1.6;
}

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

.movie-card a {
    display: block;
    height: 100%;
}

.poster-wrap {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.22);
}

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

.movie-card:hover .poster-wrap img,
.wide-card:hover img,
.category-overview-card:hover img,
.ranking-row:hover img {
    transform: scale(1.08);
}

.poster-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.68), transparent 58%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.movie-card:hover .poster-wrap::after {
    opacity: 1;
}

.poster-meta,
.rank-badge,
.play-mark {
    position: absolute;
    z-index: 2;
    border-radius: 999px;
    font-weight: 800;
}

.poster-meta {
    right: 12px;
    top: 12px;
    padding: 6px 10px;
    color: #ffffff;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(16px);
}

.rank-badge {
    left: 12px;
    top: 12px;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #f59e0b, #ec4899);
}

.play-mark {
    left: 50%;
    top: 50%;
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    color: #7e22ce;
    background: rgba(255, 255, 255, 0.85);
    transform: translate(-50%, -50%) scale(0.72);
    opacity: 0;
    transition: all 0.3s ease;
}

.movie-card:hover .play-mark {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

.movie-card-body h3,
.wide-card h3,
.ranking-row h3 {
    margin: 0 0 8px;
    color: #263142;
    font-size: 1.04rem;
    line-height: 1.35;
}

.movie-card-body p,
.wide-card p,
.ranking-row p,
.category-overview-card p,
.page-hero p,
.detail-content p,
.site-footer p {
    color: #64748b;
    line-height: 1.75;
}

.movie-card-body p {
    min-height: 3.4em;
    margin: 0 0 12px;
    font-size: 0.92rem;
}

.card-tags,
.detail-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 12px;
}

.movie-meta-line span {
    color: #64748b;
    background: rgba(255, 255, 255, 0.56);
}

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

.wide-card a {
    display: grid;
    grid-template-columns: 170px 1fr;
    gap: 18px;
    padding: 16px;
    align-items: center;
}

.wide-card img,
.ranking-row img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 18px;
    transition: transform 0.4s ease;
}

.wide-card p {
    margin: 8px 0 12px;
}

.scroll-row {
    display: flex;
    gap: 18px;
    overflow-x: auto;
    padding: 4px 4px 18px;
}

.movie-card-compact {
    flex: 0 0 220px;
}

.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
}

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

.ranking-list-full {
    grid-template-columns: 1fr;
}

.ranking-row a {
    display: grid;
    grid-template-columns: 54px 86px 1fr;
    gap: 16px;
    padding: 12px;
    align-items: center;
}

.ranking-row strong {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #ffffff;
    background: linear-gradient(135deg, #8b5cf6, #ec4899);
}

.ranking-row span {
    display: block;
    color: #7e22ce;
    font-weight: 700;
    margin-top: 8px;
}

.page-hero {
    padding: clamp(28px, 6vw, 56px);
    margin-bottom: 42px;
}

.page-hero h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    margin: 16px 0;
}

.page-hero p {
    max-width: 860px;
    margin: 0;
    font-size: 1.05rem;
}

.local-search {
    margin-top: 24px;
}

.local-search input {
    width: min(720px, 100%);
}

.local-search-large input {
    font-size: 1.1rem;
    padding: 15px 22px;
}

.filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.filter-pills button {
    border: 0;
}

.category-overview-card a {
    display: block;
    padding: 16px;
}

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

.category-covers img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 14px;
    transition: transform 0.4s ease;
}

.category-overview-card h2 {
    font-size: 1.35rem;
}

.category-overview-card span {
    display: inline-block;
    margin-top: 10px;
    color: #7e22ce;
    font-weight: 800;
}

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

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

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 700;
}

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

.player-card {
    padding: 14px;
    margin-bottom: 24px;
    background: rgba(15, 23, 42, 0.34);
}

.player-frame {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    background: #0f172a;
    aspect-ratio: 16 / 9;
}

.player-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #0f172a;
}

.player-cover {
    position: absolute;
    inset: 0;
    border: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #ffffff;
    background: linear-gradient(0deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.24));
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.player-icon {
    width: 78px;
    height: 78px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    color: #7e22ce;
    background: rgba(255, 255, 255, 0.88);
    font-size: 2rem;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.25);
}

.player-message {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 12px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    pointer-events: none;
}

.detail-content {
    padding: clamp(24px, 5vw, 42px);
}

.detail-content h1 {
    font-size: clamp(2rem, 4vw, 3.25rem);
    margin-bottom: 14px;
}

.detail-one-line {
    font-size: 1.12rem;
    margin-bottom: 20px;
}

.detail-meta-grid {
    margin: 18px 0;
}

.detail-meta-grid a {
    color: #6d28d9;
}

.detail-tags {
    margin: 20px 0 26px;
}

.detail-content h2 {
    margin-top: 28px;
    margin-bottom: 12px;
    font-size: 1.45rem;
}

.poster-card {
    position: sticky;
    top: 102px;
    padding: 16px;
}

.poster-card img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 16px;
}

.full-button {
    width: 100%;
}

.site-footer {
    margin-top: 48px;
    border-width: 1px 0 0;
}

.footer-grid {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 42px 0;
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 32px;
}

.footer-brand {
    margin-bottom: 16px;
}

.site-footer h2 {
    font-size: 1.1rem;
    margin-bottom: 14px;
}

.footer-links {
    display: grid;
    gap: 10px;
}

.footer-links a {
    color: #475569;
    font-weight: 650;
}

.footer-links a:hover {
    color: #7e22ce;
}

.footer-bottom {
    width: min(1280px, calc(100% - 32px));
    margin: 0 auto;
    padding: 18px 0 32px;
    color: #64748b;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

[data-card].is-hidden {
    display: none;
}

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

    .menu-toggle {
        display: inline-grid;
        place-items: center;
        margin-left: auto;
    }

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

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

    .poster-card {
        position: static;
        max-width: 360px;
        margin: 0 auto;
    }
}

@media (max-width: 760px) {
    .site-header-inner {
        height: 68px;
        padding: 0 16px;
    }

    .brand {
        font-size: 1.15rem;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
    }

    .page-main {
        width: min(100% - 20px, 1280px);
        padding-top: 92px;
    }

    .hero-section,
    .hero-stage {
        min-height: 480px;
        height: 480px;
    }

    .hero-content {
        left: 20px;
        right: 20px;
        bottom: 56px;
    }

    .hero-actions {
        gap: 10px;
    }

    .primary-button,
    .ghost-button {
        padding: 10px 16px;
    }

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

    .wide-card a {
        grid-template-columns: 122px 1fr;
    }

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

    .ranking-row strong {
        width: 34px;
        height: 34px;
    }

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

    .player-frame {
        border-radius: 18px;
    }
}

@media (max-width: 460px) {
    .movie-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

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

    .movie-card-body p,
    .card-tags,
    .movie-meta-line {
        display: none;
    }

    .wide-card a {
        grid-template-columns: 1fr;
    }

    .movie-card-compact {
        flex-basis: 170px;
    }

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