/* Vibrant modern stylesheet for CSUN Map Quiz Game */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Top game bar with title and score */
.game-bar {
    background: linear-gradient(90deg, #1a1a2e 0%, #16213e 100%);
    padding: 12px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    border-bottom: 3px solid #00d4ff;
}

.game-bar-left {
    flex: 1;
}

.game-title {
    font-size: 28px;
    font-weight: bold;
    color: #00d4ff;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
    letter-spacing: 2px;
}

.game-bar-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

.score-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.score-label {
    color: #00d4ff;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
}

.score-value {
    background: linear-gradient(135deg, #00d4ff, #0099cc);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 4px 10px rgba(0, 212, 255, 0.3);
}

.progress-bar {
    width: 200px;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
    border: 2px solid #00d4ff;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #00d4ff);
    width: 0%;
    transition: width 0.4s ease;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

/* Main flex container for map */
.container {
    flex: 1;
    display: flex;
    padding: 10px;
    gap: 10px;
    overflow: hidden;
}

.map-container {
    flex: 1;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    background-color: #fff;
}

#map {
    width: 100%;
    height: 100%;
}

/* Confetti animation styles */
#confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    pointer-events: none;
}

/* Bottom interaction bar - displays current location */
.interaction-bar {
    background: linear-gradient(90deg, #1a1a2e 0%, #16213e 100%);
    padding: 15px 25px;
    border-top: 3px solid #00ff88;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.4);
}

.interaction-content {
    display: flex;
    align-items: center;
    gap: 30px;
    max-width: 1200px;
}

.question-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.question-label {
    color: #00ff88;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.question-text {
    color: white;
    font-size: 18px;
    font-weight: bold;
    background: linear-gradient(135deg, #00ff88, #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.instruction-text {
    color: #b0b0ff;
    font-size: 13px;
    font-style: italic;
}

/* Feedback popup - shows correct/incorrect message */
.feedback-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 30px 50px;
    border-radius: 15px;
    font-size: 24px;
    font-weight: bold;
    text-align: center;
    pointer-events: none;
    z-index: 1000;
    animation: popupAppear 0.5s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    min-width: 300px;
}

.feedback-popup.correct {
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    color: white;
    border: 3px solid #fff;
}

.feedback-popup.incorrect {
    background: linear-gradient(135deg, #ff6b6b, #ff4757);
    color: white;
    border: 3px solid #fff;
}

@keyframes popupAppear {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes popupBounce {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    25% {
        transform: translate(-50%, -50%) scale(1.1);
    }
    50% {
        transform: translate(-50%, -50%) scale(0.95);
    }
    75% {
        transform: translate(-50%, -50%) scale(1.05);
    }
}

.feedback-popup.bounce {
    animation: popupBounce 0.6s ease;
}

/* Final score modal - game completion screen */
.score-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.score-modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 50px 60px;
    border-radius: 20px;
    text-align: center;
    border: 3px solid #00d4ff;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.4s ease;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.score-modal-content h2 {
    color: #00ff88;
    font-size: 32px;
    margin-bottom: 30px;
    text-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
}

.final-score-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 15px;
    margin: 30px 0;
    border: 2px solid #00d4ff;
}

#final-score-text {
    font-size: 48px;
    color: white;
    font-weight: bold;
    text-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

.restart-button {
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.restart-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 255, 136, 0.6);
}

.restart-button:active {
    transform: translateY(-1px);
}

/* Confetti animation - falling pieces */
@keyframes confettiFall {
    to {
        transform: translateY(100vh) rotateZ(720deg);
        opacity: 0;
    }
}

.confetti-piece {
    animation: confettiFall 3s ease-out forwards;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .game-bar {
        flex-direction: column;
        gap: 10px;
    }

    .game-bar-right {
        width: 100%;
        justify-content: space-between;
    }

    .progress-bar {
        width: 150px;
    }

    .score-modal-content {
        padding: 30px 40px;
    }

    #final-score-text {
        font-size: 36px;
    }

    .interaction-content {
        flex-direction: column;
        align-items: flex-start;
    }
}
