/* style.css - Sidebar + Question Card Layout */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
    background-color: #f4f7f6;
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex; /* Makes the body a flex container */
    overflow: hidden; /* Prevents double scrollbars */
}

/* --- LEFT SIDEBAR (Question Navigator) --- */
.sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.sidebar h3 { margin-top: 0; font-size: 1.1rem; color: #333; }

.question-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 buttons per row */
    gap: 10px;
    margin-top: 20px;
}

.q-nav-btn {
    width: 100%;
    aspect-ratio: 1; /* Makes them square */
    border: 1px solid #d1d5db;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
    font-size: 0.9rem;
    padding: 0;
}

/* Status Colors for the Grid */
.q-nav-btn:hover { background: #f3f4f6; }
.q-nav-btn.active-slide { border-color: #3182ce; color: #3182ce; border-width: 2px; }
.q-nav-btn.answered { background-color: #10b981; color: white; border-color: #10b981; }

/* --- RIGHT MAIN CONTENT (The Exam) --- */
.main-content {
    flex-grow: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
}

.exam-card {
    background: white;
    width: 100%;
    max-width: 700px;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    height: 80vh;
    display: flex;
    flex-direction: column;
}

/* Timer Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-weight: 700;
    color: #4b5563;
}

#timer { color: #ef4444; font-size: 1.2rem; }

/* Questions */
.question-item {
    display: none; /* Hidden by default */
    flex-grow: 1;
    overflow-y: auto;
}
.question-item.active { display: block; animation: fadeIn 0.3s; }

.question-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 25px;
    display: block;
}

/* Answer Options (Same as before but tweaked) */
.options { display: flex; flex-direction: column; gap: 12px; }
.options input { display: none; } /* Hide radio circle */

.options label {
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    color: #374151;
    transition: 0.2s;
    display: block;
}

.options label:hover { background: #f9fafb; border-color: #d1d5db; }
.options input:checked + span { color: #2563eb; }
.options label:has(input:checked) { 
    border-color: #2563eb; 
    background: #eff6ff; 
}

/* Buttons */
.nav-buttons {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
}
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
}
.btn-prev { background: #e5e7eb; color: #374151; }
.btn-next { background: #2563eb; color: white; }
.btn-submit { background: #059669; color: white; display: none; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Mobile Responsive */
@media (max-width: 768px) {
    body { flex-direction: column; }
    .sidebar { width: 100%; height: auto; padding: 10px; border-bottom: 1px solid #ddd; display: none; } /* Hide sidebar on mobile for now or make it collapsible */
    .main-content { padding: 10px; }
    .exam-card { height: 85vh; padding: 20px; }
}