body {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    font-family: 'Orbitron', sans-serif;
}

 .clockGroup {
    display: flex;
    width: 100vw;
    height: 100vh;
    flex-wrap: wrap;
}

.clock,
.timer,
.stopwatch,
.countdown {
    width: 50%;
    height:50%;
    text-align: center;     
}

.clock {
    background-color: black;
    color: white;
    align-items: center; 
}

.clock p{
    width:80%;
    font-size: 5em;
    position: relative; 
    display: flex;
    flex-direction: column;
    align-items: center; 
    padding-top: 1em;
    text-align: center;
    margin: 0 auto;      
}


.timer {
    background-color: #fee8e8;
    color: black;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#timerDisplay{
    font-size: 2em;
    margin: 0 0 0.5em 0;
}

.timer h4 {
    margin: 0em 0 1em 0;
}

#timerProgress {
    width: 50%;
    height: 30px;
    background-color: grey;
    border-radius: 15px;
    margin: 40px auto 0;
    overflow: hidden;
}

#timerBar {
    width: 0%;
    height: 100%;
    background-color: red;
    border-radius: 15px 0 0 15px;
}

.timer label {
    font-weight: bold;
}

.timer input[type="number"] {
    width: 60px;
    padding: 0.3em;
    margin: 0 1em 1em 0;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 1em;
    text-align: center;
}

.timerButtons {
    margin-top: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8em;
}

.timerButtons label {
    font-weight: bold;
}

.timerButtons input[type="checkbox"] {
    transform: scale(1.5);
}

.timerButtons button {
    padding: 0.6em;
    border-radius: 4px;
    border: none;
    background-color: #f44336;
    color: white;
    font-weight: bold;
}

.stopwatch {
    background-color: #121212;
    color: #00ffcc;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#stopwatchDisplay {
    font-size: 5em;
    margin: 0.5em 0 1em 0;
}

.stopwatchButtons button {
    background-color: #313131;
    border: 2px solid #00ffcc;
    color: #00ffcc;
    padding: 0.5em 1.5em;
    margin: 0 0.5em;
    border-radius: 10px;
    font-size: 1em;
    transition: background 0.3s, transform 0.2s;
}

.stopwatchButtons button:hover:not(:disabled) {
    background: #00ffcc;
    color: #121212;
}

.stopwatchButtons button:disabled {
    opacity: 0.5;
}

.countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.countdown h2 {
    margin-bottom: 3em;
}

.countdown label {
    font-weight: bold;
    margin-bottom: 0.5em;
}

#countdownInput {
    font-size: 1em;
    padding: 0.4em;
    border-radius: 6px;
    border: 1px solid #ccc;
    margin-bottom: 1em;
}

#countdownDisplay {
    font-size: 1.5em;
    margin: 1em 0;
}

#countdownComplete {
    margin-top: -2em;
    font-size: 1.4em;
    color: goldenrod;
    font-weight: bold;
    animation: flash 1s infinite;
}

/*https://stackoverflow.com/questions/16344354/how-to-make-blinking-flashing-text-with-css-3 */
@keyframes flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
