/* ==========================================================================
   VoltaLab - Virtual Laboratory Workbench & Apparatus Styles
   Edisi Responsif & Interaktif untuk Siswa SMA
   ========================================================================== */

/* Main Lab Grid Layout: Meja Virtual (Kiri) & Bimbingan Langsung Tutor (Kanan) Beriringan */
.lab-layout-grid {
    display: grid;
    grid-template-columns: 1fr 430px;
    gap: 1.5rem;
    align-items: start;
}

@media (max-width: 1200px) {
    .lab-layout-grid {
        grid-template-columns: 1fr 390px;
        gap: 1.25rem;
    }
}

@media (max-width: 992px) {
    .lab-layout-grid {
        grid-template-columns: 1fr;
    }
}

/* Control Top Bar */
.lab-controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1.25rem;
    box-shadow: var(--glass-shadow);
}

.control-selectors-group {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    align-items: center;
    flex: 1;
}

.selector-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 140px;
}

.selector-item label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.custom-select {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: var(--transition-smooth);
}

.custom-select:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

.control-toggles-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.btn-toggle {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-toggle:hover {
    border-color: var(--accent-cyan);
}

.btn-toggle.active-toggle {
    background: rgba(56, 189, 248, 0.2);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

/* ==========================================================================
   Virtual Laboratory Bench (Meja Praktikum)
   ========================================================================== */
.lab-bench-container {
    position: relative;
    width: 100%;
    height: clamp(430px, 46vw, 530px);
    min-height: 430px;
    background: radial-gradient(ellipse at 50% 20%, #1a2234 0%, #0c1220 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    box-shadow: inset 0 2px 25px rgba(0, 0, 0, 0.8), var(--glass-shadow);
    overflow: hidden;
    user-select: none;
    transition: background 0.3s ease;
}

/* Light Theme Bench Styling */
[data-theme="light"] .lab-bench-container {
    background: radial-gradient(ellipse at 50% 20%, #e2e8f0 0%, #cbd5e1 100%);
    border-color: rgba(15, 23, 42, 0.15);
    box-shadow: inset 0 2px 20px rgba(0, 0, 0, 0.08), var(--glass-shadow);
}

/* Bench Table Surface 3D Perspective */
.lab-bench-tabletop {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 180px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border-top: 3px solid rgba(56, 189, 248, 0.2);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.7);
}

[data-theme="light"] .lab-bench-tabletop {
    background: linear-gradient(180deg, #94a3b8 0%, #64748b 100%);
    border-top: 3px solid rgba(37, 99, 235, 0.3);
    box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.1);
}

.lab-bench-reflection {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 100%);
}

/* Particle Canvas Overlay */
#particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    pointer-events: none;
}

/* Multimeter & Load Apparatus Unit (Atas Tengah) */
.meter-unit-container {
    position: absolute;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 15;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Digital & Analog Voltmeter Box */
.voltmeter-box {
    width: 215px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    border: 2px solid #334155;
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6), 0 0 15px rgba(0, 0, 0, 0.4);
    text-align: center;
    position: relative;
}

[data-theme="light"] .voltmeter-box {
    background: linear-gradient(180deg, #334155 0%, #1e293b 100%);
    border-color: #475569;
}

.meter-brand {
    display: flex;
    justify-content: space-between;
    font-size: 0.65rem;
    color: #94a3b8;
    font-weight: 700;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
}

/* Analog Dial Scale */
.meter-dial-scale {
    position: relative;
    width: 155px;
    height: 60px;
    background: #f8fafc;
    border-radius: 78px 78px 0 0;
    margin: 0 auto 0.6rem;
    border: 2px solid #cbd5e1;
    overflow: hidden;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.2);
}

.meter-dial-scale::before {
    content: '-3V    -2V    -1V     0     +1V    +2V    +3V';
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    font-size: 0.48rem;
    font-family: 'Fira Code', monospace;
    font-weight: bold;
    color: #334155;
    text-align: center;
    letter-spacing: 0.05em;
}

.meter-needle {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 2px;
    height: 52px;
    background: #ef4444;
    transform-origin: bottom center;
    transform: rotate(0deg);
    transition: transform 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    box-shadow: 0 0 4px rgba(239, 68, 68, 0.8);
}

.meter-pivot {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    background: #1e293b;
    border-radius: 50%;
    border: 2px solid #94a3b8;
}

/* Digital LCD Display */
.voltmeter-lcd {
    background: #020617;
    border: 1px solid #1e293b;
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.6rem;
    margin-bottom: 0.6rem;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.9);
}

.digital-readout {
    font-family: 'Fira Code', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.06em;
    text-shadow: 0 0 8px rgba(100, 116, 139, 0.2);
}

.digital-readout.active-positive {
    color: #38bdf8;
    text-shadow: 0 0 14px rgba(56, 189, 248, 0.8);
}

.digital-readout.active-negative {
    color: #f43f5e;
    text-shadow: 0 0 14px rgba(244, 63, 94, 0.8);
}

/* Terminal binding posts */
.meter-terminals {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-top: 0.4rem;
}

.terminal-post {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #000;
}

.terminal-post.negative {
    background: #000000;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.8);
}

.terminal-post.positive {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.8);
}

/* Lampu Bohlam Beban */
.load-bulb-unit {
    position: relative;
    width: 90px;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bulb-glass {
    position: relative;
    width: 55px;
    height: 55px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50% 50% 45% 45%;
    box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.bulb-filament {
    width: 16px;
    height: 14px;
    border-top: 2px solid #cbd5e1;
    border-left: 1px solid #cbd5e1;
    border-right: 1px solid #cbd5e1;
    border-radius: 4px 4px 0 0;
}

.bulb-base {
    width: 24px;
    height: 18px;
    background: linear-gradient(90deg, #94a3b8, #cbd5e1, #64748b);
    border-radius: 0 0 4px 4px;
}

.bulb-glow-circle {
    position: absolute;
    top: -15px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(254, 240, 138, 0.9) 0%, rgba(245, 158, 11, 0.4) 40%, transparent 70%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.load-bulb-unit.glowing .bulb-glass {
    background: rgba(254, 240, 138, 0.6);
    border-color: #fef08a;
    box-shadow: 0 0 25px #facc15;
}

.load-bulb-unit.glowing .bulb-filament {
    border-color: #ffffff;
    box-shadow: 0 0 8px #ffffff;
}

/* Knife Switch / Saklar */
.switch-unit-box {
    position: absolute;
    top: 35px;
    right: 25px;
    z-index: 15;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.65rem 0.95rem;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: var(--glass-shadow);
}

.switch-toggle-lever {
    width: 58px;
    height: 28px;
    background: #475569;
    border-radius: 999px;
    position: relative;
    cursor: pointer;
    margin: 0.4rem auto;
    transition: var(--transition-smooth);
}

.switch-toggle-lever::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 4px;
    width: 22px;
    height: 22px;
    background: #cbd5e1;
    border-radius: 50%;
    transition: var(--transition-smooth);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.switch-toggle-lever.closed {
    background: #10b981;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}

.switch-toggle-lever.closed::after {
    transform: translateX(28px);
    background: #ffffff;
}

.switch-label-text {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
}

/* ==========================================================================
   Beaker Glasses & Solutions
   ========================================================================== */
.beaker-glass-assembly {
    position: absolute;
    bottom: 40px;
    width: clamp(105px, 14vw, 145px);
    height: clamp(155px, 20vw, 195px);
    z-index: 10;
}

.beaker-glass-assembly.left-beaker {
    left: 28%;
    transform: translateX(-50%);
}

.beaker-glass-assembly.right-beaker {
    left: 72%;
    transform: translateX(-50%);
}

/* Realistic Glass Beaker */
.beaker-body {
    position: relative;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(255, 255, 255, 0.45);
    border-top: none;
    border-radius: 0 0 16px 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.03) 100%);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5), inset 0 0 15px rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

[data-theme="light"] .beaker-body {
    border-color: rgba(15, 23, 42, 0.35);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.3) 100%);
    box-shadow: 0 15px 25px rgba(0, 0, 0, 0.15), inset 0 0 15px rgba(255, 255, 255, 0.4);
}

/* Beaker Spout & Lip */
.beaker-lip {
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    height: 8px;
    border: 3px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.15);
}

[data-theme="light"] .beaker-lip {
    border-color: rgba(15, 23, 42, 0.4);
    background: rgba(255, 255, 255, 0.6);
}

/* Beaker Scale Measurement Graduations */
.beaker-graduations {
    position: absolute;
    top: 30px;
    left: 8px;
    bottom: 25px;
    width: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 0.55rem;
    font-family: 'Fira Code', monospace;
    color: rgba(255, 255, 255, 0.6);
    pointer-events: none;
    z-index: 5;
}

[data-theme="light"] .beaker-graduations {
    color: #334155;
    font-weight: bold;
}

.beaker-graduations span::before {
    content: '— ';
}

/* Solution Liquid */
.beaker-liquid {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65%;
    border-radius: 0 0 13px 13px;
    transition: height 0.8s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.4s ease, border-color 0.4s ease;
    border-top: 2px solid rgba(255, 255, 255, 0.6);
    box-shadow: inset 0 2px 10px rgba(255, 255, 255, 0.3);
}

.beaker-liquid.empty {
    height: 0% !important;
    border-top: none;
    opacity: 0;
}

.beaker-glass-assembly.highlight-target {
    box-shadow: 0 0 25px rgba(2, 132, 199, 0.7);
    border-radius: 16px;
    animation: beakerPulse 1.2s infinite alternate ease-in-out;
}

@keyframes beakerPulse {
    0% { transform: translateX(-50%) scale(1); filter: drop-shadow(0 0 2px rgba(2, 132, 199, 0.3)); }
    100% { transform: translateX(-50%) scale(1.03); filter: drop-shadow(0 0 16px rgba(2, 132, 199, 0.8)); }
}

.beaker-meniscus {
    position: absolute;
    top: -4px;
    left: 0;
    right: 0;
    height: 8px;
    background: rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    filter: blur(1px);
}

/* Metallic Electrode Plates */
.electrode-plate {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(22px, 3vw, 30px);
    height: clamp(135px, 18vw, 160px);
    border-radius: 4px;
    border: 2px solid;
    box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.5);
    z-index: 8;
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease, filter 0.3s ease;
}

.electrode-plate.raised {
    transform: translate(-50%, -75px);
}

.electrode-plate.gleaming {
    animation: gleamSweep 1.2s ease-in-out;
}

@keyframes gleamSweep {
    0% { filter: brightness(1) drop-shadow(0 0 0 rgba(255, 255, 255, 0)); }
    40% { filter: brightness(2.0) drop-shadow(0 0 20px rgba(255, 255, 255, 0.95)); }
    100% { filter: brightness(1) drop-shadow(0 0 4px rgba(255, 255, 255, 0.3)); }
}

.electrode-clip {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 22px;
    height: 14px;
    background: #1e293b;
    border: 1px solid #475569;
    border-radius: 3px;
    z-index: 9;
}

/* Labels below beakers */
.beaker-tag {
    position: absolute;
    bottom: -32px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    white-space: nowrap;
    text-align: center;
    color: var(--text-primary);
    box-shadow: var(--glass-shadow);
}

/* ==========================================================================
   Salt Bridge (Jembatan Garam Pipa U Kaca Interaktif)
   ========================================================================== */
.salt-bridge-tube {
    position: absolute;
    bottom: 110px;
    left: 50%;
    transform: translateX(-50%);
    width: 44%;
    height: 110px;
    z-index: 12;
    pointer-events: auto;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease, filter 0.25s ease;
}

.salt-bridge-tube:hover {
    filter: drop-shadow(0 0 10px rgba(251, 146, 60, 0.75));
}

.salt-bridge-tube.unplugged {
    transform: translate(-50%, -75px) scale(0.92);
    opacity: 0.25;
}

.salt-bridge-path {
    width: 100%;
    height: 100%;
}

/* ==========================================================================
   Symbolic & Chemical Theory Panel (Side Column)
   ========================================================================== */
.side-symbolic-panel {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.symbolic-section-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--glass-shadow);
}

.symbolic-section-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-cyan);
}

.formula-display-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.95rem;
    color: var(--text-primary);
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.calc-breakdown-box {
    font-family: 'Fira Code', monospace;
    font-size: 0.88rem;
    background: var(--bg-surface);
    border-radius: var(--radius-sm);
    padding: 0.85rem;
    border-left: 3px solid var(--accent-cyan);
    color: var(--text-primary);
    line-height: 1.6;
}

.spontaneity-badge {
    display: inline-block;
    margin-top: 0.5rem;
}

/* ==========================================================================
   Interactive Tutor Companion Panel (Bimbingan Langsung Beriringan)
   ========================================================================== */
.lab-guided-tutor-panel {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.tutor-header-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tutor-profile-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.tutor-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
    flex-shrink: 0;
}

.tutor-meta {
    flex: 1;
}

.tutor-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.tutor-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: var(--accent-emerald);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.2rem;
}

.tutor-role-badge::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-emerald);
    box-shadow: 0 0 6px var(--accent-emerald);
}

/* Speech Balloon from Tutor */
.tutor-speech-bubble {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.95rem 1.15rem;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text-primary);
    position: relative;
    border-left: 4px solid var(--accent-cyan);
}

.tutor-speech-bubble::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 22px;
    border-width: 0 8px 8px 8px;
    border-style: solid;
    border-color: transparent transparent var(--border-color) transparent;
}

.tutor-speech-bubble::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 23px;
    border-width: 0 7px 7px 7px;
    border-style: solid;
    border-color: transparent transparent var(--bg-surface) transparent;
}

.tutor-speech-bubble.speech-updated {
    animation: speechPulse 0.5s ease-out;
}

@keyframes speechPulse {
    0% { transform: scale(0.98); box-shadow: 0 0 0 rgba(2, 132, 199, 0); }
    50% { transform: scale(1.02); box-shadow: 0 0 16px rgba(2, 132, 199, 0.4); }
    100% { transform: scale(1); box-shadow: none; }
}

.speech-actions-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tutor-voice-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.tutor-voice-badge:hover {
    border-color: var(--accent-cyan);
    color: var(--text-light);
}

.tutor-voice-badge.is-indonesian {
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.3);
    background: rgba(56, 189, 248, 0.08);
}

.btn-speak-tutor {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--accent-cyan);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: var(--transition-smooth);
}

.btn-speak-tutor:hover {
    background: rgba(2, 132, 199, 0.1);
    border-color: var(--accent-cyan);
}

.btn-speak-tutor.is-speaking {
    background: rgba(2, 132, 199, 0.2);
    color: var(--accent-cyan);
    border-color: var(--accent-cyan);
    animation: speakPulse 1s infinite alternate;
}

@keyframes speakPulse {
    0% { box-shadow: 0 0 3px rgba(2, 132, 199, 0.3); }
    100% { box-shadow: 0 0 10px rgba(2, 132, 199, 0.8); }
}

/* Floating XP Award Animation */
.floating-xp-bubble {
    position: fixed;
    z-index: 9999;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.88rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.6);
    pointer-events: none;
    animation: floatUpFade 1.4s ease-out forwards;
}

@keyframes floatUpFade {
    0% {
        opacity: 0;
        transform: translate(-50%, 0) scale(0.8);
    }
    30% {
        opacity: 1;
        transform: translate(-50%, -20px) scale(1.1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50px) scale(1);
    }
}

/* Stepper Progress & Clickable Dots */
.guided-stepper-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.15rem 1.25rem;
    box-shadow: var(--glass-shadow);
}

.stepper-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.65rem;
}

.step-cat-badge {
    background: rgba(2, 132, 199, 0.12);
    color: var(--accent-cyan);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.step-counter-text {
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.stepper-progress-track {
    width: 100%;
    height: 6px;
    background: var(--bg-surface);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.85rem;
}

.stepper-progress-fill {
    height: 100%;
    width: 11%;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-blue));
    border-radius: 999px;
    transition: width 0.3s ease;
}

.stepper-dots-row {
    display: flex;
    justify-content: space-between;
    gap: 0.3rem;
}

.step-dot-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.step-dot-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--text-primary);
}

.step-dot-btn.active {
    background: var(--accent-cyan);
    color: #ffffff;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(2, 132, 199, 0.4);
    transform: scale(1.1);
}

.step-dot-btn.completed {
    background: rgba(16, 185, 129, 0.18);
    border-color: var(--accent-emerald);
    color: var(--accent-emerald);
}

/* Step Details & Interactive Checkpoint */
.step-details-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--glass-shadow);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.step-details-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
}

.step-details-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.sop-callout-box {
    background: var(--bg-surface);
    border-left: 3px solid var(--accent-amber);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 0.75rem 0.95rem;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--text-primary);
}

.sop-callout-box strong {
    color: var(--accent-amber);
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.8rem;
}

/* Interactive Checkpoint Card */
.checkpoint-question-card {
    background: rgba(2, 132, 199, 0.06);
    border: 1px solid rgba(2, 132, 199, 0.25);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
}

.checkpoint-header-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-cyan);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.checkpoint-question-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.65rem;
    line-height: 1.45;
}

.checkpoint-options-list {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.btn-checkpoint-opt {
    text-align: left;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 0.55rem 0.85rem;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.84rem;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    line-height: 1.4;
}

.btn-checkpoint-opt:hover {
    border-color: var(--accent-cyan);
    background: rgba(2, 132, 199, 0.08);
}

.btn-checkpoint-opt.opt-correct {
    background: rgba(16, 185, 129, 0.15);
    border-color: var(--accent-emerald);
    color: var(--accent-emerald);
    font-weight: 600;
}

.btn-checkpoint-opt.opt-wrong {
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--accent-rose);
    color: var(--accent-rose);
}

.checkpoint-feedback-msg {
    margin-top: 0.6rem;
    font-size: 0.83rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    line-height: 1.4;
    display: none;
}

.checkpoint-feedback-msg.feedback-correct {
    display: block;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.checkpoint-feedback-msg.feedback-wrong {
    display: block;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Action button */
.btn-action-big {
    width: 100%;
    padding: 0.85rem 1.25rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.step-nav-buttons {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.step-nav-buttons button {
    flex: 1;
    font-size: 0.85rem;
    padding: 0.55rem 0.85rem;
}

/* Status Badges on the Workbench */
.workbench-status-badges {
    position: absolute;
    top: 15px;
    left: 20px;
    z-index: 18;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.wb-badge {
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.wb-badge.badge-k3-active {
    background: rgba(16, 185, 129, 0.85);
    color: #ffffff;
}

.wb-badge.badge-k3-pending {
    background: rgba(245, 158, 11, 0.85);
    color: #0b1329;
}

.wb-badge.badge-sandpaper-done {
    background: rgba(2, 132, 199, 0.85);
    color: #ffffff;
}

/* Quick Johnstone's Triplet Bar under the Bench */
.quick-triplet-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.triplet-summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.15rem;
    box-shadow: var(--glass-shadow);
}

.triplet-summary-card h4 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-cyan);
    margin-bottom: 0.45rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.triplet-content-box {
    font-family: 'Fira Code', monospace;
    font-size: 0.88rem;
    color: var(--text-primary);
    line-height: 1.45;
}

/* ==========================================================================
   Submicroscopic Modal Overlay (Johnstone Triplet)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content-card {
    width: 100%;
    max-width: 960px;
    background: var(--bg-secondary);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), var(--glow-cyan);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-surface);
}

.modal-body {
    padding: 1.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.micro-nav-tabs {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
    overflow-x: auto;
}

.micro-tab-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    white-space: nowrap;
}

.micro-tab-btn.active {
    background: var(--accent-cyan);
    color: #0b1329;
    border-color: var(--accent-cyan);
}

.micro-canvas-wrapper {
    width: 100%;
    height: 380px;
    background: #020617;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
}

#microscopic-canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.micro-caption-box {
    background: var(--bg-surface);
    border-left: 4px solid var(--accent-cyan);
    padding: 0.85rem 1.25rem;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-close-modal:hover {
    color: var(--text-primary);
}

/* ==========================================================================
   Mobile Adjustments for Lab Workbench
   ========================================================================== */
@media (max-width: 700px) {
    .voltmeter-box {
        width: 175px;
        padding: 0.6rem 0.75rem;
    }
    .meter-dial-scale {
        width: 125px;
        height: 50px;
    }
    .digital-readout {
        font-size: 1.2rem;
    }
    .switch-unit-box {
        right: 12px;
        top: 15px;
        padding: 0.45rem 0.65rem;
    }
    .beaker-glass-assembly {
        bottom: 30px;
    }
    .salt-bridge-tube {
        bottom: 95px;
    }
}
