/* ================================================
   biology/styles.css — Biology-specific overrides
   Base styles loaded from ../shared/css/subject-base.css
   ================================================ */

/* ---- Biology colours ---- */
:root {
    --primary: #2ecc71;
    --primary-light: #e8f8f0;
}

/* ---- Topic tags — biology variants ---- */
.topic-tag.cells { background: #e8f5e9; color: #2e7d32; }
.topic-tag.biochem { background: #efebe9; color: #5d4037; }
.topic-tag.gas { background: #e0f7fa; color: #00838f; }
.topic-tag.resp { background: #ffebee; color: #c62828; }
.topic-tag.photo { background: #e8f5e9; color: #1b5e20; }
.topic-tag.org { background: #ffebee; color: #c62828; }
.topic-tag.infect { background: #fff8e1; color: #e65100; }
.topic-tag.energy { background: #e8f5e9; color: #1b5e20; }
.topic-tag.homeo { background: #e3f2fd; color: #1565c0; }
.topic-tag.nervous { background: #e3f2fd; color: #1565c0; }
.topic-tag.hormonal { background: #fce4ec; color: #ad1457; }
.topic-tag.inherit { background: #f3e5f5; color: #6a1b9a; }
.topic-tag.eco { background: #e0f2f1; color: #00695c; }
.topic-tag.anthro { background: #fff3e0; color: #e65100; }
.topic-tag.biotech { background: #ede7f6; color: #4527a0; }

/* ---- MC Options (not in base) ---- */
.mc-options { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.mc-option {
    flex: 1; min-width: 180px; padding: 12px 16px; border: 2px solid var(--border);
    border-radius: 12px; background: #fff; cursor: pointer; font-size: 0.95rem;
    font-weight: 500; text-align: center; transition: all 0.2s;
}
.mc-option:hover:not(:disabled) { border-color: var(--primary); background: var(--primary-light); }
.mc-option.correct { border-color: var(--success); background: var(--success-light); font-weight: 700; }
.mc-option.incorrect { border-color: var(--error); background: var(--error-light); }
.mc-option.disabled { opacity: 0.5; }
.mc-option:disabled { cursor: default; }

/* ---- Calculator — biology-specific box-shadow ---- */
.calc-btn {
    box-shadow: 0 4px 16px rgba(46,204,113,0.4);
}
.calc-btn:hover { background: #27ae60; }

/* ---- Loading screen — biology gradient ---- */
.loading-screen {
    background: linear-gradient(135deg, #0a1e0f 0%, #1b3d2a 40%, #1a2e1a 70%, #0f3d1f 100%);
}

/* Loading icon animations (biology-specific SVG keyframes) */
.loading-arc {
    animation: arc-draw 2s ease-in-out infinite;
    transform-origin: center;
}
@keyframes arc-draw {
    0% { stroke-dashoffset: 264; }
    50% { stroke-dashoffset: 66; }
    100% { stroke-dashoffset: 264; }
}
.loading-orbit { animation: orbit-pulse 3s ease-in-out infinite; }
.loading-orbit:nth-child(4) { animation-delay: 0.5s; }
.loading-orbit:nth-child(5) { animation-delay: 1s; }
@keyframes orbit-pulse {
    0%,100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}
.loading-electron {
    animation: electron-orbit 2s linear infinite;
    transform-origin: 50px 50px;
}
@keyframes electron-orbit { to { transform: rotate(360deg); } }

/* Loading bar — biology gradient */
.loading-bar {
    background: linear-gradient(90deg, #2ecc71, #27ae60, #1abc9c);
}

/* ---- TTS Reader Bar ---- */
.tts-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; padding: 8px 12px; background: var(--bg-subtle, #f5f6fa); border-radius: 10px; border: 1px solid var(--border); }
.tts-btn { width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--primary); color: #fff; font-size: 0.85rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform 0.15s, opacity 0.2s; flex-shrink: 0; }
.tts-btn:hover { transform: scale(1.1); }
.tts-btn:active { transform: scale(0.95); }
.tts-speed { background: var(--primary-light, #eef0ff); color: var(--primary); font-weight: 700; font-size: 0.7rem; width: auto; padding: 0 10px; border-radius: 8px; }
.tts-voice-select { border: 1px solid var(--border); border-radius: 8px; padding: 4px 8px; font-size: 0.75rem; background: var(--card); color: var(--text); max-width: 140px; cursor: pointer; }
.tts-label { font-size: 0.78rem; color: var(--text-light); margin-left: 4px; }
body.dark-mode .tts-bar { background: rgba(255,255,255,0.06); }
.tts-word { cursor: default; border-radius: 3px; transition: background 0.2s, color 0.2s; }
.tts-word-ready { background: var(--primary-light, #eef0ff); color: var(--primary); cursor: pointer; }
body.dark-mode .tts-word-ready { background: rgba(67,97,238,0.2); }

/* ---- Marks badge (not in base) ---- */
.marks-badge { display: inline-block; padding: 4px 12px; border-radius: 16px; font-size: 0.75rem; font-weight: 700; background: #e8eaf6; color: #283593; }

/* ---- Paper Generator — biology-specific colours ---- */
.topic-tag.paper { background: linear-gradient(135deg, #27ae60, #2ecc71); color: #fff; }

.pg-context-box {
    background: #edf7ed; border-left: 4px solid #2ecc71;
    padding: 18px 20px; border-radius: 0 var(--radius) var(--radius) 0;
    margin-bottom: 16px; font-size: 0.92rem; line-height: 1.6;
}
.pg-context-title { font-weight: 700; font-size: 1rem; margin-bottom: 8px; color: #27ae60; }
.pg-topic-label {
    display: inline-block; padding: 2px 8px; border-radius: 10px;
    background: #27ae60; color: #fff; font-size: 0.7rem; font-weight: 700;
    margin-right: 8px; vertical-align: middle;
}
.pg-grade-circle {
    display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
    width: 100px; height: 100px; border-radius: 50%;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    box-shadow: 0 4px 20px rgba(46,204,113,0.3); margin-bottom: 16px;
}
.pg-q-topic { display: inline-block; padding: 2px 8px; border-radius: 10px; background: #27ae60; color: #fff; font-size: 0.68rem; font-weight: 700; }
.pg-nav-btn.answered { background: #e8eaf6; border-color: #7986cb; }

/* Dark mode — biology-specific pg overrides */
body.dark-mode .pg-context-box { background: rgba(46,204,113,0.1); border-left-color: #2ecc71; }
body.dark-mode .pg-context-title { color: #2ecc71; }
body.dark-mode .pg-nav-btn.active { background: rgba(46,204,113,0.15); }

/* ---- Dark Mode — biology --primary-light override ---- */
body.dark-mode {
    --primary-light: rgba(46,204,113,0.15);
}
body.dark-mode .mc-option { background: var(--card); border-color: #333; color: var(--text); }
body.dark-mode .mc-option:hover:not(:disabled) { border-color: var(--primary); background: var(--primary-light); }
body.dark-mode .mc-option.correct { border-color: var(--success); background: var(--success-light); }
body.dark-mode .mc-option.incorrect { border-color: var(--error); background: var(--error-light); }
body.dark-mode .lb-table th { background: rgba(46,204,113,0.15); }
body.dark-mode .marks-badge { background: rgba(40,57,147,0.2); color: #90caf9; }
