* {
    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;
    align-items: center;
    justify-content: center;
    color: #333;
}

.game-container {
    text-align: center;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
}

h1 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.game-info {
    display: flex;
    justify-content: space-around;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: bold;
}

.score, .high-score {
    color: #667eea;
    padding: 0.5rem 1rem;
    background: #f0f0f0;
    border-radius: 10px;
}

.game-board {
    margin: 1rem 0;
    display: flex;
    justify-content: center;
}

#gameCanvas {
    border: 3px solid #667eea;
    border-radius: 10px;
    background: #f8f9fa;
}

.game-controls {
    margin: 1.5rem 0;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.8rem 2rem;
    font-size: 1rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.btn:not(:disabled) {
    background: #667eea;
    color: white;
}

.btn:not(:disabled):hover {
    background: #764ba2;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

.game-instructions {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    text-align: left;
}

.game-instructions h3 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.game-instructions p {
    margin: 0.25rem 0;
    color: #666;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 80%;
    max-width: 300px;
    text-align: center;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-content h2 {
    color: #667eea;
    margin-bottom: 1rem;
}

.modal-content p {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

@media (max-width: 600px) {
    .game-container {
        padding: 1rem;
        margin: 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    #gameCanvas {
        width: 100%;
        max-width: 350px;
        height: 350px;
    }
    
    .game-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 200px;
    }
}