/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    width: 100%;
    max-width: 500px;
    text-align: center;
}

h1, h2, h3 {
    margin-bottom: 15px;
    color: #4a4a4a;
}

p {
    margin-bottom: 20px;
}

/* Form Styles */
form {
    margin: 20px 0;
}

input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.primary-btn {
    background-color: #4CAF50;
    color: white;
}

.primary-btn:hover {
    background-color: #45a049;
}

.secondary-btn {
    background-color: #f44336;
    color: white;
}

.secondary-btn:hover {
    background-color: #d32f2f;
}

.btn-group {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.btn-group .btn {
    flex: 1;
}

/* Utility Classes */
.hidden {
    display: none;
}

/* Fullscreen Popup Styles */
.fullscreen-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(76, 175, 80, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: white;
    cursor: pointer;
}

.popup-content {
    text-align: center;
    padding: 30px;
    max-width: 80%;
}

.popup-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: white;
}

.popup-content p {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.divider {
    margin: 20px 0;
    text-align: center;
    position: relative;
}

.divider::before, .divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 45%;
    height: 1px;
    background-color: #ddd;
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

/* Scanner Styles */
.scanner-container {
    margin: 20px 0;
}

#preview {
    width: 100%;
    height: 300px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 15px;
}

/* QR Code Styles */
#qr-code {
    margin: 20px auto;
    max-width: 200px;
}

/* Message Styles */
.message {
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
}

.success {
    background-color: #dff0d8;
    border: 1px solid #d6e9c6;
    color: #3c763d;
}

.error {
    background-color: #f2dede;
    border: 1px solid #ebccd1;
    color: #a94442;
}

/* Error Message Styles */
.error-message {
    color: #dc3545;
    font-size: 14px;
    margin: -10px 0 15px;
    text-align: left;
    padding: 5px 0;
}

.error-message.hidden {
    display: none;
}

/* Guest Info Styles */
.guest-info {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
}

/* Date and Venue Styles */
.date, .venue {
    font-style: italic;
    color: #666;
}

/* Scanner specific styles */
.scanner-container {
    position: relative; /* Needed for absolute positioning of elements inside if required */
    margin-bottom: 15px;
}

#scanner {
    width: 100%; /* Make scanner responsive */
    max-width: 400px; /* Limit max width */
    margin: 0 auto 10px auto; /* Center and add space below */
    border: 1px solid #ddd; /* Optional border */
    position: relative; /* For potential overlays */
    background-color: #f0f0f0; /* Placeholder background */
    min-height: 200px; /* Ensure it has some height */
}

#scanner video {
    width: 100% !important; /* Override library styles if needed */
    height: auto !important;
    display: block; /* Remove extra space below video */
}

#camera-select {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 10px auto;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
}

#camera-select.hidden {
    display: none;
}

.scan-status {
    display: block;
    width: 100%;
    max-width: 400px;
    margin: 5px auto 10px auto;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    background-color: #e0e0e0;
    color: #333;
}

.scan-status.hidden {
    display: none;
}

.scan-status.error {
    background-color: #f8d7da; /* Light red for errors */
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Visual feedback on successful scan */
.scan-success-visual {
    outline: 3px solid #28a745; /* Green outline */
    outline-offset: -3px; /* Draw outline inside */
    transition: outline 0.1s ease-in-out;
}


/* Responsive Styles */
@media (max-width: 600px) {
    .card {
        padding: 20px;
    }
    
    .btn-group {
        flex-direction: column;
    }
    
    #preview {
        height: 200px;
    }
}