/* ===================================
   QUANTUM ZENO EFFECT GAMES STYLES
   =================================== */

/* Inherit Zeno color scheme */
:root {
    --zeno-primary: #00ffaa;
    --zeno-secondary: #ff0066;
    --zeno-accent: #ffcc00;
    --zeno-frozen: #00ccff;
}

/* Game sections */
.game-section {
    margin: 40px 0;
    padding: 30px;
    background: rgba(0, 20, 40, 0.9);
    border: 2px solid var(--zeno-primary);
    border-radius: 12px;
    box-shadow: 
        0 0 30px rgba(0, 255, 170, 0.3),
        inset 0 0 30px rgba(0, 255, 170, 0.05);
}

.game-section h2 {
    color: var(--zeno-primary);
    font-family: 'Orbitron', monospace;
    margin-bottom: 15px;
    text-shadow: 0 0 15px var(--zeno-primary);
}

.game-description {
    color: #b0e0ff;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Game controls */
.game-controls {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
}

.game-controls label {
    display: block;
    margin-bottom: 10px;
    color: var(--zeno-primary);
    font-family: 'Orbitron', monospace;
}

.game-controls input[type="range"] {
    width: 70%;
    max-width: 400px;
    height: 6px;
    background: rgba(0, 255, 170, 0.2);
    border-radius: 3px;
    outline: none;
    margin: 0 10px;
}

.game-controls input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--zeno-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 8px var(--zeno-primary);
}

.game-controls input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--zeno-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 8px var(--zeno-primary);
    border: none;
}

.game-button {
    background: linear-gradient(135deg, var(--zeno-primary), var(--zeno-frozen));
    color: #000;
    border: none;
    padding: 12px 30px;
    font-family: 'Orbitron', monospace;
    font-size: 1em;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    margin: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 255, 170, 0.5);
}

.game-button:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(0, 255, 170, 0.8);
}

.game-button:active {
    transform: scale(0.98);
}

.game-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Game stages */
.game-stage {
    position: relative;
    width: 100%;
    max-width: 600px;
    height: 350px;
    margin: 20px auto;
    background: 
        linear-gradient(0deg, transparent 49%, rgba(0, 255, 170, 0.05) 50%, transparent 51%),
        linear-gradient(90deg, transparent 49%, rgba(0, 255, 170, 0.05) 50%, transparent 51%);
    background-size: 30px 30px;
    border: 2px solid var(--zeno-primary);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: inset 0 0 40px rgba(0, 255, 170, 0.15);
    cursor: pointer;
}

/* Game 1: Decay Prevention */
.particle-state {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--zeno-primary) 0%, transparent 70%);
    box-shadow: 
        0 0 25px var(--zeno-primary),
        0 0 50px var(--zeno-primary);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.2s ease;
}

.particle-state.decaying {
    background: radial-gradient(circle, var(--zeno-secondary) 0%, transparent 70%);
    box-shadow: 
        0 0 25px var(--zeno-secondary),
        0 0 50px var(--zeno-secondary);
    animation: decay-pulse 0.5s ease-in-out infinite;
}

.particle-state.stable {
    background: radial-gradient(circle, var(--zeno-frozen) 0%, transparent 70%);
    box-shadow: 
        0 0 25px var(--zeno-frozen),
        0 0 50px var(--zeno-frozen);
}

.observation-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, transparent 60%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
}

.observation-indicator.active {
    animation: observation-ripple 0.4s ease-out;
}

@keyframes decay-pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.15);
        opacity: 0.8;
    }
}

@keyframes observation-ripple {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

/* Game 2: Quantum Tunneling */
.tunnel-stage {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
}

.tunnel-well {
    width: 30%;
    height: 100%;
    background: rgba(0, 255, 170, 0.1);
    border-right: 3px solid var(--zeno-primary);
    position: relative;
}

.tunnel-barrier {
    width: 20%;
    height: 100%;
    background: linear-gradient(to right, 
        rgba(255, 0, 102, 0.3), 
        rgba(255, 0, 102, 0.6), 
        rgba(255, 0, 102, 0.3));
    border-left: 2px solid var(--zeno-secondary);
    border-right: 2px solid var(--zeno-secondary);
    position: relative;
}

.tunnel-particle {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--zeno-primary) 0%, transparent 70%);
    box-shadow: 
        0 0 20px var(--zeno-primary),
        0 0 40px var(--zeno-primary);
    top: 50%;
    left: 15%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.tunnel-particle.tunneling {
    animation: attempt-tunnel 2s ease-in-out infinite;
}

@keyframes attempt-tunnel {
    0%, 100% {
        left: 15%;
        opacity: 1;
    }
    50% {
        left: 35%;
        opacity: 0.6;
    }
}

/* Game 3: Evolution Race */
.race-stage {
    padding: 20px;
}

.race-track {
    display: grid;
    grid-template-columns: 150px 1fr 100px;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
}

.race-label {
    color: var(--zeno-primary);
    font-family: 'Orbitron', monospace;
    font-size: 0.9em;
}

.race-bar {
    height: 30px;
    background: rgba(0, 0, 0, 0.7);
    border: 1px solid var(--zeno-primary);
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.race-progress {
    height: 100%;
    width: 0;
    transition: width 0.3s ease;
    position: relative;
}

.race-progress.red {
    background: linear-gradient(90deg, var(--zeno-secondary), var(--zeno-accent));
    box-shadow: 0 0 15px var(--zeno-secondary);
}

.race-progress.blue {
    background: linear-gradient(90deg, var(--zeno-frozen), var(--zeno-primary));
    box-shadow: 0 0 15px var(--zeno-frozen);
}

.race-state-indicator {
    font-family: 'Courier New', monospace;
    font-size: 1.2em;
    font-weight: bold;
    text-align: center;
}

.race-state-indicator.red {
    color: var(--zeno-secondary);
}

.race-state-indicator.blue {
    color: var(--zeno-frozen);
}

/* Game 4: Quiz */
.quiz-container {
    background: rgba(0, 0, 0, 0.5);
    padding: 30px;
    border-radius: 8px;
    margin: 20px 0;
}

.quiz-question {
    font-size: 1.2em;
    color: var(--zeno-primary);
    margin-bottom: 25px;
    font-family: 'Orbitron', monospace;
    line-height: 1.6;
}

.quiz-options {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.quiz-option {
    background: rgba(0, 255, 170, 0.1);
    border: 2px solid var(--zeno-primary);
    padding: 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #b0e0ff;
}

.quiz-option:hover {
    background: rgba(0, 255, 170, 0.2);
    transform: translateX(5px);
}

.quiz-option.selected {
    background: rgba(0, 255, 170, 0.3);
    border-color: var(--zeno-frozen);
}

.quiz-option.correct {
    background: rgba(0, 255, 0, 0.3);
    border-color: #00ff00;
}

.quiz-option.incorrect {
    background: rgba(255, 0, 0, 0.3);
    border-color: var(--zeno-secondary);
}

.quiz-option.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.quiz-feedback {
    min-height: 60px;
    padding: 15px;
    margin: 15px 0;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 6px;
    border-left: 4px solid transparent;
}

.quiz-feedback.correct {
    border-color: #00ff00;
    color: #00ff00;
}

.quiz-feedback.incorrect {
    border-color: var(--zeno-secondary);
    color: var(--zeno-secondary);
}

.quiz-controls {
    text-align: center;
    margin-top: 20px;
}

/* Game stats */
.game-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.stat-item {
    background: rgba(0, 0, 0, 0.7);
    padding: 12px;
    border: 1px solid var(--zeno-primary);
    border-radius: 6px;
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.75em;
    color: var(--zeno-primary);
    font-family: 'Orbitron', monospace;
    margin-bottom: 6px;
    letter-spacing: 1px;
}

.stat-value {
    display: block;
    font-size: 1.3em;
    color: var(--zeno-frozen);
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-shadow: 0 0 8px var(--zeno-frozen);
}

.quiz-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

/* High scores */
.high-score {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: rgba(255, 204, 0, 0.1);
    border: 1px solid var(--zeno-accent);
    border-radius: 6px;
}

.high-score p {
    color: var(--zeno-accent);
    font-family: 'Orbitron', monospace;
    font-size: 1.1em;
    margin: 0;
}

.high-score span {
    color: #fff;
    font-weight: bold;
    text-shadow: 0 0 10px var(--zeno-accent);
}

/* Responsive */
@media (max-width: 768px) {
    .game-stage {
        height: 300px;
    }

    .race-track {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .race-label {
        text-align: center;
    }

    .game-stats {
        grid-template-columns: 1fr 1fr;
    }

    .stat-item {
        padding: 10px;
    }

    .stat-label {
        font-size: 0.7em;
    }

    .stat-value {
        font-size: 1.1em;
    }
}