/* Base styles */
body {
    background-color: darkblue;
    min-height: 100vh;
}

.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Stopwatch styles */
.stopwatch {
    font-family: "Lucida Console", Monaco, monospace;
    color: white;
    font-size: min(20vw, 200px);
    min-height: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

#stopwatch {
    line-height: 250px;
}

/* Add space below stopwatch container */
.blockspace {
    margin-top: 500px;
}

/* Text styles */
.helptext {
    font-family: "Lucida Console", Monaco, monospace;
    color: white;
    font-size: clamp(12px, 2.5vw, 15px);
}

/* Button styles */
.startbutton {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 20px 37px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 20px;
    margin: 4px 2px;
    cursor: pointer;
}

.stopbutton {
    background-color: #FF0000;
    border: none;
    color: white;
    padding: 20px 37px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 20px;
    margin: 4px 2px;
    cursor: pointer;
}

/* Get Ready Display Styles */
.get-ready-display {
    color: red;
    font-size: clamp(20px, 5vw, 24px);
    text-align: center;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background-color: rgba(255,255,255,0.8);
    padding: 20px;
    border-radius: 10px;
    width: min(90vw, 300px);
}

@keyframes flash {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0; }
}

.flashing {
    animation: flash 1s infinite;
}

/* Time Input Container */
.time-input-container {
    margin: 30px auto;
    max-width: 600px;  /* Increased width to accommodate presets */
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 0 10px;  /* Add padding to prevent presets touching edges */
}

.time-input {
    font-size: clamp(16px, 4vw, 24px);
    padding: 10px 15px;
    width: min(80vw, 175px);
    text-align: center;
    border: 2px solid #ccc;
    border-radius: 5px;
    font-family: monospace;
}

.time-input:focus {
    border-color: #4CAF50;
    outline: none;
}

/* Time Presets */
.time-presets {
    margin: 10px -5px;  /* Negative margin to offset child padding */
    display: flex;
    justify-content: center;
    flex-wrap: wrap;  /* Allow wrapping if needed */
    gap: 5px;
}

.time-preset {
    padding: 6px 12px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    flex-shrink: 0;  /* Prevent shrinking */
}

@media screen and (orientation: portrait) and (max-width: 600px) {
    .time-preset {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .time-presets {
        gap: 4px;  /* Slightly smaller gap on mobile */
    }
}

.time-preset:hover {
    background-color: #e0e0e0;
}

.time-input-error {
    color: red;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

/* Status Container */
.status-container {
    background-color: rgba(0, 0, 0, 0.3);
    padding: 10px;
    margin-bottom: 20px;
}

.status-grid {
    display: flex;
    justify-content: center;
    gap: clamp(10px, 3vw, 30px);
    flex-wrap: wrap;
}

.status-item {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: clamp(12px, 2.5vw, 15px);
}

/* Control buttons container */
.controls-container {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive buttons */
.btn {
    padding: clamp(10px, 2vw, 20px) clamp(20px, 4vw, 37px);
    font-size: clamp(16px, 3vw, 20px);
    margin: 4px;
}