/* Reset and Base Styles */
* {
    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%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.header h1 {
    font-size: 2.5em;
    color: #4a5568;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 1.2em;
    color: #718096;
    font-weight: 500;
}

/* Stats Panel */
.stats-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.stat {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.stat:hover {
    transform: translateY(-2px);
}

.stat-label {
    display: block;
    font-size: 0.9em;
    color: #718096;
    margin-bottom: 5px;
    font-weight: 500;
}

.stat-value {
    display: block;
    font-size: 1.8em;
    font-weight: bold;
    color: #4a5568;
}

/* Game Area */
.game-area {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    margin-bottom: 20px;
    min-height: 400px;
    position: relative;
}

/* Instructions */
.instructions {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.instructions h2 {
    font-size: 2em;
    color: #4a5568;
    margin-bottom: 20px;
}

.instructions ol {
    text-align: left;
    font-size: 1.1em;
    line-height: 1.8;
    margin-bottom: 30px;
    color: #2d3748;
}

.instructions li {
    margin-bottom: 10px;
    padding: 10px;
    background: rgba(102, 126, 234, 0.05);
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

/* Buttons */
.start-button, .restart-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.2em;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.start-button:hover, .restart-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(102, 126, 234, 0.4);
}

.start-button:active, .restart-button:active {
    transform: translateY(0);
}

/* Game Display */
.game-display {
    text-align: center;
}

.word-container {
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(247, 250, 252, 0.8);
    border-radius: 15px;
    border: 3px dashed #e2e8f0;
}

.game-word {
    font-size: 4em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Color Buttons */
.color-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.color-btn {
    padding: 15px 20px;
    font-size: 1.1em;
    font-weight: 600;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.color-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.color-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Feedback */
.feedback {
    font-size: 1.3em;
    font-weight: bold;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    transition: all 0.3s ease;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feedback.correct {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    animation: bounceIn 0.5s ease;
}

.feedback.incorrect {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
    animation: shakeX 0.5s ease;
}

.feedback.timeout {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    color: white;
    animation: pulse 0.5s ease;
}

/* Game Over Screen */
.game-over {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.game-over h2 {
    font-size: 2.5em;
    color: #4a5568;
    margin-bottom: 30px;
}

.final-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.final-stat {
    background: rgba(102, 126, 234, 0.1);
    padding: 20px;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.final-label {
    display: block;
    font-size: 0.9em;
    color: #718096;
    margin-bottom: 5px;
    font-weight: 500;
}

.final-value {
    display: block;
    font-size: 1.8em;
    font-weight: bold;
    color: #4a5568;
}

/* Wellness Feedback */
.wellness-feedback {
    margin: 30px 0;
    text-align: left;
}

.wellness-positive {
    background: linear-gradient(135deg, #c6f6d5 0%, #9ae6b4 100%);
    padding: 25px;
    border-radius: 15px;
    border-left: 5px solid #48bb78;
}

.wellness-positive h3 {
    color: #22543d;
    margin-bottom: 10px;
}

.wellness-positive p {
    color: #276749;
    line-height: 1.6;
}

.wellness-suggestions {
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    padding: 25px;
    border-radius: 15px;
    border-left: 5px solid #f56565;
}

.wellness-suggestions h3 {
    color: #742a2a;
    margin-bottom: 15px;
}

.wellness-suggestions p {
    color: #9c4221;
    line-height: 1.6;
    margin-bottom: 10px;
}

.wellness-suggestions ul {
    margin: 15px 0;
    padding-left: 20px;
}

.wellness-suggestions li {
    color: #9c4221;
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Progress Bar */
.progress-container {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* Animations */
@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes shakeX {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

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

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

/* Level Up Notification */
.level-up-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 20px 40px;
    border-radius: 50px;
    font-size: 1.5em;
    font-weight: bold;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    animation: bounceIn 0.5s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 2em;
    }
    
    .game-word {
        font-size: 2.5em;
        letter-spacing: 2px;
    }
    
    .color-buttons {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .color-btn {
        padding: 12px 15px;
        font-size: 1em;
    }
    
    .game-area {
        padding: 25px;
    }
    
    .instructions ol {
        font-size: 1em;
    }
}