/* Cinema theme override — loaded after Vite build */

/* Offset anchor scroll for sticky header */
:root {
    --header-height: 4rem;
}
#player,
[id="player"] {
    scroll-margin-top: var(--header-height);
}
html {
    scroll-padding-top: var(--header-height);
}

html.dark,
.dark {
    --background: #050505 !important;
    --foreground: #f5f5f5 !important;
    --card: #0f0f0f !important;
    --card-foreground: #f5f5f5 !important;
    --popover: #0f0f0f !important;
    --popover-foreground: #f5f5f5 !important;
    --primary: #f5c518 !important;
    --primary-foreground: #0a0a0a !important;
    --secondary: #1a1a1a !important;
    --secondary-foreground: #f5f5f5 !important;
    --muted: #141414 !important;
    --muted-foreground: #a3a3a3 !important;
    --accent: #f5c518 !important;
    --accent-foreground: #0a0a0a !important;
    --destructive: #e50914 !important;
    --border: rgba(245, 197, 24, 0.12) !important;
    --input: rgba(245, 197, 24, 0.15) !important;
    --ring: #f5c518 !important;
}

body {
    background-color: var(--background);
    color: var(--foreground);
}

/* Wider content container */
.container-page {
    max-width: 1400px !important;
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
}

/* Section title with gold/red bar */
.section-title {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--foreground);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0;
}

.section-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 1.25rem;
    border-radius: 2px;
    background: linear-gradient(to bottom, var(--primary), var(--destructive));
}

/* Cinema glow text */
.cinema-glow {
    text-shadow: 0 0 24px rgba(245, 197, 24, 0.35);
}

/* Gold border with subtle glow */
.cinema-border {
    border: 1px solid rgba(245, 197, 24, 0.15);
    box-shadow: 0 0 24px rgba(245, 197, 24, 0.05), inset 0 1px 0 rgba(255,255,255,0.03);
}

/* Header/Footer gold accents */
header.sticky,
footer.border-t {
    border-color: rgba(245, 197, 24, 0.12) !important;
}

/* Button glow on hover */
.btn-primary:hover,
.btn-primary:focus {
    filter: brightness(1.1);
    box-shadow: 0 0 22px rgba(245, 197, 24, 0.35);
}

/* Navigation hover gold */
.nav-link:hover {
    color: var(--primary) !important;
    text-shadow: 0 0 8px rgba(245, 197, 24, 0.35);
}

/* ========== Hero ========== */
.cinema-hero {
    position: relative;
    min-height: 55vh;
    max-height: 55vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 0;
    margin-top: -4rem;
}

@media (min-width: 640px) {
    .cinema-hero { min-height: 60vh; max-height: 60vh; }
}

@media (min-width: 768px) {
    .cinema-hero { min-height: 65vh; max-height: 65vh; }
}

@media (min-width: 1024px) {
    .cinema-hero { min-height: 70vh; max-height: 70vh; }
}

@media (min-width: 1400px) {
    .cinema-hero { min-height: 70vh; max-height: 70vh; }
}

.cinema-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.cinema-hero-bg .hero-bg-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out, transform 8s ease-out;
    transform: scale(1.08);
}

.cinema-hero-bg .hero-bg-slide.active {
    opacity: 1;
    transform: scale(1.12);
}

.cinema-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right, rgba(5,5,5,0.95) 0%, rgba(5,5,5,0.7) 45%, rgba(5,5,5,0.2) 100%),
        linear-gradient(to top, var(--background) 0%, transparent 25%);
    z-index: 1;
}

.cinema-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    min-height: 55vh;
}

.cinema-hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 55vh;
    max-height: 55vh;
    display: flex;
    align-items: center;
    padding: 5rem 0 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease-in-out, transform 0.8s ease-in-out;
    transform: translateX(40px);
    z-index: 1;
}

@media (min-width: 640px) {
    .cinema-hero-slide { min-height: 60vh; max-height: 60vh; }
    .cinema-hero-content { min-height: 60vh; }
}

@media (min-width: 768px) {
    .cinema-hero-slide { min-height: 65vh; max-height: 65vh; }
    .cinema-hero-content { min-height: 65vh; }
}

@media (min-width: 1024px) {
    .cinema-hero-slide { min-height: 70vh; max-height: 70vh; }
    .cinema-hero-content { min-height: 70vh; }
}

@media (min-width: 1400px) {
    .cinema-hero-slide { min-height: 70vh; max-height: 70vh; }
    .cinema-hero-content { min-height: 70vh; }
}

.cinema-hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
    z-index: 10;
}

.cinema-hero-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    padding: 5rem 1rem 2rem;
}

.cinema-hero-info {
    max-width: 900px;
    flex: 1;
    min-width: 0;
}

.cinema-hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.9rem;
    border-radius: 9999px;
    background: var(--primary);
    color: var(--primary-foreground);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 0 16px rgba(245, 197, 24, 0.25);
    margin-bottom: 1rem;
}

.cinema-hero-title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    color: #fff;
    margin: 0 0 1rem;
    text-shadow: 0 0 30px rgba(245, 197, 24, 0.25);
}

.cinema-hero-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    color: #d4d4d4;
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

.cinema-hero-quality {
    padding: 0.15rem 0.6rem;
    border-radius: 4px;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
}

.cinema-hero-desc {
    color: #a3a3a3;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 800px;
}

.cinema-hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

@media (max-width: 639px) {
    .cinema-hero-actions {
        justify-content: center;
        gap: 0.5rem;
    }
    .cinema-hero-actions .btn-primary,
    .cinema-hero-actions .btn-primary.btn-lg {
        flex: 0 0 auto;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    .cinema-hero-actions .cinema-hero-btn {
        flex: 0 0 auto;
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        border-radius: 0.625rem;
    }
    .cinema-hero-actions svg {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }
}

.cinema-hero-actions .btn-primary {
    padding: 0.75rem 1.75rem;
    font-size: 1.05rem;
    border-radius: 0.625rem;
}

.cinema-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.625rem;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.08);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cinema-hero-btn:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(245, 197, 24, 0.5);
    color: var(--primary);
}

.cinema-hero-btn-active {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.625rem;
    border: 1px solid rgba(245, 197, 24, 0.6);
    background: rgba(245, 197, 24, 0.15);
    color: #facc15;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.cinema-hero-btn-active:hover {
    background: rgba(245, 197, 24, 0.25);
    border-color: rgba(245, 197, 24, 0.9);
}

.cinema-hero-poster {
    display: none;
    width: 260px;
    flex-shrink: 0;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 30px rgba(245, 197, 24, 0.15);
    border: 2px solid rgba(245, 197, 24, 0.12);
    aspect-ratio: 2/3;
}

.cinema-hero-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cinema-hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(0,0,0,0.5);
    cursor: pointer;
    transition: background 0.2s;
    backdrop-filter: blur(4px);
}

.cinema-hero-arrow:hover {
    background: rgba(245, 197, 24, 0.25);
}

.cinema-hero-arrow.left { left: 16px; }
.cinema-hero-arrow.right { right: 16px; }

@media (max-width: 639px) {
    .cinema-hero-arrow {
        top: auto;
        bottom: 16px;
        transform: none;
        width: 40px;
        height: 40px;
    }
}

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

.cinema-hero-dots .hero-dot {
    height: 8px;
    border-radius: 4px;
    border: none;
    background: rgba(255,255,255,0.35);
    cursor: pointer;
    transition: all 0.3s;
}

.cinema-hero-dots .hero-dot.active {
    width: 28px;
    background: var(--primary);
}

.cinema-hero-dots .hero-dot:not(.active) {
    width: 8px;
}

@media (min-width: 768px) {
    .cinema-hero { min-height: 85vh; }
    .cinema-hero-slide { min-height: 85vh; }
    .cinema-hero-poster { display: block; width: 220px; }
    .cinema-hero-title { font-size: 3.5rem; }
}

@media (min-width: 1024px) {
    .cinema-hero-poster { width: 280px; }
    .cinema-hero-title { font-size: 4rem; }
    .cinema-hero-slide { gap: 4rem; }
}

/* ========== Horizontal rows ========== */
.cinema-row-section {
    position: relative;
}

.cinema-row-wrapper {
    position: relative;
}

.cinema-row {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 0.5rem 0 1.25rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(245, 197, 24, 0.3) transparent;
}

.cinema-row::-webkit-scrollbar {
    height: 6px;
}

.cinema-row::-webkit-scrollbar-thumb {
    background: rgba(245, 197, 24, 0.3);
    border-radius: 3px;
}

.cinema-row .cinema-card {
    flex: 0 0 auto;
    /* Show 3.5 cards on phones: 3.5w + 3 gaps (0.5rem each) = 100% */
    width: calc((100% - 1.5rem) / 3.5);
    scroll-snap-align: start;
}

.cinema-row-arrow {
    position: absolute;
    top: 38%;
    transform: translateY(-50%);
    z-index: 30;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid rgba(245, 197, 24, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(0,0,0,0.85);
    cursor: pointer;
    transition: all 0.2s;
    opacity: 0.95;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Larger invisible hit area for easier touch on mobile */
.cinema-row-arrow::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
}

.cinema-row-arrow:hover {
    opacity: 1;
    background: rgba(245, 197, 24, 0.35);
    border-color: rgba(245, 197, 24, 0.9);
}

.cinema-row-arrow.left { left: -2px; }
.cinema-row-arrow.right { right: -2px; }

@media (min-width: 640px) {
    .cinema-row .cinema-card { width: 150px; }
    .cinema-row-arrow { width: 44px; height: 44px; }
    .cinema-row-arrow.left { left: -12px; }
    .cinema-row-arrow.right { right: -12px; }
}

@media (min-width: 768px) {
    .cinema-row .cinema-card { width: 165px; }
}

@media (min-width: 1024px) {
    .cinema-row .cinema-card { width: 180px; }
    .cinema-row-arrow.left { left: -18px; }
    .cinema-row-arrow.right { right: -18px; }
}

@media (min-width: 1280px) {
    .cinema-row .cinema-card { width: 190px; }
}

/* ========== Grid (non-slider) ========== */
.cinema-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding: 0.5rem 0 1.25rem;
}

.cinema-grid .cinema-card {
    width: 100%;
}

@media (min-width: 640px) {
    .cinema-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
    .cinema-grid { grid-template-columns: repeat(6, 1fr); }
}

@media (min-width: 1024px) {
    .cinema-grid { grid-template-columns: repeat(6, 1fr); }
}

@media (min-width: 1280px) {
    .cinema-grid { grid-template-columns: repeat(7, 1fr); }
}

/* Related grid: 3/3/6/6/6 (12 items) */
.cinema-grid.related {
    grid-template-columns: repeat(3, 1fr);
}

@media (min-width: 640px) {
    .cinema-grid.related { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
    .cinema-grid.related { grid-template-columns: repeat(6, 1fr); }
}

@media (min-width: 1024px) {
    .cinema-grid.related { grid-template-columns: repeat(6, 1fr); }
}

@media (min-width: 1280px) {
    .cinema-grid.related { grid-template-columns: repeat(6, 1fr); }
}

/* ========== Movie/Series card ========== */
.cinema-card {
    display: block;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: var(--card);
    border: 1px solid rgba(245, 197, 24, 0.08);
}

.cinema-card:hover {
    transform: scale(1.04);
    box-shadow: 0 0 24px rgba(245, 197, 24, 0.12);
    border-color: rgba(245, 197, 24, 0.18);
}

.cinema-poster {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    background-color: #1a1a1a;
}

.cinema-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.cinema-card:hover .cinema-poster img {
    transform: scale(1.05);
    opacity: 0.9;
}

.cinema-poster-glow {
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    pointer-events: none;
    transition: border-color 0.35s ease;
}

.cinema-card:hover .cinema-poster-glow {
    border-color: rgba(245, 197, 24, 0.3);
}

.cinema-sound-badge,
.cinema-type-badge {
    position: absolute;
    top: 0.5rem;
    padding: 0.1rem 0.35rem;
    font-size: 0.5rem;
    font-weight: 600;
    background-color: rgba(0,0,0,0.75);
    color: #f5c518;
    border-radius: 9999px;
    border: none;
    z-index: 10;
}

.cinema-sound-badge { right: 0.35rem; }
.cinema-type-badge { left: 0.35rem; }

.cinema-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 10;
}

.cinema-card:hover .cinema-play {
    opacity: 1;
}

.cinema-play span {
    width: 3rem;
    height: 3rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 197, 24, 0.9);
    color: #000;
    box-shadow: 0 0 20px rgba(245, 197, 24, 0.4);
}

.cinema-info {
    padding: 0.5rem;
}

.cinema-title {
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--foreground);
    transition: color 0.25s ease;
}

@media (max-width: 639px) {
    .cinema-title {
        font-size: 0.6rem;
    }
}

.cinema-card:hover .cinema-title {
    color: #facc15;
}

.cinema-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.cinema-rating {
    color: #facc15;
}

@media (min-width: 640px) {
    .cinema-sound-badge,
    .cinema-type-badge {
        font-size: 0.75rem;
        padding: 0.2rem 0.65rem;
    }
}

/* ========== Global page headings ========== */
.container-page h1,
h1.text-2xl,
h1.text-3xl {
    color: #fff;
    text-shadow: 0 0 20px rgba(245, 197, 24, 0.15);
}

h2.text-xl,
h2.text-2xl,
.section-title {
    color: #fff;
}

/* ========== Active filter badges / pagination override to gold ========== */
.badge[style*="background-color:var(--destructive)"],
.badge[style*="background-color: var(--destructive)"],
button[aria-label*="รายการโปรด"][style*="var(--destructive)"],
button[aria-label*="favorite" i][style*="var(--destructive)"] {
    background-color: var(--primary) !important;
    color: var(--primary-foreground) !important;
    border-color: transparent !important;
}

/* Pagination active/current to gold */
[aria-current="page"][style*="background-color: var(--destructive)"],
[aria-current="page"].bg-destructive,
.pagination-current {
    background-color: var(--primary) !important;
    color: var(--primary-foreground) !important;
    border-color: transparent !important;
}

/* ========== Year / Sound / Category index cards ========== */
.container-page .grid > a.group,
.cinema-index-card {
    display: block;
    border-radius: 0.75rem;
    overflow: hidden;
    background: rgba(245, 197, 24, 0.03);
    border: 1px solid rgba(245, 197, 24, 0.1);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.container-page .grid > a.group:hover,
.cinema-index-card:hover {
    transform: scale(1.04);
    border-color: rgba(245, 197, 24, 0.3);
    box-shadow: 0 0 20px rgba(245, 197, 24, 0.08);
}

.container-page .grid > a.group .text-2xl,
.container-page .grid > a.group .text-lg,
.cinema-index-card .cinema-index-title {
    color: #fff;
    font-weight: 700;
}

.container-page .grid > a.group .text-xs,
.cinema-index-card .cinema-index-meta {
    color: var(--muted-foreground);
}

/* ========== Detail page ========== */
.cinema-detail {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .cinema-detail {
        grid-template-columns: 200px 1fr;
    }
}

@media (min-width: 1024px) {
    .cinema-detail {
        grid-template-columns: 260px 1fr;
    }
}

.cinema-detail-poster {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5), 0 0 24px rgba(245, 197, 24, 0.12);
    border: 2px solid rgba(245, 197, 24, 0.12);
}

.cinema-detail-poster img {
    width: 100%;
    height: auto;
    display: block;
}

.cinema-detail-title {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    text-shadow: 0 0 24px rgba(245, 197, 24, 0.2);
}

.cinema-detail .badge {
    background-color: rgba(255,255,255,0.08);
    color: var(--foreground);
    border: 1px solid rgba(245, 197, 24, 0.12);
}

.cinema-detail .badge:first-of-type,
.cinema-detail .badge:first-child {
    background-color: var(--primary);
    color: var(--primary-foreground);
    border-color: transparent;
}

.cinema-detail a.badge:hover {
    border-color: rgba(245, 197, 24, 0.4);
    color: var(--primary);
}

.cinema-detail-rating {
    color: #facc15;
}

.cinema-detail-desc {
    color: #d4d4d4;
    line-height: 1.75;
}

.cinema-fav-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    border: 1px solid rgba(245, 197, 24, 0.2);
    background: rgba(245, 197, 24, 0.08);
    color: #fff;
}

.cinema-fav-btn:hover {
    background: rgba(245, 197, 24, 0.2);
    color: var(--primary);
}

.cinema-fav-btn.active,
button.cinema-fav-btn[aria-label*="เอาออก"],
button.cinema-fav-btn[aria-label*="remove" i] {
    background-color: var(--primary) !important;
    color: var(--primary-foreground) !important;
    border-color: transparent !important;
}

/* ========== Preview modal ========== */
.cinema-modal-body {
    background-color: var(--card) !important;
    border: 1px solid rgba(245, 197, 24, 0.15);
    box-shadow: 0 25px 70px rgba(0,0,0,0.6), 0 0 30px rgba(245, 197, 24, 0.1);
}

.cinema-modal-body .badge:first-of-type {
    background-color: var(--primary);
    color: var(--primary-foreground);
    border: none;
}

.cinema-modal-body h2 {
    color: #fff;
    text-shadow: 0 0 16px rgba(245, 197, 24, 0.15);
}

.cinema-modal-rating {
    color: #facc15;
}

.cinema-modal-watch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.625rem;
    background-color: var(--primary);
    color: var(--primary-foreground);
    font-weight: 700;
    transition: all 0.2s;
}

.cinema-modal-watch:hover {
    filter: brightness(1.1);
    box-shadow: 0 0 20px rgba(245, 197, 24, 0.3);
}

.cinema-modal-fav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.625rem;
    border: 1px solid rgba(245, 197, 24, 0.25);
    background: rgba(245, 197, 24, 0.08);
    color: #fff;
    transition: all 0.2s;
}

.cinema-modal-fav:hover,
.cinema-modal-fav.active {
    background: rgba(245, 197, 24, 0.2);
    color: var(--primary);
}

.cinema-modal-close {
    padding: 0.75rem 1.25rem;
    border-radius: 0.625rem;
    border: 1px solid rgba(245, 197, 24, 0.15);
    color: var(--foreground);
    background: transparent;
    transition: all 0.2s;
}

.cinema-modal-close:hover {
    border-color: rgba(245, 197, 24, 0.4);
    color: var(--primary);
}

/* ========== My list ========== */
.cinemy-list-card {
    display: block;
    border-radius: 0.75rem;
    overflow: hidden;
    background-color: var(--card);
    border: 1px solid rgba(245, 197, 24, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.cinemy-list-card:hover {
    transform: scale(1.04);
    border-color: rgba(245, 197, 24, 0.18);
    box-shadow: 0 0 24px rgba(245, 197, 24, 0.12);
}

.cinemy-list-card img {
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.cinemy-list-card:hover img {
    transform: scale(1.05);
    opacity: 0.9;
}

.cinemy-list-card .poster-wrap {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    background-color: #1a1a1a;
}

.cinemy-list-card .poster-glow {
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    pointer-events: none;
    transition: border-color 0.35s ease;
}

.cinemy-list-card:hover .poster-glow {
    border-color: rgba(245, 197, 24, 0.3);
}

.cinemy-list-card .type-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.125rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 9999px;
    background-color: rgba(0,0,0,0.75);
    color: #f5c518;
    z-index: 10;
}

.cinemy-list-card .sound-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.125rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 9999px;
    background-color: rgba(0,0,0,0.75);
    color: #f5c518;
    z-index: 10;
}

.cinemy-list-card .meta {
    padding: 0.5rem;
}

.cinemy-list-card .title {
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--foreground);
    transition: color 0.25s ease;
}

.cinemy-list-card:hover .title {
    color: #facc15;
}

.cinemy-list-card .sub {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.cinemy-list-card .rating {
    color: #facc15;
}

/* ========== Contact page ========== */
.cinema-contact-card {
    border-radius: 1rem;
    background: rgba(245, 197, 24, 0.03);
    border: 1px solid rgba(245, 197, 24, 0.12);
    padding: 1.5rem;
}

.cinema-contact-card a:hover {
    color: var(--primary);
}

/* ========== Genre nav ========== */
.genre-sticky {
    border-color: rgba(245, 197, 24, 0.12) !important;
    background: rgba(10, 10, 10, 0.6) !important;
}

.genre-sticky .badge {
    background: rgba(245, 197, 24, 0.06);
    border: 1px solid rgba(245, 197, 24, 0.12);
    color: rgba(255,255,255,0.85);
}

.genre-sticky .badge:hover {
    background: rgba(245, 197, 24, 0.15);
    color: #fff;
}

/* ========== Media player wrapper ========== */
.cinema-player-wrap {
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid rgba(245, 197, 24, 0.12);
    box-shadow: 0 0 30px rgba(245, 197, 24, 0.05);
}

/* ========== Detail page hero (cinematic) ========== */
.cinema-detail-hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: flex-start;
    overflow: hidden;
    padding: 0;
    margin-top: -4rem;
}

@media (min-width: 768px) {
    .cinema-detail-hero { min-height: 85vh; }
}

.cinema-detail-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.cinema-detail-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(4px) brightness(0.65);
    transform: scale(1.08);
}

.cinema-detail-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to right, rgba(5,5,5,0.95) 0%, rgba(5,5,5,0.75) 50%, rgba(5,5,5,0.35) 100%),
        linear-gradient(to top, var(--background) 0%, transparent 30%),
        linear-gradient(to bottom, transparent 60%, var(--background) 100%);
    z-index: 1;
}

.cinema-detail-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 3rem;
    padding-top: 5rem;
    padding-bottom: 8rem;
}

.cinema-detail-hero-info {
    max-width: 900px;
    flex: 1;
}

.cinema-detail-hero-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.cinema-detail-hero-badges .badge:first-of-type,
.cinema-detail-hero-badges .badge:first-child {
    background-color: var(--primary);
    color: var(--primary-foreground);
    border-color: transparent;
}

.cinema-detail-hero-badges .badge {
    background-color: rgba(255,255,255,0.08);
    color: var(--foreground);
    border: 1px solid rgba(245, 197, 24, 0.12);
}

.cinema-detail-hero-badges a.badge:hover {
    border-color: rgba(245, 197, 24, 0.4);
    color: var(--primary);
}

.cinema-detail-hero-title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    margin: 0 0 0.75rem;
    text-shadow: 0 0 30px rgba(245, 197, 24, 0.2);
}

.cinema-detail-hero-subtitle {
    color: var(--muted-foreground);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.cinema-detail-hero-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    color: #d4d4d4;
    font-size: 0.95rem;
    margin-bottom: 1.25rem;
}

.cinema-detail-hero-meta a:hover {
    color: var(--primary);
}

.cinema-detail-hero-desc {
    color: #a3a3a3;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 800px;
}

.cinema-detail-hero-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.cinema-detail-hero-actions .btn-primary {
    padding: 0.75rem 1.75rem;
    font-size: 1.05rem;
    border-radius: 0.625rem;
}

.cinema-detail-hero-poster {
    display: none;
    width: 260px;
    flex-shrink: 0;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 30px rgba(245, 197, 24, 0.15);
    border: 2px solid rgba(245, 197, 24, 0.12);
    aspect-ratio: 2/3;
}

.cinema-detail-hero-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (min-width: 768px) {
    .cinema-detail-hero { min-height: 85vh; }
    .cinema-detail-hero-poster { display: block; width: 220px; }
    .cinema-detail-hero-title { font-size: 3.5rem; }
}

@media (min-width: 1024px) {
    .cinema-detail-hero-poster { width: 280px; }
    .cinema-detail-hero-title { font-size: 4rem; }
    .cinema-detail-hero-content { gap: 4rem; }
}

/* Detail page body */
.cinema-detail-body {
    position: relative;
    z-index: 5;
    padding: 0 0 2rem;
    margin-top: -15rem;
}

.cinema-detail-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--muted-foreground);
    transition: color 0.2s;
}

.cinema-detail-back:hover {
    color: var(--primary);
}

/* ========== Back to top ========== */
.cinema-back-to-top {
    background-color: var(--primary) !important;
    color: var(--primary-foreground) !important;
}

/* ========== My List cards (targeting existing markup) ========== */
.my-list-card {
    background-color: var(--card) !important;
    border: 1px solid rgba(245, 197, 24, 0.08) !important;
    border-radius: 0.75rem;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.my-list-card:hover {
    transform: scale(1.04);
    border-color: rgba(245, 197, 24, 0.18) !important;
    box-shadow: 0 0 24px rgba(245, 197, 24, 0.12);
}

.my-list-card img {
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.my-list-card:hover img {
    transform: scale(1.05);
    opacity: 0.9;
}

.my-list-card .badge {
    background-color: rgba(0,0,0,0.75) !important;
    color: #f5c518 !important;
    border: none !important;
}

.my-list-card .relative.aspect-\[2\/3\] {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    background-color: #1a1a1a;
}

.my-list-card h3 {
    color: var(--foreground);
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.25s ease;
}

.my-list-card:hover h3 {
    color: #facc15;
}

.my-list-card .text-xs {
    color: var(--muted-foreground);
}

.my-list-card .text-xs span:last-child {
    color: #facc15;
}

/* My list active filter / tab overrides */
.container-page button.rounded-full[style*="var(--destructive)"],
.container-page button[aria-label*="รายการ"][style*="var(--destructive)"],
.container-page button[aria-label*="favorite" i][style*="var(--destructive)"] {
    background-color: var(--primary) !important;
    color: var(--primary-foreground) !important;
    border-color: transparent !important;
}

/* My list active tab bottom border */
.container-page button.border-b-2[style*="border-color: var(--destructive)"] {
    border-color: var(--primary) !important;
}

/* My list remove / clear buttons hover */
.my-list-item button:hover {
    color: var(--primary);
}

/* ========== Nunglnw text logo ========== */
.nunglnw-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    text-decoration: none;
}

.nunglnw-logo-icon {
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px rgba(229, 9, 20, 0.3));
    transition: transform 0.2s;
}

.nunglnw-logo:hover .nunglnw-logo-icon {
    transform: scale(1.05);
}

.nunglnw-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.nunglnw-wordmark {
    font-family: 'Mitr', 'Kanit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    background: linear-gradient(90deg, #E50914 0%, #B00610 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #E50914;
}

.nunglnw-tagline {
    font-family: 'Mitr', 'Kanit', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.2;
    color: #f5c518;
    letter-spacing: 0.08em;
    margin-top: 2px;
}

/* Footer logo */
.nunglnw-footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
}

.nunglnw-footer-logo .nunglnw-wordmark {
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    background: none;
}

@media (max-width: 640px) {
    .nunglnw-wordmark { font-size: 1.25rem; }
    .nunglnw-tagline { font-size: 0.6rem; }
    .nunglnw-logo-icon { width: 30px; height: 30px; }
}
