* {
    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;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow: hidden;
}

.game-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    padding: 30px;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.game-header h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.score-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.score, .high-score {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.score:hover, .high-score:hover {
    transform: translateY(-2px);
}

.label {
    opacity: 0.9;
    margin-right: 5px;
}

.game-main {
    position: relative;
    margin-bottom: 20px;
}

#game-canvas {
    width: 100%;
    height: 400px;
    border: 3px solid #667eea;
    border-radius: 15px;
    background: #f8f9fa;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: box-shadow 0.3s ease;
}

#game-canvas:hover {
    box-shadow: inset 0 2px 15px rgba(0, 0, 0, 0.15);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 15px;
    transition: opacity 0.3s ease;
}

.game-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.overlay-content {
    text-align: center;
    color: white;
    padding: 20px;
    animation: slideIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.overlay-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #fff;
}

.overlay-content p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    opacity: 0.9;
}

.game-button {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    min-width: 150px;
}

.game-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.game-button.secondary {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.game-button.secondary:hover {
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.game-controls {
    text-align: center;
}

.controls-info {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #667eea;
}

.controls-info p {
    margin: 5px 0;
    color: #666;
    font-size: 0.9rem;
}

.game-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* Mobile responsiveness */
@media (max-width: 640px) {
    body {
        padding: 10px;
    }

    .game-container {
        padding: 20px;
        border-radius: 15px;
    }

    .game-header h1 {
        font-size: 2rem;
    }

    .score-container {
        gap: 15px;
        flex-direction: column;
        align-items: center;
    }

    .score, .high-score {
        font-size: 1rem;
        padding: 8px 16px;
        min-width: 140px;
    }

    #game-canvas {
        height: 300px;
    }

    .overlay-content h2 {
        font-size: 1.5rem;
    }

    .overlay-content p {
        font-size: 1rem;
    }

    .game-button {
        padding: 12px 25px;
        font-size: 1rem;
        min-width: 120px;
    }

    .controls-info {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .game-header h1 {
        font-size: 1.8rem;
    }

    #game-canvas {
        height: 250px;
    }

    .game-buttons {
        flex-direction: column;
        align-items: center;
    }

    .game-button {
        width: 100%;
        max-width: 200px;
    }
}

/* Animation for score update */
.score-update {
    animation: pulse 0.5s ease;
}

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