* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #2ecc71; /* Default to green */
    color: white;
    transition: background-color 0.5s;
}

.app-container {
    width: 100%;
    max-width: 100%;
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

/* Fullscreen class for pseudo-fullscreen mode */
.fullscreen-mode {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background-color: inherit;
}

h1 {
    margin-bottom: 20px;
    color: white;
    font-size: 5vh;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.timer-setup {
    margin-bottom: 5vh;
    background-color: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 10px;
}

.input-group {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

label {
    font-size: 3vh;
    color: white;
}

input[type="number"] {
    width: 100px;
    padding: 12px;
    font-size: 3vh;
    border: none;
    border-radius: 5px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.9);
}

button {
    padding: 15px 30px;
    font-size: 2.5vh;
    background-color: rgba(255, 255, 255, 0.25);
    color: white;
    border: 2px solid white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

button i {
    font-size: 2.5vh;
}

button:hover {
    background-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

.timer-display {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.time {
    font-size: 20vw; /* Responsive font size based on viewport width */
    font-weight: 900; /* Extra bold */
    margin-bottom: 5vh;
    transition: color 0.5s;
    color: white; /* Default to white text for contrast */
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.3); /* Shadow for readability */
}

.red {
    color: white; /* Keep text white for contrast against red background */
}

.orange {
    color: white; /* Keep text white for contrast against orange background */
}

.progress-bar {
    width: 80%;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 5vh;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.progress {
    height: 100%;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    transition: width 1s linear;
}

/* We don't need these classes anymore as we're using the body background for color indication
.progress.orange {
    background-color: #f39c12;
}

.progress.red {
    background-color: #e74c3c;
}
*/

.hidden {
    display: none;
}

.timer-controls {
    display: flex;
    flex-direction: row;
    gap: 15px;
    margin-top: 5vh;
}

#reset-timer, #pause-timer, #fullscreen-reset {
    margin-top: 0;
    background-color: rgba(255, 255, 255, 0.25);
    border: 2px solid white;
}

#reset-timer:hover, #pause-timer:hover, #fullscreen-reset:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

#fullscreen-reset {
    margin-top: 2vh;
}