* {
    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;
    padding: 20px;
    color: #fff;
}

.container {
    max-width: 900px;
    width: 100%;
}

h1 {
    text-align: center;
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.subtitle {
    text-align: center;
    font-size: 1.2em;
    margin-bottom: 20px;
    opacity: 0.9;
}

.game-area {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.score-board {
    display: flex;
    justify-content: space-around;
    margin-bottom: 15px;
    padding: 10px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: bold;
}

#gameCanvas {
    display: block;
    width: 100%;
    height: auto;
    border: 3px solid #667eea;
    border-radius: 10px;
    background: #87CEEB;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
}

.control-btn {
    font-size: 1.5em;
    padding: 15px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.1s, box-shadow 0.1s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    flex: 1;
    max-width: 200px;
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.3);
}

.control-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.instructions {
    text-align: center;
    margin-top: 20px;
    opacity: 0.8;
    font-size: 0.9em;
}

.instructions p {
    margin: 5px 0;
}

.start-screen, .game-over {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    color: #333;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5);
    text-align: center;
    z-index: 1000;
    max-width: 90%;
    width: 500px;
}

.start-screen h2, .game-over h2 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 2em;
}

.start-screen h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.character-selection {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.character-option {
    padding: 15px;
    border: 3px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    background: #f5f5f5;
}

.character-option:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.character-option.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #f093fb20 0%, #f5576c20 100%);
    transform: scale(1.05);
}

.character-preview {
    display: block;
    margin: 0 auto;
    width: 60px;
    height: 90px;
}

.character-option p {
    margin-top: 10px;
    font-weight: bold;
    color: #667eea;
    font-size: 0.9em;
}

.start-screen p, .game-over p {
    margin: 10px 0;
    font-size: 1.1em;
}

.btn {
    margin-top: 20px;
    padding: 15px 40px;
    font-size: 1.2em;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.btn:active {
    transform: translateY(0);
}

.hidden {
    display: none !important;
}

.bonus-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #fff;
    padding: 30px 50px;
    border-radius: 20px;
    font-size: 2em;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    z-index: 2000;
    animation: bonusPop 3s ease-in-out;
    pointer-events: none;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

@keyframes bonusPop {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    10% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
    20% {
        transform: translate(-50%, -50%) scale(1);
    }
    80% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 0;
    }
}

#finalScore, #finalPresents {
    color: #f5576c;
    font-weight: bold;
    font-size: 1.3em;
}

/* Responsive Design */
@media (max-width: 600px) {
    h1 {
        font-size: 2em;
    }
    
    .subtitle {
        font-size: 1em;
    }
    
    .score-board {
        flex-direction: column;
        gap: 5px;
        font-size: 1em;
    }
    
    .start-screen, .game-over {
        padding: 30px 20px;
    }
    
    .character-selection {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

