* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color: #fff;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

header {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

header h1 {
    font-size: 2.2rem;
    background: linear-gradient(90deg, #00dbde, #fc00ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 15px;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 50px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #4CAF50;
    animation: pulse 2s infinite;
}

.status-indicator.active {
    background: #4CAF50;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 25px;
}

.left-panel, .right-panel {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.camera-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.camera-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.video-wrapper {
    position: relative;
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    background: #000;
    margin-bottom: 20px;
    border: 3px solid rgba(255, 255, 255, 0.1);
}

video, canvas {
    width: 100%;
    height: auto;
    display: block;
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

.detection-stats {
    display: flex;
    justify-content: space-around;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 20px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 0.9rem;
    color: #aaa;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #00dbde;
}

.attendance-log {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-grow: 1;
}

.attendance-list {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 15px;
}

.attendance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.attendance-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.attendance-time {
    color: #00dbde;
    font-weight: bold;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #888;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #444;
}

.registration-form, .system-info {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    color: #ddd;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: white;
    font-size: 1rem;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #00dbde;
    box-shadow: 0 0 10px rgba(0, 219, 222, 0.3);
}

.capture-section {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
}

.capture-instructions {
    background: rgba(0, 219, 222, 0.1);
    border-left: 4px solid #00dbde;
    padding: 10px 15px;
    margin: 15px 0;
    font-size: 0.9rem;
    color: #aaa;
}

.face-preview {
    width: 100%;
    height: 150px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed rgba(255, 255, 255, 0.2);
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #00dbde, #fc00ff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: #00dbde;
}

.stat-label {
    font-size: 0.9rem;
    color: #aaa;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(90deg, #00dbde, #0099ff);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 219, 222, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-success {
    background: linear-gradient(90deg, #00b09b, #96c93d);
    color: white;
    width: 100%;
}

.btn-capture {
    background: linear-gradient(90deg, #fc00ff, #9d00ff);
    color: white;
    width: 100%;
    margin-top: 10px;
}

.notification-center {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.notification {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-top: 15px;
    border-left: 4px solid #00dbde;
}

.notification-icon {
    font-size: 1.2rem;
    color: #00dbde;
}

.notification-content {
    flex-grow: 1;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, #1a2a3a, #2a3a4a);
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.loading-spinner {
    width: 80px;
    height: 80px;
    border: 5px solid rgba(255, 255, 255, 0.1);
    border-top: 5px solid #00dbde;
    border-radius: 50%;
    margin: 0 auto 30px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.result-icon {
    font-size: 5rem;
    margin-bottom: 20px;
}

.result-icon.success {
    color: #4CAF50;
}

.result-icon.error {
    color: #f44336;
}

.result-details {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    text-align: left;
}

@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}



.camera-hint {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.action-buttons {
    margin-top: 15px;
    text-align: center;
}

.btn-capture:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-capture:disabled:hover {
    transform: none;
    box-shadow: none;
}

.face-preview canvas {
    width: 100%;
    height: 150px;
    border-radius: 10px;
    border: 2px solid #00dbde;
    box-shadow: 0 5px 15px rgba(0, 219, 222, 0.3);
}