/* RISC Interactive Study Guide - Main Styles */

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --secondary: #6366f1;
    --success: #22c55e;
    --danger: #ef4444;
    --warning: #f59e0b;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--gray-100);
    color: var(--gray-900);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

header {
    background-color: var(--primary);
    color: white;
    padding: 1.5rem;
    text-align: center;
    border-radius: 8px 8px 0 0;
    margin-top: 1rem;
}

.app-container {
    background-color: white;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Navigation and mode switcher styles */
.topic-navigation {
    display: flex;
    background-color: var(--gray-200);
    padding: 0.5rem;
    overflow-x: auto;
    white-space: nowrap;
}

.topic-button {
    background-color: var(--gray-200);
    border: none;
    padding: 0.5rem 1rem;
    margin-right: 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.topic-button:hover {
    background-color: var(--gray-300);
}

.topic-button.active {
    background-color: var(--primary);
    color: white;
}

.mode-switcher {
    display: flex;
    padding: 0.5rem;
    background-color: var(--gray-200);
    justify-content: center;
    border-bottom: 1px solid var(--gray-300);
}

.mode-switch-button {
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.mode-switch-button.active {
    background-color: var(--primary);
    color: white;
}

.mode-switch-button:not(.active) {
    background-color: white;
    color: var(--gray-800);
    border: 1px solid var(--gray-300);
}

.content-area {
    padding: 2rem;
    min-height: 400px;
}

/* Common content styles */
.section-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-dark);
    border-bottom: 2px solid var(--gray-200);
    padding-bottom: 0.5rem;
}

/* Quiz mode specific styles */
.question-container {
    margin-bottom: 2rem;
}

.question {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.option {
    background-color: var(--gray-100);
    border: 2px solid var(--gray-300);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.option:hover {
    background-color: var(--gray-200);
}

.option.selected {
    border-color: var(--primary);
    background-color: rgba(59, 130, 246, 0.1);
}

.option.correct {
    border-color: var(--success);
    background-color: rgba(34, 197, 94, 0.1);
}

.option.incorrect {
    border-color: var(--danger);
    background-color: rgba(239, 68, 68, 0.1);
}

.option-marker {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--gray-300);
    color: white;
    text-align: center;
    line-height: 24px;
    margin-right: 10px;
    font-weight: bold;
}

.option.selected .option-marker {
    background-color: var(--primary);
}

.option.correct .option-marker {
    background-color: var(--success);
}

.option.incorrect .option-marker {
    background-color: var(--danger);
}

.option-text {
    flex: 1;
}

.result-icon {
    margin-left: 10px;
    display: none;
}

.option.correct .result-icon.correct,
.option.incorrect .result-icon.incorrect {
    display: inline;
}

.action-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
}

.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--gray-300);
}

.btn-outline:hover {
    background-color: var(--gray-200);
}

.btn-success {
    background-color: var(--success);
    color: white;
}

.btn-success:hover {
    background-color: #16a34a;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.explanation {
    margin-top: 1.5rem;
    background-color: var(--gray-100);
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid var(--secondary);
}

.explanation-header {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.progress-bar-container {
    height: 6px;
    background-color: var(--gray-200);
    border-radius: 3px;
    margin: 1rem 0;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: right;
    font-size: 0.875rem;
    color: var(--gray-700);
    margin-top: 0.25rem;
}

.navigation-buttons {
    display: flex;
    gap: 0.5rem;
}

.navigation-buttons button {
    flex: 1;
}

.completion-message {
    text-align: center;
    padding: 2rem;
}

.completion-message h2 {
    color: var(--success);
    margin-bottom: 1rem;
}

.score-display {
    font-size: 1.25rem;
    margin: 1rem 0;
}

.score-value {
    font-weight: bold;
    color: var(--primary);
}

/* Study guide specific styles */
.study-guide-content {
    padding: 0 1rem;
}

.study-guide-section {
    margin-bottom: 2rem;
}

.study-guide-topic {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin: 1.5rem 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-300);
}

.study-guide-subtopic {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 1.25rem 0 0.75rem 0;
}

.study-guide-content p {
    margin-bottom: 1rem;
}

.study-guide-content ul, 
.study-guide-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.study-guide-content li {
    margin-bottom: 0.5rem;
}

.info-box {
    background-color: rgba(59, 130, 246, 0.1);
    border-left: 4px solid var(--primary);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 6px 6px 0;
}

.warning-box {
    background-color: rgba(245, 158, 11, 0.1);
    border-left: 4px solid var(--warning);
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 0 6px 6px 0;
}

.key-concept {
    font-weight: 600;
    color: var(--primary-dark);
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

th, td {
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
}

th {
    background-color: var(--gray-200);
    font-weight: 600;
    text-align: left;
}

tr:nth-child(even) {
    background-color: var(--gray-100);
}

.print-button {
    margin-top: 1rem;
    display: block;
}

/* Custom icons */
.icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    stroke-width: 2;
    stroke: currentColor;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .content-area {
        padding: 1rem;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .navigation-buttons {
        flex-direction: column;
    }

    .study-guide-content {
        padding: 0;
    }
}

/* Print styles */
@media print {
    body {
        background-color: white;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    header, .topic-navigation, .mode-switcher, .action-buttons, 
    .btn, .print-button, .progress-bar-container, .progress-text {
        display: none !important;
    }

    .app-container {
        box-shadow: none;
        border-radius: 0;
    }

    .content-area {
        padding: 0;
    }

    .study-guide-content {
        padding: 0;
    }
}