body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f2f5;
    margin: 0;
    padding: 1rem;
    color: #333;
    box-sizing: border-box;
}

.container {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-align: center;
    width: 100%;
    max-width: 700px;
}

h1 {
    color: #0056b3;
}

.uid-container {
    margin: 1.5rem 0;
    padding: 0.75rem;
    background-color: #e9ecef;
    border-radius: 5px;
    font-size: 1.1rem;
    color: #495057;
}

.uid-container strong {
    color: #000;
}

.camera-container {
    margin: 20px auto;
    border: 3px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    position: relative;
    background-color: #000;
}

#video {
    width: 100%;
    height: auto;
    display: block;
    transform: scaleX(-1); /* Mirror effect for front camera */
}

.controls button {
    font-size: 1rem;
    padding: 12px 24px;
    margin: 5px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    font-weight: 500;
}
.controls button:active {
    transform: scale(0.98);
}

#startButton {
    background-color: #28a745;
    color: white;
}
#startButton:hover:not(:disabled) {
    background-color: #218838;
}

#verifyButton {
    background-color: #007bff;
    color: white;
}
#verifyButton:hover:not(:disabled) {
    background-color: #0056b3;
}
button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.result-container {
    margin-top: 20px;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    min-height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
}

/* Dynamic classes for results */
.result-success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.result-error { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.result-loading { background-color: #e2e3e5; color: #383d41; border: 1px solid #d6d8db; }

/* Simple spinner for loading */
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}