/* ============================================================
   QAZAQ BIO LAB — 10-сынып зертханаларына ортақ симулятор стилі
   (10-1.html ... 10-8.html файлдарына ортақ)
   common.css үстіне қосылады.
   ============================================================ */

:root {
    --glass-card: rgba(6, 95, 70, 0.6);
    --accent-cyan: #22d3ee;
    --text-main: #ecfdf5;
}

/* Фон анимациясы */
.background-cells {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: -1; overflow: hidden;
    background: radial-gradient(circle at center, #064e3b 0%, #022c22 90%);
}
.cell {
    position: absolute; border-radius: 50%;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.15) 0%, transparent 70%);
    border: 1px solid rgba(52, 211, 153, 0.1);
    animation: float 20s linear infinite; bottom: -100px; width: 120px; height: 120px;
}
@keyframes float { 0% { transform: translateY(0); opacity:0; } 50% { opacity:0.6; } 100% { transform: translateY(-110vh); opacity:0; } }

.content { flex: 1; position: relative; overflow-y: auto; padding: 20px; }
.page { display: none; animation: slideUp 0.6s ease; max-width: 900px; margin: 0 auto; }
.page.active { display: block; }
@keyframes slideUp { from{ opacity:0; transform: translateY(20px);} to { opacity:1; transform: translateY(0);} }

h1 { color: var(--accent-green); border-bottom: 1px solid var(--accent-green); padding-bottom: 10px; }
h2 { color: #6ee7b7; }
.card { background: rgba(0,0,0,0.3); border-radius: 15px; padding: 20px; margin-bottom: 20px; border: var(--glass-border); }
.card ul { color:#d1fae5; margin-left: 20px; line-height: 1.7; }
.page-num { color:#6ee7b7; font-size:0.8rem; letter-spacing:1px; }

/* --- SIMULATOR --- */
#sim-wrapper {
    display: none;
    flex-direction: column; width: 100%; height: 100%; min-height: 560px;
    background: radial-gradient(circle at bottom, #134e4a, #064e3b);
    border-radius: 20px; border: 2px solid #059669;
    position: relative; overflow: hidden;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.6);
}

.assistant-container {
    position: absolute; bottom: -20px; left: 20px; z-index: 100;
    display: flex; align-items: flex-end; pointer-events: none;
}
.char-img { width: 180px; filter: drop-shadow(0 0 10px rgba(0,0,0,0.5)); }
.dialogue-box {
    position: absolute; left: 160px; bottom: 150px;
    background: rgba(0, 0, 0, 0.85); color: var(--accent-cyan);
    padding: 15px 25px; border-radius: 20px 20px 20px 0;
    border: 1px solid var(--accent-cyan);
    font-family: 'Courier New', monospace; font-size: 1.05rem;
    max-width: 420px; min-height: 60px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex; align-items: center;
}
@keyframes popIn { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.lab-shelf {
    position: absolute; top: 0; left: 0; width: 100%; min-height: 130px;
    background: linear-gradient(180deg, #374151, #1f2937);
    border-bottom: 5px solid #111827;
    display: flex; justify-content: center; flex-wrap: wrap; gap: 24px; padding: 18px 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5); z-index: 10;
}
.lab-bench {
    position: absolute; bottom: 0; width: 100%; height: 360px;
    display: flex; justify-content: center; align-items: flex-end; padding-bottom: 40px; gap: 40px;
}

.reagent { width: 60px; cursor: pointer; position: relative; transition: 0.2s; display: flex; flex-direction: column; align-items: center; }
.reagent:hover { transform: scale(1.1); }
.reagent.active { transform: translateY(-12px) scale(1.15); filter: drop-shadow(0 0 15px white); }
.flask-body {
    width: 100%; height: 58px; border-radius: 8px; border: 2px solid rgba(255,255,255,0.4);
    background: linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.05));
    overflow: hidden; position: relative; margin-top: auto;
}
.fluid { position: absolute; bottom: 0; width: 100%; height: 70%; opacity: 0.85; }
.label-tag { font-size: 9px; background: white; color: black; padding: 2px 3px; border-radius: 3px; font-weight: bold; position:absolute; bottom:4px; left:50%; transform:translateX(-50%); white-space:nowrap; }

.rack {
    background: rgba(255,255,255,0.1); padding: 20px 34px; border-radius: 10px;
    display: flex; gap: 26px; border-bottom: 5px solid rgba(255,255,255,0.2); backdrop-filter: blur(5px);
}
.test-tube {
    width: 45px; height: 170px; border: 2px solid rgba(255,255,255,0.5); border-top: none;
    border-radius: 0 0 22px 22px; position: relative; overflow: hidden; cursor: pointer;
    background: linear-gradient(90deg, rgba(255,255,255,0.1), rgba(255,255,255,0.2)); transition: 0.2s;
}
.test-tube:hover { background: rgba(255,255,255,0.18); }
.tube-vol { position: absolute; bottom: 0; width: 100%; height: 0%; transition: all 0.6s ease-out; }
.tube-label { position:absolute; bottom:5px; width:100%; text-align:center; font-size:10px; color:#d1fae5; z-index:2; }

.beaker {
    width: 110px; height: 130px; border: 3px solid rgba(255,255,255,0.5); border-top: none;
    border-radius: 0 0 14px 14px; position: relative; overflow: hidden; cursor: pointer;
    background: linear-gradient(90deg, rgba(255,255,255,0.08), rgba(255,255,255,0.16)); transition: 0.3s;
}
.beaker:hover { transform: translateY(-4px); }
.beaker-fluid { position:absolute; bottom:0; width:100%; height:60%; transition: background 1.2s ease, height 0.6s ease; }
.beaker-label { position:absolute; top:6px; width:100%; text-align:center; font-size:11px; color:#fff; z-index:3; font-weight:bold; text-shadow:0 1px 2px #000; }

.timer-dev {
    background: #222; border: 2px solid #444; border-radius: 8px; width: 84px; height: 50px;
    display: flex; align-items: center; justify-content: center; color: #ef4444; font-family: monospace; font-size: 1.1rem;
}
.burner { width:60px; cursor:pointer; text-align:center; }
.burner .flame { font-size: 2rem; opacity:0.25; transition:0.3s; }
.burner.on .flame { opacity:1; filter: drop-shadow(0 0 10px orange); animation: flick 0.4s infinite alternate; }
@keyframes flick { from{transform:scale(1);} to{transform:scale(1.15);} }

.sim-btn { background: var(--accent-cyan); color: #022c22; border: none; padding: 10px 25px; border-radius: 8px; font-weight: bold; cursor: pointer; transition: 0.3s; }
.sim-btn:hover { background: white; transform: scale(1.05); }
.restart-btn {
    position: absolute; top: 20px; right: 20px; z-index: 30;
    background: rgba(239, 68, 68, 0.2); border: 1px solid var(--danger); color: white;
    padding: 8px 16px; border-radius: 5px; cursor: pointer; font-size: 0.9rem;
}
.restart-btn:hover { background: var(--danger); }
.result-box { color:#a7f3d0; }
.result-box b { color: var(--accent-cyan); }
