body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f0f0f0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    touch-action: manipulation; /* Для мобильных устройств */
}

h1 {
    color: #333;
}

.info-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 396px; /* ИЗМЕНЕНО: 11 * 36px = 396px */
    margin-bottom: 15px;
}

.score-container {
    font-size: 1.2em;
    font-weight: bold;
}

#new-game-btn {
    padding: 10px 15px;
    font-size: 1em;
    cursor: pointer;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
}

#new-game-btn:hover {
    background-color: #0056b3;
}

#game-board {
    display: grid;
    /* ИЗМЕНЕНО: Размеры сетки (11x11) */
    grid-template-columns: repeat(11, 36px);
    grid-template-rows: repeat(11, 36px);
    border: 2px solid #999;
    background-color: #ccc;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.ball {
    width: 36px;
    height: 36px;
    box-sizing: border-box;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.1s ease, background-color 0.1s;
    background-image: radial-gradient(circle at 30% 30%, #ffffff, rgba(255,255,255,0) 70%);
}

.ball.highlight {
    transform: scale(1.15); 
    box-shadow: 0 0 12px 5px rgba(255, 255, 0, 0.7);
    z-index: 1;
}

.empty {
    background-color: transparent;
    background-image: none;
    cursor: default;
}

.color-0 { background-color: #D9534F; }
.color-1 { background-color: #5CB85C; }
.color-2 { background-color: #428BCA; }
.color-3 { background-color: #9B59B6; }
.color-4 { background-color: #F0AD4E; }

#game-over-message {
    margin-top: 20px;
    font-size: 1.5em;
    font-weight: bold;
    color: #D9534F;
}

.hidden {
    display: none;
}
