:root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --primary: #4CAF50;
    --primary-dark: #388E3C;
    --danger: #f44336;
    --warning: #ff9800;
    --vip: #FFD700;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow: hidden; /* Prevent scrolling when scanning */
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--card-bg);
    border-bottom: 1px solid #333;
    z-index: 10;
}

.header-title h1 {
    font-size: 1.2rem;
    margin-bottom: 4px;
}

.header-title p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.stats-box {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

/* Scanner Area */
.scanner-section {
    flex: 1;
    position: relative;
    background-color: #000;
    display: flex;
    flex-direction: column;
}

#reader {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

#reader video {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* Result Overlay */
.result-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 20;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.result-overlay.hidden {
    display: none;
}

.result-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    text-align: center;
    animation: popIn 0.3s ease-out;
}

@keyframes popIn {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.btn-close {
    position: absolute;
    top: 15px; right: 15px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.guest-info {
    margin-bottom: 25px;
    margin-top: 10px;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 10px;
    background: var(--text-secondary);
    color: #fff;
}

.badge.vip {
    background: var(--vip);
    color: #000;
}

.guest-info h2 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.rsvp-info {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Stepper */
.actual-pax-control {
    background: #2a2a2a;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 25px;
}

.actual-pax-control label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.pax-stepper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.btn-stepper {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: #444;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
}

.btn-stepper:active {
    background: #555;
}

#actualPaxInput {
    width: 60px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.8rem;
    font-weight: bold;
    text-align: center;
}

.btn-confirm {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: none;
    background: var(--primary);
    color: #fff;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.btn-confirm:active {
    background: var(--primary-dark);
}

.btn-confirm:disabled {
    background: #555;
    cursor: not-allowed;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    gap: 15px;
}

.loading-overlay i {
    font-size: 3rem;
    color: var(--primary);
}
