/* ===========================
   SUPERPOSITION GAMES STYLES
   Quantum Portal - Superposition Games Page
   =========================== */

/* Challenge Boxes */
.challenges-section {
    margin: 40px 0;
}

.challenge-box {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 183, 255, 0.05));
    border: 2px solid rgba(0, 255, 170, 0.3);
    border-radius: 12px;
    padding: 30px;
    margin: 30px 0;
    transition: all 0.3s;
}

.challenge-box:hover {
    border-color: var(--quantum-cyan);
    box-shadow: 0 0 30px rgba(0, 255, 170, 0.2);
}

.challenge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.challenge-header h3 {
    color: var(--quantum-cyan);
    font-family: 'Orbitron', monospace;
    font-size: 1.4rem;
    margin: 0;
}

.challenge-difficulty {
    font-family: 'Orbitron', monospace;
    font-size: 0.9rem;
    padding: 5px 15px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.5);
}

.challenge-difficulty .easy { color: var(--quantum-green); }
.challenge-difficulty .medium { color: var(--quantum-yellow); }
.challenge-difficulty .hard { color: #ff6b35; }
.challenge-difficulty .expert { color: var(--quantum-magenta); }

.challenge-description {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    margin-bottom: 20px;
}

/* Game Areas */
.game-area {
    margin-top: 25px;
    padding: 25px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 170, 0.2);
}

.game-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
}

.game-stats > div {
    font-family: 'Orbitron', monospace;
    color: var(--quantum-yellow);
    text-align: center;
}

.game-stats span {
    display: block;
    font-size: 1.5rem;
    color: var(--quantum-green);
    font-weight: bold;
    margin-top: 5px;
    text-shadow: 0 0 10px rgba(0, 255, 170, 0.5);
}

/* Cat Simulator Game */
.cat-box-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin: 30px 0;
}

.cat-box {
    width: 400px;
    height: 300px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(50, 50, 50, 0.8));
    border: 3px solid var(--quantum-cyan);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0, 183, 255, 0.4);
}

.box-closed,
.box-open {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.superposition-indicator {
    text-align: center;
    animation: pulse-superposition 2s infinite;
}

@keyframes pulse-superposition {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

.wave-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px rgba(0, 255, 170, 0.8));
}

.state-text {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    color: var(--quantum-yellow);
    margin-bottom: 20px;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.8);
}

.both-states {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.alive-state {
    color: var(--quantum-green);
    font-size: 2rem;
}

.dead-state {
    color: var(--quantum-magenta);
    font-size: 2rem;
}

.and {
    color: var(--quantum-cyan);
    font-family: 'Orbitron', monospace;
    font-weight: bold;
}

.cat-result {
    font-size: 6rem;
    animation: collapse-reveal 0.5s;
}

@keyframes collapse-reveal {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); opacity: 1; }
}

.decay-probability {
    width: 100%;
    max-width: 400px;
}

.decay-probability label {
    display: block;
    color: var(--quantum-cyan);
    font-family: 'Orbitron', monospace;
    margin-bottom: 10px;
}

.decay-probability input[type="range"] {
    width: 100%;
    margin-top: 10px;
}

.decay-probability span {
    color: var(--quantum-green);
    font-weight: bold;
}

/* Wave Builder Game */
.target-state,
.your-state {
    padding: 20px;
    margin: 20px 0;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    text-align: center;
}

.target-state {
    border: 2px solid var(--quantum-magenta);
}

.your-state {
    border: 2px solid var(--quantum-cyan);
}

.target-state h4,
.your-state h4 {
    font-family: 'Orbitron', monospace;
    margin-bottom: 15px;
}

.target-state h4 { color: var(--quantum-magenta); }
.your-state h4 { color: var(--quantum-cyan); }

.state-display {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem;
    color: var(--quantum-green);
    padding: 15px;
    background: rgba(0, 255, 170, 0.05);
    border-radius: 4px;
    margin: 10px 0;
}

.wave-controls {
    margin: 30px 0;
}

.amplitude-control {
    margin: 25px 0;
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
}

.amplitude-control label {
    display: block;
    color: var(--quantum-cyan);
    font-family: 'Orbitron', monospace;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.amplitude-control span {
    color: var(--quantum-green);
    font-weight: bold;
}

.amplitude-control input[type="range"] {
    width: 100%;
    margin-top: 10px;
}

.probability {
    margin-top: 10px;
    font-family: 'Courier New', monospace;
    color: var(--quantum-yellow);
    font-size: 1.1rem;
}

.normalization-check {
    margin-top: 15px;
    font-family: 'Orbitron', monospace;
    font-size: 1.1rem;
    color: var(--quantum-cyan);
}

.normalization-check span {
    color: var(--quantum-green);
    font-weight: bold;
}

/* Double-Slit Game */
#doubleSlitCanvas {
    width: 100%;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    margin: 20px 0;
}

.slit-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    flex-wrap: wrap;
}

.slit-controls label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--quantum-yellow);
    font-family: 'Orbitron', monospace;
    cursor: pointer;
}

.slit-controls input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* Quiz Styling */
.quiz-question {
    font-size: 1.2rem;
    color: var(--quantum-cyan);
    margin-bottom: 25px;
    line-height: 1.8;
    padding: 20px;
    background: rgba(0, 183, 255, 0.1);
    border-radius: 8px;
    border-left: 4px solid var(--quantum-cyan);
}

.quiz-options {
    display: grid;
    gap: 15px;
    margin: 25px 0;
}

.quiz-option {
    padding: 20px;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(0, 255, 170, 0.3);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
    line-height: 1.6;
}

.quiz-option:hover {
    border-color: var(--quantum-cyan);
    background: rgba(0, 183, 255, 0.1);
    transform: translateX(5px);
}

.quiz-option.selected {
    border-color: var(--quantum-yellow);
    background: rgba(255, 215, 0, 0.1);
}

.quiz-option.correct {
    border-color: var(--quantum-green);
    background: rgba(0, 255, 170, 0.2);
    animation: correct-flash 0.5s;
}

.quiz-option.incorrect {
    border-color: var(--quantum-magenta);
    background: rgba(255, 0, 110, 0.2);
    animation: incorrect-shake 0.5s;
}

@keyframes correct-flash {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: 0 0 30px rgba(0, 255, 170, 0.6); }
}

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

.quiz-feedback {
    margin: 25px 0;
    padding: 20px;
    border-radius: 8px;
    line-height: 1.8;
    display: none;
}

.quiz-feedback.show {
    display: block;
}

.quiz-feedback.correct {
    background: rgba(0, 255, 170, 0.2);
    border-left: 4px solid var(--quantum-green);
    color: var(--quantum-green);
}

.quiz-feedback.incorrect {
    background: rgba(255, 0, 110, 0.2);
    border-left: 4px solid var(--quantum-magenta);
    color: rgba(255, 255, 255, 0.9);
}

.quiz-feedback strong {
    display: block;
    margin-bottom: 10px;
    font-family: 'Orbitron', monospace;
}

/* Leaderboard */
.leaderboard-section {
    margin: 60px 0;
}

.leaderboard-box {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(0, 183, 255, 0.05));
    border: 2px solid var(--quantum-cyan);
    border-radius: 12px;
    padding: 30px;
}

.leaderboard-box h3 {
    text-align: center;
    color: var(--quantum-yellow);
    font-family: 'Orbitron', monospace;
    margin-bottom: 30px;
    font-size: 1.5rem;
}

.leaderboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.score-item {
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 170, 0.3);
    text-align: center;
    transition: all 0.3s;
}

.score-item:hover {
    border-color: var(--quantum-cyan);
    box-shadow: 0 0 20px rgba(0, 255, 170, 0.3);
    transform: translateY(-5px);
}

.score-label {
    font-family: 'Orbitron', monospace;
    color: var(--quantum-yellow);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.score-value {
    font-family: 'Courier New', monospace;
    font-size: 1.8rem;
    color: var(--quantum-green);
    font-weight: bold;
    text-shadow: 0 0 15px rgba(0, 255, 170, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    .cat-box {
        width: 100%;
        max-width: 350px;
    }

    .challenge-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .slit-controls {
        flex-direction: column;
    }

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

    .leaderboard-grid {
        grid-template-columns: 1fr;
    }
}