body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #f5f5f5;
    position: relative;
    min-height: 100vh;
}

.login-container, .monitoring, .dashboard {
    text-align: center;
    padding: 20px;
    background: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    width: 100%;
    max-width: 400px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

input {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

button {
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background-color: #0056b3;
}

#resendOtpBtn {
    background-color: #6c757d;
}

video {
    border: 2px solid #ddd;
    border-radius: 10px;
    margin-top: 10px;
    max-width: 100%;
}

.hidden {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

.d-none {
    display: none;
}

.exam-container {
    width: 100%;
    max-width: 800px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.exam-header {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
    margin-bottom: 20px;
}

.exam-metrics, .monitoring-metrics {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

.exam-metrics span, .monitoring-metrics span {
    background: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    color: #555;
}

.monitoring-results {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

#monitoringMetrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

#monitoringMetrics p {
    background: white;
    padding: 10px;
    border-radius: 4px;
    margin: 0;
}

.warning {
    color: #dc3545;
    font-weight: bold;
}

.success {
    color: #28a745;
    font-weight: bold;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.dashboard-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.report-container {
    width: 100%;
    max-width: 800px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.trust-metrics {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.guide-container {
    width: 100%;
    max-width: 600px;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: block;
    opacity: 1;
    visibility: visible;
}

.guide-content {
    text-align: left;
}

.guide-content ul {
    margin: 20px 0;
    padding-left: 20px;
}

.guide-content ul li {
    margin: 10px 0;
    color: #555;
    padding-left: 24px;
    position: relative;
}

.guide-content ul li:before {
    content: "•";
    position: absolute;
    left: 8px;
    color: #007bff;
}

.diagnostics-results {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.diagnostics-results p {
    margin: 10px 0;
    padding: 8px;
    background: white;
    border-radius: 4px;
}

.question {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.options label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: white;
    border-radius: 4px;
    cursor: pointer;
}

#examTimer, #trustScore {
    font-weight: bold;
    color: #555;
}

.monitoring {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    width: 200px !important;
    height: 150px !important;
    background: transparent !important;
    border: 2px solid #ddd !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    z-index: 1000 !important;
}

.monitoring video {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 8px !important;
}

.monitoring p {
    margin: 5px 0;
    font-size: 12px;
    color: #555;
    text-align: center;
}

/* Hide monitoring metrics during exam */
.monitoring-metrics {
    display: none;
}

.camera-check-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    text-align: center;
}

.modal-content video {
    width: 100%;
    max-width: 480px;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.modal-content ul {
    text-align: left;
    margin: 20px auto;
    max-width: 400px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.hidden {
    display: none !important;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 12px 24px;
    border-radius: 4px;
    color: white;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.3s ease;
    z-index: 9999;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-info { background: #3498db; }
.toast-success { background: #2ecc71; }
.toast-warning { background: #f1c40f; }
.toast-error { background: #e74c3c; }

/* Trust Score */
.trust-score-container {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
}

.trust-score-value {
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 5px;
}

.trust-score-bar {
    height: 8px;
    background: #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.trust-score-fill {
    height: 100%;
    transition: width 0.3s ease;
}

/* Timer Display */
.timer-display {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.timer-value {
    font-size: 20px;
    font-weight: bold;
    position: relative;
    z-index: 1;
}

.timer-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: #3498db;
    transition: width 1s linear;
}

/* Monitoring Status */
.monitoring-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 4px;
    background: #f5f5f5;
}

.monitoring-status.warning {
    background: #fff3cd;
    color: #856404;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Transitions */
.section {
    transition: opacity 0.3s ease;
}

.hidden {
    display: none;
    opacity: 0;
}

/* Update transition styles */
.guide-container,
.login-container,
.dashboard,
.exam-container,
.report-container {
    transition: opacity 0.3s ease;
    opacity: 1;
}

/* Update modal styles to ensure proper z-index */
.system-check-modal,
.camera-check-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    text-align: center;
}

.modal-content video {
    width: 100%;
    max-width: 480px;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.modal-content ul {
    text-align: left;
    margin: 20px auto;
    max-width: 400px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

/* Analysis styles */
.analysis-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.analysis-section h3 {
    color: #333;
    margin-bottom: 15px;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 10px;
}

.metric-item {
    background: white;
    padding: 12px;
    border-radius: 6px;
    margin: 10px 0;
}

.metric-item p {
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.success {
    color: #28a745;
    font-weight: bold;
}

.warning {
    color: #dc3545;
    font-weight: bold;
}

/* Return to dashboard button */
#returnToDashboard {
    display: block;
    margin: 20px auto;
    padding: 12px 24px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

#returnToDashboard:hover {
    background-color: #0056b3;
}
