/* Microtopic Common Styles */
:root {
    --mt-primary: #8e44ad;
    --mt-secondary: #34495e;
    --mt-bg: #f8f9fa;
    --mt-card-bg: #ffffff;
    --mt-text: #333333;
    --mt-text-light: #666666;
    --mt-success: #2ecc71;
    --mt-danger: #e74c3c;
    --mt-border: #e0e0e0;
}

body {
    background-color: var(--mt-bg);
    color: var(--mt-text);
}

.microtopic-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 1rem;
}

/* Header */
.mt-header {
    text-align: center;
    margin-bottom: 2rem;
}

.mt-header h1 {
    color: var(--mt-primary);
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

/* Tabs Navigation */
.mt-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--mt-border);
    padding-bottom: 1rem;
}

.mt-tab-btn {
    background: transparent;
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--mt-text-light);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mt-tab-btn:hover {
    background: rgba(142, 68, 173, 0.1);
    color: var(--mt-primary);
}

.mt-tab-btn.active {
    background: var(--mt-primary);
    color: #fff;
}

/* Tab Content */
.mt-tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.mt-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Notes Section */
.sci-concept-card {
    background: linear-gradient(145deg, #ffffff, #fdfbfd);
    border-left: 5px solid var(--mt-primary);
    border-radius: 12px;
    padding: 1.8rem;
    box-shadow: 0 8px 20px rgba(142, 68, 173, 0.06);
    margin-bottom: 2rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    animation: slideUp 0.5s ease-out backwards;
}

.sci-concept-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(142, 68, 173, 0.12);
}

.sci-concept-card h2 {
    color: var(--mt-primary);
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 2px dashed rgba(142, 68, 173, 0.2);
    padding-bottom: 0.5rem;
}

/* Visual Graphics & SVG Diagrams */
.visual-aids-container {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
    margin-top: 1rem;
}

.visual-aid-box {
    background: #ffffff;
    border: 1px solid var(--mt-border);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.02);
}

.svg-container {
    width: 100%;
    overflow-x: auto;
    text-align: center;
    background: #fdfbfd;
    padding: 1.5rem 1rem;
    border-radius: 8px;
    border: 1px dashed rgba(142, 68, 173, 0.3);
}

.svg-container svg {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

/* Grids for chunking */
.sci-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.sci-box {
    background: #fff;
    border: 1px solid var(--mt-border);
    border-radius: 8px;
    padding: 1.2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.sci-box i {
    font-size: 2rem;
    color: var(--mt-primary);
    opacity: 0.2;
    position: absolute;
    top: -10px;
    right: -10px;
}

.sci-box-title { font-weight: 700; color: var(--mt-secondary); margin-bottom: 0.5rem; }
.sci-box-val { font-size: 1.2rem; color: var(--mt-primary); font-weight: 600; }
.sci-badge {
    display: inline-block;
    background: rgba(142, 68, 173, 0.1);
    color: var(--mt-primary);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-family: monospace;
    font-weight: bold;
    margin-top: 0.5rem;
}

/* Active Recall Styling */
.active-recall-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    border-bottom: 1px solid var(--mt-border);
    flex-wrap: wrap;
    gap: 1rem;
}

.blur-reveal {
    filter: blur(6px);
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
    padding: 0.2rem 0.5rem;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    font-weight: bold;
    color: var(--mt-primary);
}

.blur-reveal:hover, .blur-reveal.revealed {
    filter: blur(0);
    background: transparent;
}

/* Instrument List */
.instrument-list {
    column-count: 2;
    column-gap: 2rem;
    list-style: none;
    padding: 0;
}

.instrument-list li {
    margin-bottom: 0.8rem;
    break-inside: avoid;
    background: #f8f9fa;
    padding: 0.5rem 0.8rem;
    border-radius: 6px;
    border-left: 3px solid var(--mt-secondary);
}

@media (max-width: 768px) {
    .instrument-list { column-count: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseElement {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.85; filter: drop-shadow(0 0 8px rgba(142,68,173,0.4)); }
    100% { transform: scale(1); opacity: 1; }
}
.svg-pulse { animation: pulseElement 2.5s infinite; transform-origin: center; }

/* Question Cards */
.question-card {
    background: var(--mt-card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--mt-primary);
}

.q-text {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.options-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-btn {
    text-align: left;
    padding: 0.8rem 1rem;
    border: 1px solid var(--mt-border);
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.option-btn:hover:not(:disabled) {
    background: rgba(142, 68, 173, 0.05);
    border-color: var(--mt-primary);
}

.option-btn.correct {
    background: rgba(46, 204, 113, 0.1);
    border-color: var(--mt-success);
    color: var(--mt-success);
    font-weight: bold;
}

.option-btn.wrong {
    background: rgba(231, 76, 60, 0.1);
    border-color: var(--mt-danger);
    color: var(--mt-danger);
    font-weight: bold;
}

.explanation {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background: #f1f8ff;
    border-left: 3px solid #3498db;
    border-radius: 4px;
    font-size: 0.95rem;
}

.explanation.show {
    display: block;
}

/* Mock Test Controls */
.mock-progress-container {
    width: 100%;
    background: var(--mt-border);
    height: 8px;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}
.mock-progress-bar {
    height: 100%;
    background: var(--mt-primary);
    width: 0%;
    transition: width 0.3s ease;
}

#submit-mock {
    display: block;
    width: 100%;
    padding: 1rem;
    background: var(--mt-primary);
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 2rem;
}

#mock-result {
    margin-top: 1.5rem;
    font-size: 1.5rem;
    text-align: center;
}