/* Photo Booth Main Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    height: 100vh;
}

/* Customer Preview Side */
.customer-side {
    flex: 2;
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    margin: 10px;
}

.preview-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
    border-radius: 15px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

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

.frame-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 2;
}

.template-selector {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.template-card {
    width: 120px;
    height: 80px;
    border: 3px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.template-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.template-card.active {
    border-color: #ff6b6b;
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.5);
}

.template-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.template-card:hover::after {
    opacity: 1;
}

/* Photographer Control Side */
.control-side {
    flex: 1;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    margin: 10px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.control-panel {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.control-panel h3 {
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
}

.camera-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    color: #666;
}

.camera-controls {
    margin-bottom: 15px;
}

.reconnect-btn {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    font-weight: bold;
    color: white;
    background: linear-gradient(45deg, #17a2b8, #138496);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.reconnect-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.4);
}

.reconnect-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

.external-camera-indicator {
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
}

.pc-camera-indicator {
    background: linear-gradient(45deg, #ffc107, #e0a800);
    color: #333;
    padding: 8px 12px;
    border-radius: 5px;
    margin-bottom: 10px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
}

.mode-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.mode-btn {
    flex: 1;
    padding: 10px;
    font-size: 14px;
    font-weight: bold;
    color: #666;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-btn.active {
    color: white;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border-color: #667eea;
}

.mode-btn:hover:not(.active) {
    background: #e9ecef;
    border-color: #dee2e6;
}

.gif-progress {
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.progress-text {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(45deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
}

.capture-btn {
    width: 100%;
    padding: 15px;
    font-size: 24px;
    font-weight: bold;
    color: white;
    background: linear-gradient(45deg, #ff6b6b, #ee5a52);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 10px;
}

.capture-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
}

.capture-btn:active {
    transform: translateY(0);
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.print-btn {
    flex: 1;
    padding: 12px;
    font-size: 16px;
    color: white;
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.print-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.4);
}

.print-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.gif-btn {
    flex: 1;
    padding: 12px;
    font-size: 16px;
    color: white;
    background: linear-gradient(45deg, #ff6b6b, #ffa500);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gif-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.gif-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.status-display {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    border-left: 4px solid #007bff;
}

.status-text {
    color: #333;
    font-weight: 500;
}

.printer-status {
    margin-top: 10px;
    font-weight: bold;
    font-size: 14px;
}

.countdown {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 120px;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
    z-index: 10;
    display: none;
}

.flash-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    opacity: 0;
    z-index: 5;
    pointer-events: none;
}

.captured-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    display: none;
}

@keyframes flash {
    0% { opacity: 0; }
    50% { opacity: 0.8; }
    100% { opacity: 0; }
}

.flash-animation {
    animation: flash 0.3s ease-out;
}

/* QR Modal Styles */
.qr-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.qr-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.qr-content h3 {
    margin-bottom: 20px;
    color: #333;
}

.qr-code {
    margin: 20px 0;
    display: flex;
    justify-content: center;
}

.qr-instructions {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.qr-close-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.qr-close-btn:hover {
    background: #0056b3;
}

/* Mini Photo Previews */
.mini-photos {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-top: 10px;
    flex-wrap: wrap;
}

.mini-photo {
    width: 60px;
    height: 40px;
    border: 2px solid #ddd;
    border-radius: 5px;
    object-fit: cover;
}

.mini-photo.captured {
    border-color: #28a745;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
    }
    
    .customer-side {
        flex: 1;
    }
    
    .control-side {
        flex: none;
        height: auto;
    }
    
    .template-card {
        width: 80px;
        height: 60px;
    }
}

@media (max-width: 768px) {
    .control-side {
        padding: 10px;
        gap: 10px;
    }
    
    .control-panel {
        padding: 15px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .mode-selector {
        flex-direction: column;
    }
}