body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f0f0;
}

.game-container {
    text-align: center;
    background-color: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 400px;
    width: 100%;
}

.header {
    margin-bottom: 20px;
}

.header h1 {
    color: #333;
    margin-bottom: 15px;
    font-size: 28px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.scores {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.score, .best-score {
    font-size: 18px;
    font-weight: bold;
    color: #555;
}

.best-score {
    color: #ff6b6b;
}

.combo {
    font-size: 18px;
    font-weight: bold;
    color: #4CAF50;
}

.game-area {
    width: 300px;
    height: 500px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    background-color: #fff;
    border: 3px solid #333;
    border-radius: 5px;
}

.grid {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.row {
    flex: 1;
    display: flex;
    border-bottom: 1px solid #ccc;
}

.row:last-child {
    border-bottom: none;
}

.cell {
    flex: 1;
    border-right: 1px solid #ccc;
    cursor: pointer;
    transition: all 0.1s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cell:last-child {
    border-right: none;
}

.cell.white {
    background-color: #fff;
}

.cell.black {
    background-color: #000;
}

.cell.clicked {
    transform: scale(0.9);
    opacity: 0.7;
}

.controls {
    margin: 20px 0;
}

button, select {
    padding: 12px 25px;
    margin: 0 10px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

button:hover, select:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

button:active, select:active {
    transform: translateY(0);
}

#resetBtn {
    background: linear-gradient(45deg, #f44336, #d32f2f);
}

#modeSelect {
    background: linear-gradient(45deg, #2196F3, #1976D2);
}

.instructions {
    color: #666;
    font-size: 14px;
    margin-top: 20px;
    line-height: 1.5;
}

.timer {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-top: 15px;
}

.game-over {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    z-index: 20;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.game-over h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #ff6b6b;
}

.game-over p {
    font-size: 18px;
    margin: 10px 0;
}

.game-over button {
    margin-top: 20px;
    padding: 12px 30px;
    font-size: 18px;
}