/* ================= CSS VARIABLES & ROOT ================= */
:root {
    --primary: #0066ff;
    --primary-hover: #0052cc;
    --primary-light: #eff6ff;
    --success: #10b981;
    --success-hover: #059669;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --warning: #f59e0b;
    --warning-hover: #d97706;
    --bg-main: #f4f7fc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

/* ================= GLOBAL RESET ================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ================= CONTAINER ================= */
.container {
    width: 95%;
    max-width: 900px;
    margin: 40px auto;
}

/* ================= HEADINGS ================= */
h1 {
    color: var(--text-main);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 15px;
}

h2 {
    color: var(--text-main);
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
    margin-top: 20px;
}

/* ================= CARD ================= */
.card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--radius-lg);
    margin: 25px 0;
    border: 1px solid rgba(0, 0, 0, 0.03);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

/* ================= NAVBAR ================= */
.navbar {
    background: var(--card-bg);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    color: var(--primary);
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu {
    display: flex;
    gap: 24px;
    list-style: none;
    align-items: center;
}

.menu a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s ease;
}

.menu a:hover, .menu a.active {
    color: var(--primary);
}

/* ================= BUTTONS ================= */
button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 102, 255, 0.15);
}

button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px -1px rgba(0, 102, 255, 0.25);
}

button:active {
    transform: translateY(1px);
}

.btn-secondary {
    background: #edf2f7;
    color: var(--text-main);
    box-shadow: none;
}
.btn-secondary:hover {
    background: #e2e8f0;
    box-shadow: none;
}

.btn-success { background: var(--success); box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.15); }
.btn-success:hover { background: var(--success-hover); box-shadow: 0 6px 12px -1px rgba(16, 185, 129, 0.25); }

.btn-danger { background: var(--danger); box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.15); }
.btn-danger:hover { background: var(--danger-hover); box-shadow: 0 6px 12px -1px rgba(239, 68, 68, 0.25); }

.btn-warning { background: var(--warning); color: #fff; box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.15); }
.btn-warning:hover { background: var(--warning-hover); box-shadow: 0 6px 12px -1px rgba(245, 158, 11, 0.25); }

/* ================= INPUTS & FORMS ================= */
input, textarea, select {
    width: 100%;
    padding: 14px 16px;
    margin: 12px 0;
    border-radius: var(--radius-md);
    border: 2px solid var(--border-color);
    background-color: #f8fafc;
    font-size: 15px;
    color: var(--text-main);
    outline: none;
    transition: all 0.2s ease;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--primary);
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
}

/* ================= QUIZ BOX & QUESTIONS ================= */
.quiz-box {
    width: 150%;
    max-width: 720px;
    margin: 40px auto;
    background: var(--card-bg);
    padding: 35px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.question { display: none; }
.question.active {
    display: block;
    animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Option Labels */
.option-label {
    display: flex;
    gap: 14px;
    align-items: center;
    background: #f8fafc;
    padding: 16px;
    margin: 14px 0;
    border-radius: var(--radius-md);
    cursor: pointer;
    border: 2px solid var(--border-color);
    font-weight: 500;
    transition: all 0.2s ease;
}

.option-label:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.option-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.option-label.selected {
    background: var(--primary-light);
    border-color: var(--primary);
}

img {
    max-width: 100%;
    height: auto;
    max-height: 260px;
    border-radius: var(--radius-md);
    margin: 15px auto;
    display: block;
    box-shadow: var(--shadow-sm);
}

.buttons {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.buttons button { flex: 1; }

/* ================= TIMER & PROGRESS ================= */
#timer {
    text-align: center;
    color: var(--danger);
    font-size: 18px;
    font-weight: 700;
    background: #fef2f2;
    padding: 8px 16px;
    border-radius: 30px;
    border: 1px solid #fee2e2;
    display: inline-block;
    margin: 0 auto 15px auto;
}

.progress-container {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 25px;
}

#progressBar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), #00d2ff);
    border-radius: 10px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================= QUESTION PALETTE ================= */
.palette {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 25px 0;
}

.palette button {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: none;
    padding: 0;
}

.notAnswered {
    background: #f1f5f9;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}
.notAnswered:hover {
    background: #e2e8f0;
    color: var(--text-main);
}

.current {
    background: var(--warning);
    color: white;
    border: 1px solid var(--warning);
}

.answered {
    background: #d1fae5;
    color: var(--success-hover);
    border: 1px solid #a7f3d0;
}
.answered:hover {
    background: #a7f3d0;
}

/* ================= TABLES ================= */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 20px 0;
}

th {
    background: #f8fafc;
    color: var(--text-muted);
    font-weight: 600;
    padding: 16px;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
}

td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
}

tr:hover td {
    background-color: #f8fafc;
}

/* ================= COOKIE BOX ================= */
#cookieBox {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 480px;
    background: #1e293b;
    color: white;
    padding: 16px 24px;
    border-radius: 50px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

#cookieBox p { font-size: 14px; font-weight: 500; margin: 0; color: #cbd5e1; }
#cookieBox button { padding: 8px 18px; font-size: 14px; border-radius: 30px; background: white; color: #1e293b; box-shadow: none; }
#cookieBox button:hover { background: #cbd5e1; }

/* ================= MOBILE RESPONSIVE ================= */
@media (max-width: 600px) {
    body { padding: 10px; }
    .container, .quiz-box { width: 100%; padding: 20px 15px; margin: 20px auto; }
    h1 { font-size: 24px; }
    .navbar { flex-direction: column; gap: 12px; padding: 15px; text-align: center; }
    .menu { gap: 15px; }
    .buttons { flex-direction: column; }
    #cookieBox { flex-direction: column; text-align: center; border-radius: var(--radius-lg); padding: 20px; }
    #cookieBox button { width: 100%; }
    th, td { padding: 12px 8px; font-size: 14px; }
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f4f4f9;
    margin: 0;
    padding: 20px;
}

/* Ibi bishyire hejuru cyane mu dosiye ya CSS yawe */
:root {
    --primary-color: #2563eb; /* Blue nziza y'iki gihe */
    --bg-color: #f8fafc;      /* White-ish grey */
    --text-color: #1e293b;    /* Dark slate */
    --card-bg: #ffffff;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    line-height: 1.8;
}

/* Modern Card Layout */
.container {
    max-width: 700px;
    margin: 40px auto;
    padding: 40px;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

h1 {
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 20px;
}

/* Footer modern links */
footer {
    text-align: center;
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    margin: 0 15px;
    transition: opacity 0.2s;
}

footer a:hover {
    opacity: 0.7;
}

/* Button style (niba ufite ibibazo/ikizamini) */
.btn-primary {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s;
}

.btn-primary:hover {
    background-color: #1d4ed8;
}

.btn-small {
    padding: 8px 16px; /* Gukora button nto */
    font-size: 14px;   /* Inyuguti nto */
    border-radius: 6px;
    background-color: #2563eb;
    color: white;
    text-decoration: none;
    display: inline-block;
}

/* SEO Card special style */
.seo-card {
    border-left: 5px solid var(--primary-color);
    background: #ffffff;
}

.seo-card h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Links inside SEO card */
.seo-card a {
    display: block;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    background: #f8fafc;
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
}

/* Hover effect */
.seo-card a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

.seo-content {
    background: #ffffff;
    padding: 25px;
    margin: 20px 0;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.05);
    border-left: 5px solid #0066ff;
}

.seo-content h2 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #2d3748;
}

.seo-content p {
    font-size: 15px;
    color: #718096;
    line-height: 1.6;
}

.seo-links {
    background: #f8fafc;
    padding: 25px;
    margin: 20px 0;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
}

.seo-links h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #2d3748;
}

.seo-links a {
    display: block;
    padding: 10px 12px;
    margin-bottom: 8px;
    text-decoration: none;
    color: #0066ff;
    font-weight: 500;
    border-radius: 8px;
    transition: 0.2s;
}

.seo-links a:hover {
    background: #e6f0ff;
    padding-left: 18px;
}

/* CSS y'iyo link kugira ngo isa na Button */
.btn-review {
    display: inline-block;
    padding: 10px 20px;
    margin: 10px 0;
    background-color: #f8f9fa; /* Ibala ry'ivu ryoroshye */
    color: #5d3fd3; /* Ibala ry'umutuku/iroza ryijimye */
    border: 1px solid #5d3fd3;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-review:hover {
    background-color: #5d3fd3;
    color: white;
}

.review-box {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.review-box img {
    border-radius: 8px;
    margin: 10px 0;
    border: 1px solid #eee;
}

.correct-answer {
    color: #28a745; /* Icyatsi */
    font-weight: bold;
}




