﻿.chess-clock {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%; 
    background-color: #333; /* Add a background for the clock area if needed */
    color: white; /* Add text color for the clock area if needed */
    font-family: Arial, sans-serif; /* Add font for the clock area if needed */
    box-sizing: border-box; /* Important for height: 100% to work well with padding */
}

.timer-container {
    display: flex;
    flex-direction: column;
    width: 100%; 
    height: 100%;
}

.player-timer {
    flex: 1; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    background-color: #444;
    cursor: pointer;
    user-select: none;
    padding: 20px;
    box-sizing: border-box;
    transition: background-color 0.3s;
}

.player1-timer {
    background-color: #2c2c2c; 
}

.player2-timer {
    background-color: #383838;
    transform: rotate(180deg); 
}


.player-timer.active-player {
    background-color: #5cb85c; 
}

.player-timer.time-out {
    background-color: #d9534f; 
}

.time {
    font-size: clamp(4rem, 15vw, 8rem); 
    font-weight: bold;
}

.moves {
    font-size: clamp(1rem, 4vw, 1.5rem);
    margin-top: 10px;
}

.controls {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 15px 0;
    background-color: #222;
    width: 100%;
    flex-shrink: 0; 
}

.control-btn {
    background-color: #555;
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 1.2em;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

    .control-btn:hover {
        background-color: #666;
    }


.settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    visibility: hidden; 
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

    .settings-overlay.visible {
        visibility: visible;
        opacity: 1;
        transition: opacity 0.3s ease;
    }

.settings-modal {
    background-color: #333; 
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    text-align: center;
    color: #fff; 
    width: 90%;
    max-width: 400px;
}

    .settings-modal h2 {
        margin-top: 0;
        margin-bottom: 25px;
        font-size: 1.8em;
    }

.time-inputs {
    display: flex;
    flex-direction: column;
    gap: 20px; 
    margin-bottom: 30px;
}

    .time-inputs div {
        display: flex;
        flex-direction: column; 
        align-items: center; 
    }

    .time-inputs label {
        margin-bottom: 8px;
        font-size: 1em;
        color: #ccc;
    }

    .time-inputs input[type="number"] {
        padding: 12px;
        font-size: 1.5em; 
        text-align: center;
        background-color: #555; 
        color: #fff; 
        border: 1px solid #666;
        border-radius: 5px;
        width: 100px; 
        box-sizing: border-box;
    }

.modal-buttons {
    display: flex;
    justify-content: space-around;
}

    .modal-buttons button {
        padding: 12px 25px;
        font-size: 1.1em;
        border: none;
        border-radius: 5px;
        cursor: pointer;
        transition: background-color 0.2s;
    }

    .modal-buttons #saveSettings {
        background-color: #5cb85c; 
        color: white;
    }

        .modal-buttons #saveSettings:hover {
            background-color: #4cae4c;
        }

    .modal-buttons #cancelSettings {
        background-color: #777; 
        color: white;
    }

        .modal-buttons #cancelSettings:hover {
            background-color: #666;
        }

.view-toggle-btn {
    padding: 8px 15px;
    margin-left: 10px;
    cursor: pointer;
}


@media (max-height: 500px) {
    .time {
        font-size: 3rem;
    }

    .controls {
        padding: 10px 0;
    }

    .control-btn {
        font-size: 1em;
        padding: 8px 12px;
    }
}
