/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
}

#gameContainer {
    width: 100%;
    max-width: 1200px;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Screen management */
.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.screen.active {
    display: flex;
}

/* Character Selection Screen */
#characterSelection {
    text-align: center;
    padding: 20px;
    overflow-y: auto;
    max-height: 100vh;
}

#characterSelection h1 {
    font-size: 3.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#characterSelection h2 {
    font-size: 2rem;
    margin-bottom: 40px;
    color: #f8f9fa;
}

.character-grid {
    display: flex;
    gap: 40px;
    margin-bottom: 40px;
    justify-content: center;
    flex-wrap: wrap;
    min-height: fit-content;
}

.character-card {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 30px;
    width: 300px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.character-card:hover {
    transform: translateY(-10px);
    border-color: #4ecdc4;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.character-card.selected {
    border-color: #4ecdc4;
    background: rgba(78, 205, 196, 0.2);
    transform: scale(1.05);
}

.character-image {
    width: 150px;
    height: 150px;
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
}

.character-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #4ecdc4;
}

.character-card p {
    margin-bottom: 10px;
    line-height: 1.4;
    color: #e9ecef;
}

.instructions {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
}

.instructions h3 {
    color: #4ecdc4;
    margin-bottom: 10px;
}

/* Game Screen */
#gameScreen {
    background: #2c3e50;
    justify-content: flex-start;
    padding: 20px;
}

#gameUI {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    font-size: 1.2rem;
    font-weight: bold;
}

#healthBar {
    display: flex;
    align-items: center;
    gap: 10px;
}

#healthFill {
    width: 200px;
    height: 20px;
    background: #e74c3c;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

#healthFill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--health-percent, 100%);
    background: #27ae60;
    transition: width 0.3s ease;
}

#gameCanvas {
    border: 3px solid #34495e;
    border-radius: 10px;
    background: #87CEEB;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Game Over Screen */
#gameOverScreen {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.9);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 2px solid #4ecdc4;
}

#gameOverScreen h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #4ecdc4;
}

#gameOverScreen p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    color: #f8f9fa;
}

#gameOverScreen button {
    background: #4ecdc4;
    color: white;
    border: none;
    padding: 15px 30px;
    margin: 0 10px;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

#gameOverScreen button:hover {
    background: #45b7aa;
    transform: translateY(-2px);
}

.hidden {
    display: none !important;
}

/* Difficulty Selection */
.difficulty-selection {
    margin: 30px 0;
    text-align: center;
}

.difficulty-selection h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #f8f9fa;
}

.difficulty-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 10px;
}

.difficulty-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
}

.difficulty-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.difficulty-btn.active {
    background: #4ecdc4;
    border-color: #4ecdc4;
    color: white;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.3);
}

.difficulty-btn.active:hover {
    background: #45b7aa;
    border-color: #45b7aa;
}

#difficultyDescription {
    font-size: 0.9rem;
    color: #b8c5d1;
    margin-top: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .character-grid {
        flex-direction: column;
        align-items: center;
    }
    
    .character-card {
        width: 280px;
    }
    
    #gameCanvas {
        width: 100%;
        height: auto;
    }
    
    #gameUI {
        flex-direction: column;
        gap: 10px;
    }
    
    .difficulty-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .difficulty-btn {
        width: 120px;
    }
} 