body {
    font-family: Arial, sans-serif;
    margin: 0;
    background: #f0f0f0;
}

.container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.timer-section {
    background: #fff;
    padding: 20px 16px 16px 16px;
    border-radius: 8px;
    width: 300px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: background 0.2s, color 0.2s;
}

.timer-section.active-white {
    outline: 3px solid #ff0000;
    outline-offset: -3px;
}
.timer-section.active-black {
    outline: 3px solid #ff0000;
    outline-offset: -3px;
}

#black-timer {
    background-color: black;
}
#black-timer h2,
#black-timer input,
#black-timer .timer-message {
    color: white;
}
#black-timer input {
    background: #222;
    border: 1px solid #444;
}

.active-indicator {
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    color: black;
    height: 24px;
}

#black-indicator {
    color: white;
}

.timer-display {
    font-size: 2.2rem;
    font-weight: bold;
    margin: 10px 0 4px 0;
}

#black-timer-display {
    color: white;
}

.timer-message {
    font-size: 1rem;
    color: #d32f2f;
    min-height: 24px;
    text-align: center;
}

input[type="number"] {
    width: 90px;
    margin: 4px 4px 10px 4px;
    padding: 6px;
    font-size: 1rem;
    border-radius: 4px;
    border: 1px solid #ccc;
    text-align: center;
}

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

button {
    padding: 8px 18px;
    font-size: 1rem;
    border-radius: 4px;
    border: none;
    background: #2196f3;
    color: #ffffff;
    cursor: pointer;
    transition: background 0.2s;
}
button:disabled {
    background: #bdbdbd;
    cursor: not-allowed;
}

#black-timer-display {
    background: #222;
    color: #fff;
    border-radius: 4px;
    padding: 2px 8px;
}

#white-timer-display {
    background: #eeeeee;
    color: #000000;
    border-radius: 4px;
    padding: 2px 8px;
}

@media (max-width: 700px) {
    .container {
        flex-direction: column;
        align-items: center;
    }
    .timer-section {
        width: 90vw;
        min-width: 220px;
    }
}
