* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    overflow: hidden;
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.header p {
    opacity: 0.9;
    font-size: 14px;
}

.content {
    padding: 30px;
}

.credits{
    text-align: right;
    margin-top: 15px;
    font-size: 12px;
    color: #999;
    
}

/* Login Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.form-group input {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 14px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

/* Scanner Interface */
.scanner-interface {
    display: none;
}

#reader {
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 10px;
    width: 100%;
}

.controls {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.controls button {
    flex: 1;
}

/* Result Modal */
.result-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    z-index: 1000;
    max-width: 400px;
    width: 90%;
}

.result-modal.show {
    display: block;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.result-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.result-icon.valid {
    background: #d4edda;
    color: #28a745;
}

.result-icon.invalid {
    background: #f8d7da;
    color: #dc3545;
}

.result-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}

.result-team {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
    font-weight: 600;
}

.result-details {
    font-size: 14px;
    color: #999;
    margin-bottom: 20px;
    line-height: 1.6;
}

.team-ginette {
    color: #667eea;
}

.team-hoche {
    color: #a24b4b;
}

.team-vip {
    color: #d4af37;
}

.team-staff {
    color: #af64ec;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.overlay.show {
    display: block;
}

/* History */
.history {
    margin-top: 30px;
}

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

.history-list {
    max-height: 300px;
    overflow-y: auto;
}

.history-item {
    padding: 5px;
    border: 2px solid #f0f0f0;
    border-radius: 10px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-item.valid {
    border-color: #d4edda;
    background: #f8fff9;
}

.history-item.invalid {
    border-color: #f8d7da;
    background: #fff8f8;
}

.history-info {
    flex: 1;
}

.history-time {
    font-size: 12px;
    color: #999;
    margin-bottom: 0px;
}

.history-status {
    font-weight: 600;
    font-size: 14px;
}

.history-status.valid {
    color: #28a745;
}

.history-status.invalid {
    color: #dc3545;
}

.history-status.invalid-staff {
    color: #bcbcbc;
}

.history-team {
    font-weight: 600;
    font-size: 16px;
}

.empty-history {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.user-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info strong {
    color: #667eea;
}

.btn-logout {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-weight: 600;
    padding: 5px 10px;
}

.btn-logout:hover {
    text-decoration: underline;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.loading {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Camera Permission Screen */
.camera-permission {
    display: none;
    text-align: center;
}

.camera-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.camera-permission h2 {
    font-size: 22px;
    margin-bottom: 15px;
    color: #333;
}

.camera-permission p {
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

.permission-status {
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    font-weight: 600;
}

.permission-status.granted {
    background: #d4edda;
    color: #28a745;
}

.permission-status.denied {
    background: #f8d7da;
    color: #dc3545;
}

