:root {
    --light-blue: #e3f2fd;
    --green: #e8f5e9;
    --saffron: #fff3e0;
    --violet: #f3e5f5;
    --soft-red: #ffebee;
    --text-dark: #2c3e50;
    --border-color: #b0bec5;
    --primary-btn: #1976d2;
    --primary-btn-hover: #1565c0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f7f9fc;
    color: var(--text-dark);
    line-height: 1.6;
}

header {
    background: var(--text-dark);
    color: #fff;
    padding: 20px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--saffron);
    margin-bottom: 15px;
}

.nav-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

button {
    background-color: var(--primary-btn);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

button:hover {
    background-color: var(--primary-btn-hover);
}

.print-btn {
    background-color: #c62828;
}
.print-btn:hover { background-color: #b71c1c; }

main {
    max-width: 1100px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.disclaimer {
    background: var(--soft-red);
    padding: 10px;
    border-left: 5px solid #d32f2f;
    margin-bottom: 20px;
    font-weight: 500;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.tab-link {
    background-color: #eceff1;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 10px 15px;
}

.tab-link.active {
    background-color: var(--light-blue);
    border-bottom: 3px solid var(--primary-btn);
    font-weight: bold;
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

h2 { color: #1565c0; margin: 20px 0 10px; border-bottom: 2px solid var(--light-blue); padding-bottom: 5px;}
h3 { color: #2e7d32; margin: 15px 0 10px; }

ul, ol { margin-left: 20px; margin-bottom: 15px; }
li { margin-bottom: 8px; }

.example-box {
    background: var(--saffron);
    border-left: 4px solid #ef6c00;
    padding: 15px;
    margin: 15px 0;
    border-radius: 0 4px 4px 0;
    font-weight: 500;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    border: 1px solid var(--border-color);
    padding: 12px;
    text-align: left;
}

th { background-color: var(--light-blue); font-weight: 700; }
tr:nth-child(even) { background-color: #fafafa; }

/* Visual Aids CSS */
.roadmap {
    border-left: 4px solid #8e24aa;
    margin-left: 20px;
    padding-left: 20px;
}

.roadmap-step {
    position: relative;
    margin-bottom: 20px;
    background: var(--violet);
    padding: 10px;
    border-radius: 4px;
}

.roadmap-step::before {
    content: '';
    position: absolute;
    left: -28px;
    top: 10px;
    width: 12px;
    height: 12px;
    background: #8e24aa;
    border-radius: 50%;
}

.mindmap {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    background: #fdfbfb;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.center-node {
    background: #ffb74d;
    padding: 20px;
    border-radius: 50%;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.branch-node {
    background: #81c784;
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: bold;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.flowchart {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 20px 0;
}

.flow-node {
    background: var(--light-blue);
    padding: 12px 20px;
    border-radius: 5px;
    font-weight: bold;
    border: 1px solid var(--primary-btn);
    text-align: center;
}

.flow-arrow {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-btn);
}

/* Question Sections */
.question-block {
    background: #fff;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    margin-bottom: 20px;
}

.question-block p { margin-bottom: 10px; }
.question-block ol { margin-left: 20px; }
.question-block li { margin-bottom: 15px; }

.toggle-answers-btn {
    background-color: #6a1b9a;
    margin: 20px auto;
    display: block;
}

.toggle-answers-btn:hover { background-color: #4a148c; }

.answer-key {
    display: none;
    background: var(--green);
    padding: 20px;
    border: 1px solid #4caf50;
    border-radius: 5px;
    margin-top: 15px;
}

.answer-key ul { list-style-type: none; margin-left: 0; }
.answer-key li { margin-bottom: 5px; }

@media (max-width: 768px) {
    .nav-buttons { flex-direction: column; }
    .tabs { flex-direction: column; }
    .tab-link { text-align: left; }
}

@media print {
    header .nav-buttons, .tabs, .toggle-answers-btn { display: none !important; }
    header { position: static; background: none; color: #000; border-bottom: 2px solid #000; }
    .tab-content, .answer-key { display: block !important; }
    body { background: #fff; font-size: 12pt; }
    main { box-shadow: none; max-width: 100%; margin: 0; padding: 0; }
    .roadmap, .mindmap, .flowchart { break-inside: avoid; }
    table { break-inside: avoid; }
}