/* Crucial for consistent math */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: #1a1a1a;
    color: #eee;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
}

.container {
    margin-top: 40px;
    text-align: center;
    width: 1000px; 
    max-width: 98vw;
}

/* --- CONTROLS --- */
.controls {
    background: #2a2a2a;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #444;
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: center;
}

select, button {
    padding: 10px;
    border-radius: 4px;
    font-size: 14px;
    border: none;
    cursor: pointer;
}

select { background: #444; color: white; border: 1px solid #555; }
button { background: #007bff; color: white; transition: 0.2s; }
button:hover { background: #0056b3; }

/* --- BYPASS BUTTON --- */
.bypass-btn {
    background: #28a745;
    border: 1px solid #1e7e34;
    font-weight: bold;
    min-width: 160px;
}
.bypass-btn:hover { background: #218838; }

.bypass-btn.bypassed {
    background: #dc3545;
    border-color: #bd2130;
    animation: pulse 2s infinite;
}
.bypass-btn.bypassed:hover { background: #c82333; }

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

/* --- THEATER MAP --- */
.theater-box {
    background: #000;
    border: 4px solid #555;
    padding: 30px;
    border-radius: 4px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: center; 
}

.stage {
    background: #333;
    color: #888;
    height: 60px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 2px dashed #555;
    font-weight: bold;
    width: 60%;
    border-radius: 0 0 10px 10px;
}

/* --- SEATS & LAYOUT --- */
.seating-area {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: fit-content; 
    margin: 0 auto;
    align-items: center; 
}

.theater-row {
    position: relative; 
    display: flex;
    justify-content: center; 
    gap: 6px;
    width: 100%;
}

.row-label {
    position: absolute;
    left: -40px; 
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    color: #555;
    font-weight: bold;
    text-align: right;
    font-size: 12px;
}

.seat {
    width: 32px;
    height: 32px;
    background: #222;
    border: 1px solid #444;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #888;
    transition: all 0.2s;
    user-select: none;
    flex-shrink: 0;
}

.seat:hover { background: #555; color: white; transform: scale(1.15); z-index: 10; }
.seat.active { background: #007bff; color: white; border-color: #00aaff; box-shadow: 0 0 10px rgba(0, 123, 255, 0.6); transform: scale(1.1); }

/* === SW BUTTON STYLE (UPDATED) === */
.sw-button {
    width: 184px; 
    height: 32px;
    
    /* FIX: Match exact colors of .seat */
    background: #222; 
    border: 1px solid #444;
    color: #888;
    
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    transition: all 0.2s;
    user-select: none;
    flex-shrink: 0;
}

/* FIX: Match hover effects of .seat */
.sw-button:hover { 
    background: #555; 
    color: white; 
    border-color: #444;
}

.sw-button.active { 
    background: #007bff; 
    border-color: #00aaff; 
    color: white;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.6); 
}

/* === ALIGNMENT FIXES === */
.row-gap-top { margin-top: 40px; }
.aisle-spacer { margin-left: 50px; }
.right-aligned-fix { padding-right: 76px; }