:root {
    --bg-dark: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --secondary: #ec4899;
    --secondary-hover: #db2777;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --seat-available: #334155;
    --seat-reserved: #f59e0b;
    --seat-sold: #ef4444;
    --seat-selected: #22c55e;
    --seat-vip: #8b5cf6;
}

/* Custom Scrollbar for Horizontal Scroll */
.custom-scrollbar::-webkit-scrollbar {
    height: 10px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.5);
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.8);
}

/* ------------------------------------- */
/* CINEMA ROOM LAYOUT (ABSOLUTE)         */
/* ------------------------------------- */
.cinema-room {
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
    position: relative;
    max-width: 900px;
    margin: 0 auto 3rem;
}

.screens-container {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 70px;
    perspective: 1000px;
    z-index: 10;
}

.side-screen, .main-screen {
    position: absolute;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0.3) 0%, transparent 100%);
    box-shadow: 0 10px 20px rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: rgba(255,255,255,0.5);
    border-radius: 4px 4px 0 0;
    transform: rotateX(-45deg);
    transform-origin: bottom center;
    border: 1px solid rgba(255,255,255,0.2);
    border-bottom: none;
}

.screen-left {
    left: 110px; /* คลุม F1 ถึง A8 */
    width: 90px; 
    height: 50px;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.main-screen {
    left: 210px; /* คลุม A7 ถึง A2 */
    width: 230px; 
    height: 70px;
    letter-spacing: 5px;
    font-size: 1.2rem;
}

.screen-right {
    left: 450px; /* เริ่มที่ A1 ไปทางขวา ขนาดเท่า Screen 2 ซ้าย */
    width: 90px;
    height: 50px;
    font-size: 0.9rem;
    letter-spacing: 2px;
}

.room-layout {
    display: flex;
    justify-content: center;
    gap: 30px;
    position: relative;
    padding-bottom: 0;
    margin-bottom: 55px; /* space for control room */
    padding-top: 120px;
}

.left-section, .middle-section, .right-section {
    position: relative;
    display: flex;
    flex-direction: column;
}

.seat-block {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    width: 140px;
}

.control-room {
    position: absolute;
    bottom: -55px;
    left: 0;
    width: 80px;
    height: 45px;
    border: 2px solid #ef4444;
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.8rem;
    font-weight: bold;
}

/* walkway is now handled inline with Tailwind in booking.ejs */

.seat {
    aspect-ratio: 1;
    background-color: var(--seat-available);
    border-radius: 8px 8px 4px 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
    border-bottom: 4px solid rgba(0,0,0,0.3);
}
.seat:hover:not(.sold):not(.reserved):not(.selected) {
    transform: scale(1.1);
    background-color: #475569;
}
.seat.vip {
    border-color: var(--seat-vip);
}
.seat.reserved {
    background-color: var(--seat-reserved);
    cursor: not-allowed;
}
.seat.sold {
    background-color: var(--seat-sold);
    cursor: not-allowed;
    opacity: 0.5;
}
.seat.selected {
    background-color: var(--seat-selected);
    transform: scale(1.1);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}
