/* ============================================
   SCIENCE MINIGAMES STYLES
   Shared scaffolding (.science-game) + per-game styles
   ============================================ */

.science-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding: 20px;
    max-width: 720px;
    margin: 0 auto;
    color: #E8F1F5;
    font-family: 'Poppins', sans-serif;
}

.science-game .sci-header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 560px;
    background: rgba(20, 40, 55, 0.75);
    border: 1px solid rgba(93, 188, 210, 0.35);
    border-radius: 12px;
    padding: 10px 18px;
}

.science-game .sci-timer {
    font-weight: 700;
    font-size: 1.05rem;
}

.science-game .sci-timer .timer-warning {
    color: #FF5252;
    animation: sci-pulse 0.6s infinite alternate;
}

@keyframes sci-pulse {
    from { opacity: 1; }
    to { opacity: 0.45; }
}

.science-game .sci-progress {
    font-weight: 600;
    color: #7FD8C8;
}

.science-game .sci-instruction {
    text-align: center;
    font-size: 1rem;
    max-width: 540px;
    margin: 0;
}

.science-game .sci-feedback {
    min-height: 28px;
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
}

.science-game .sci-feedback.success { color: #4ADE80; }
.science-game .sci-feedback.error { color: #FF6B6B; }

.science-game .sci-btn,
.science-game .sci-hold-btn {
    background: linear-gradient(135deg, #2A9D8F, #1E7168);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 30px;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    transition: transform 0.1s, box-shadow 0.2s;
    box-shadow: 0 4px 14px rgba(42, 157, 143, 0.4);
}

.science-game .sci-btn:hover,
.science-game .sci-hold-btn:hover {
    transform: translateY(-2px);
}

.science-game .sci-hold-btn:active {
    transform: scale(0.96);
    background: linear-gradient(135deg, #37BBA9, #2A9D8F);
}

.science-game .sci-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    max-width: 560px;
}

.science-game .sci-options-column {
    flex-direction: column;
    width: 100%;
}

.science-game .sci-option {
    background: rgba(30, 55, 72, 0.9);
    border: 2px solid rgba(93, 188, 210, 0.45);
    color: #E8F1F5;
    border-radius: 10px;
    padding: 12px 22px;
    font-size: 0.98rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}

.science-game .sci-option:hover {
    background: rgba(42, 157, 143, 0.4);
    transform: translateY(-1px);
}

.science-game .sci-option.correct {
    background: #2E7D32;
    border-color: #4ADE80;
}

.science-game .sci-option.wrong {
    background: #8E2A2A;
    border-color: #FF6B6B;
}

.science-game .shake-wrong {
    animation: sci-shake 0.4s;
}

@keyframes sci-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

/* ----- Titration ----- */
.titration-rig {
    display: flex;
    align-items: flex-end;
    gap: 26px;
}

.titration-burette {
    width: 22px;
    height: 130px;
    background: rgba(200, 228, 238, 0.25);
    border: 2px solid rgba(93, 188, 210, 0.6);
    border-radius: 6px 6px 2px 2px;
    position: relative;
    overflow: hidden;
}

.burette-liquid {
    position: absolute;
    top: 0;
    width: 100%;
    height: 65%;
    background: #7FB7D8;
}

.titration-flask-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.titration-tube {
    width: 90px;
    height: 190px;
    background: rgba(200, 228, 238, 0.15);
    border: 3px solid rgba(93, 188, 210, 0.6);
    border-radius: 0 0 26px 26px;
    position: relative;
    overflow: hidden;
}

.titration-target {
    position: absolute;
    width: 100%;
    background: rgba(236, 100, 190, 0.35);
    border-top: 2px dashed #EC64BE;
    border-bottom: 2px dashed #EC64BE;
    z-index: 2;
}

.titration-fill {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 0%;
    background: #8C5ABE;
    transition: height 0.05s linear;
}

.titration-label {
    font-weight: 700;
    font-size: 1.1rem;
    color: #7FD8C8;
}

/* ----- Microscope ----- */
.microscope-view {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, #1C3141 55%, #0C1822 100%);
    border: 10px solid #30343A;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 40px rgba(93, 188, 210, 0.25) inset;
}

.microscope-lens {
    display: flex;
    align-items: center;
    justify-content: center;
}

.microscope-specimen {
    font-size: 5.5rem;
    transition: filter 0.05s linear;
}

.micro-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 380px;
}

.micro-knob-label {
    font-weight: 600;
    color: #7FD8C8;
}

.micro-controls input[type="range"] {
    width: 100%;
    accent-color: #2A9D8F;
}

/* ----- Sample Sorting ----- */
.sample-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(30, 55, 72, 0.9);
    border: 2px solid rgba(93, 188, 210, 0.5);
    border-radius: 14px;
    padding: 18px 26px;
    min-width: 300px;
}

.sample-icon {
    font-size: 2.8rem;
}

.sample-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sample-info strong {
    font-size: 1.15rem;
}

.sample-info span {
    color: #A9C7D4;
    font-size: 0.92rem;
}

.sample-zones {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.sample-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 18px;
    border-radius: 12px;
    border: 2px solid transparent;
    font-size: 1.7rem;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    min-width: 118px;
    transition: transform 0.12s;
    color: white;
    font-weight: 600;
}

.sample-zone span {
    font-size: 0.8rem;
}

.sample-zone:hover { transform: translateY(-3px); }

.sample-zone.freezer { background: #1D4F73; border-color: #4FB7FF; }
.sample-zone.fridge { background: #23678A; border-color: #7ED6F0; }
.sample-zone.shelf { background: #6D5B2E; border-color: #E9C46A; }
.sample-zone.biohazard { background: #7A2727; border-color: #FF6B6B; }

/* ----- Lab Safety ----- */
.safety-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    width: 100%;
    max-width: 620px;
}

.safety-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    background: rgba(30, 55, 72, 0.9);
    border: 2px solid rgba(93, 188, 210, 0.35);
    border-radius: 10px;
    padding: 12px 6px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    color: #E8F1F5;
    transition: background 0.15s;
}

.safety-tile:hover { background: rgba(42, 157, 143, 0.3); }

.safety-tile-icon { font-size: 2rem; }

.safety-tile-label {
    font-size: 0.72rem;
    text-align: center;
    line-height: 1.2;
}

.safety-tile.hazard-found {
    background: #2E7D32;
    border-color: #4ADE80;
    pointer-events: none;
}

/* ----- Pipette ----- */
.pipette-order {
    background: rgba(30, 55, 72, 0.9);
    border: 2px solid rgba(93, 188, 210, 0.5);
    border-radius: 10px;
    padding: 10px 24px;
    font-size: 1.05rem;
}

.pipette-rig {
    display: flex;
    align-items: center;
    gap: 20px;
}

.pipette-body {
    width: 34px;
    height: 190px;
    background: rgba(200, 228, 238, 0.15);
    border: 3px solid rgba(93, 188, 210, 0.6);
    border-radius: 8px 8px 14px 14px;
    position: relative;
    overflow: hidden;
}

.pipette-liquid {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 0%;
    background: #4FB7FF;
    transition: height 0.05s linear;
}

/* Visible target band on the barrel — stop the liquid between
   the two dashed lines */
.pipette-target {
    position: absolute;
    width: 100%;
    background: rgba(74, 222, 128, 0.28);
    border-top: 2px dashed #4ADE80;
    border-bottom: 2px dashed #4ADE80;
    z-index: 2;
}

.pipette-readout {
    font-size: 1.5rem;
    font-weight: 700;
    color: #7FD8C8;
    font-family: monospace;
    min-width: 110px;
}

/* ----- Element Match ----- */
.element-tile-big {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #2A9D8F, #1D4F73);
    border: 3px solid #7FD8C8;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.2rem;
    font-weight: 800;
    color: white;
    box-shadow: 0 6px 24px rgba(42, 157, 143, 0.4);
}

/* ----- Centrifuge ----- */
.centrifuge-rotor {
    position: relative;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, #3A4750 40%, #26292E 100%);
    border: 8px solid #556070;
}

.centrifuge-rotor.spinning {
    animation: sci-spin 0.3s linear 3;
}

@keyframes sci-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.rotor-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
}

.rotor-slot {
    position: absolute;
    width: 48px;
    height: 48px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(20, 30, 38, 0.9);
    border: 2px dashed rgba(127, 216, 200, 0.6);
    cursor: pointer;
    font-size: 1.4rem;
    transition: background 0.15s;
}

.rotor-slot:hover { background: rgba(42, 157, 143, 0.4); }

.rotor-slot.filled {
    background: #23678A;
    border-style: solid;
    border-color: #7ED6F0;
}

.centrifuge-status {
    font-weight: 700;
    color: #7FD8C8;
}

/* ----- Scientific Method ----- */
.method-steps {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    max-width: 440px;
}

.method-step {
    background: rgba(30, 55, 72, 0.9);
    border: 2px solid rgba(93, 188, 210, 0.45);
    color: #E8F1F5;
    border-radius: 10px;
    padding: 12px 18px;
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s;
}

.method-step:hover { background: rgba(42, 157, 143, 0.35); }

.method-step.done {
    background: #2E7D32;
    border-color: #4ADE80;
    pointer-events: none;
}

.method-order {
    display: inline-block;
    background: #4ADE80;
    color: #0C1822;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    text-align: center;
    line-height: 24px;
    font-weight: 800;
    margin-right: 8px;
}

/* ----- Data Analysis ----- */
.data-table-wrap {
    width: 100%;
    max-width: 560px;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(30, 55, 72, 0.9);
    border-radius: 10px;
    overflow: hidden;
}

.data-table th {
    background: #1D4F73;
    color: #B9E2F0;
    padding: 8px 10px;
    font-size: 0.85rem;
}

.data-table td {
    padding: 10px;
    text-align: center;
    font-weight: 700;
    font-family: monospace;
    font-size: 1.05rem;
    border-top: 1px solid rgba(93, 188, 210, 0.3);
}

/* ----- Lab Report ----- */
.report-scenario {
    background: rgba(30, 55, 72, 0.9);
    border-left: 4px solid #2A9D8F;
    border-radius: 8px;
    padding: 14px 18px;
    max-width: 560px;
    font-size: 0.98rem;
    line-height: 1.5;
}
