@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

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

body {
    font-family: 'Press Start 2P', monospace;
    background: linear-gradient(135deg, #e8d8f5 0%, #fbd3e9 100%);
    min-height: 100vh;
    padding: 20px;
    font-size: 8px;
}

.game-container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.header {
    text-align: center;
    margin-bottom: 20px;
}

.header h1 {
    color: #8B5CF6;
    margin-bottom: 10px;
    font-size: 12px;
}

.streak-counter {
    background: linear-gradient(45deg, #FFE4B5, #F0E68C);
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
    color: #8B4513;
}

.main-game {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 20px;
}

#gameCanvas {
    background: linear-gradient(to bottom, #f8f4ff, #e6e6fa);
    border: 4px solid #9B59B6;
    border-radius: 12px;
    image-rendering: pixelated;
    flex-shrink: 0;
}

.stats-panel {
    flex: 1;
    background: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 12px;
    border: 2px solid #DDD;
}

.stat-bar, .skill-bar {
    margin-bottom: 12px;
}

.stat-bar label, .skill-bar label {
    display: block;
    margin-bottom: 4px;
    color: #555;
}

.progress-bar {
    width: 100%;
    height: 12px;
    background: #E0E0E0;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #CCC;
}

.progress {
    height: 100%;
    border-radius: 6px;
    transition: width 0.3s ease;
}

.progress.health {
    background: linear-gradient(to right, #FF6B6B, #4ECDC4);
}

.progress.energy {
    background: linear-gradient(to right, #74B9FF, #0984E3);
}

.progress.cpp {
    background: linear-gradient(to right, #FF8A80, #FF5722);
}

.progress.rust {
    background: linear-gradient(to right, #FFAB91, #FF7043);
}

.progress.go {
    background: linear-gradient(to right, #81C784, #4CAF50);
}

.progress.js {
    background: linear-gradient(to right, #FFF176, #FFEB3B);
}

.progress.python {
    background: linear-gradient(to right, #AED581, #8BC34A);
}

.mood-display {
    padding: 10px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    text-align: center;
    margin-bottom: 15px;
}

.mood-display label {
    color: #666;
    margin-right: 8px;
}

#mood-emoji {
    font-size: 16px;
    margin-right: 8px;
}

.skills-section h3 {
    color: #8B5CF6;
    margin-bottom: 10px;
    font-size: 10px;
}

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

.action-group {
    background: rgba(255, 255, 255, 0.8);
    padding: 15px;
    border-radius: 12px;
    border: 2px solid #DDD;
}

.action-group h4 {
    color: #8B5CF6;
    margin-bottom: 10px;
    font-size: 10px;
}

.action-btn {
    width: 100%;
    padding: 10px;
    margin-bottom: 8px;
    border: none;
    border-radius: 8px;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.action-btn.care {
    background: linear-gradient(45deg, #FFB6C1, #FFC0CB);
    color: #8B4B8B;
}

.action-btn.care:hover {
    border-color: #FF69B4;
}

.action-btn.learn {
    background: linear-gradient(45deg, #87CEEB, #ADD8E6);
    color: #4682B4;
}

.action-btn.learn:hover {
    border-color: #4169E1;
}

.action-btn.social {
    background: linear-gradient(45deg, #98FB98, #90EE90);
    color: #228B22;
}

.action-btn.social:hover {
    border-color: #32CD32;
}

.message-area {
    position: relative;
    min-height: 60px;
}

.speech-bubble {
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    background: #FFFFFF;
    padding: 12px 16px;
    border-radius: 20px;
    border: 2px solid #8B5CF6;
    max-width: 250px;
    text-align: center;
    z-index: 10;
    animation: bounce 0.5s ease;
}

.speech-bubble::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #8B5CF6;
}

.speech-bubble.hidden {
    display: none;
}

.notifications {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.notification {
    background: #FFFFFF;
    padding: 12px 16px;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 4px solid;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease;
    max-width: 250px;
}

.notification.success {
    border-left-color: #4CAF50;
    background: linear-gradient(to right, #E8F5E8, #FFFFFF);
}

.notification.warning {
    border-left-color: #FF9800;
    background: linear-gradient(to right, #FFF3E0, #FFFFFF);
}

.notification.achievement {
    border-left-color: #FFD700;
    background: linear-gradient(to right, #FFFDE7, #FFFFFF);
}

@keyframes bounce {
    0%, 20%, 60%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    80% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .game-container {
        padding: 10px;
    }
    
    .main-game {
        flex-direction: column;
        align-items: center;
    }
    
    #gameCanvas {
        width: 100%;
        max-width: 350px;
    }
    
    .controls-panel {
        grid-template-columns: 1fr;
    }
    
    body {
        font-size: 7px;
        padding: 10px;
    }
    
    .action-btn {
        font-size: 7px;
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 10px;
    }
    
    body {
        font-size: 6px;
    }
    
    .action-btn {
        font-size: 6px;
    }
    
    .notifications {
        right: 10px;
        top: 10px;
    }
    
    .notification {
        max-width: 200px;
    }
}