@font-face {
    font-family: 'Digital';
    src: url('fonts/digital.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
} 

body {
    font-family: 'Roboto', sans-serif;
    text-align: center;
    margin: 10px;
    background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
    color: #ffffff;
}

body.dark-mode {
    background: linear-gradient(135deg, #1c1c1c 0%, #333333 100%);
    color: #ffffff;
}

button.dark-mode, input[type="text"].dark-mode {
    background-color: #444;
    color: #fff;
}

button.dark-mode:hover, input[type="text"].dark-mode:hover {
    background-color: #555;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.stopwatch {
    background: #4caf50;
    display: inline-block;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
    margin-bottom: 10px;
    animation: fadeIn 1s ease-in-out;
}

.stopwatch:hover {
    transform: scale(1.05);
}

h1 {
    font-size: 1.2em;
    color: #ffffff;
    margin-bottom: 10px;
    font-family: 'Roboto Mono', monospace;
}

button, input[type="text"] {
    font-size: 0.7em;
    padding: 5px 10px;
    margin: 3px;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #4caf50;
    color: white;
    transition: background-color 0.3s ease, transform 0.3s ease;
    animation: fadeIn 1s ease-in-out;
}

button:hover, input[type="text"]:hover {
    background-color: #388e3c;
    transform: scale(1.1);
}

button:active, input[type="text"]:active {
    background-color: #2e7d32;
    transform: scale(1.05);
}

#start {
    background-color: #2196f3;
}

#start:hover {
    background-color: #1976d2;
}

#start:active {
    background-color: #1565c0;
}

#stop {
    background-color: #f44336;
}

#stop:hover {
    background-color: #d32f2f;
}

#stop:active {
    background-color: #c62828;
}

#reset {
    background-color: #ffeb3b;
    color: black;
}

#reset:hover {
    background-color: #fdd835;
}

#reset:active {
    background-color: #fbc02d;
}

#microseconds {
    background-color: #9c27b0;
}

#microseconds:hover {
    background-color: #8e24aa;
}

#microseconds:active {
    background-color: #7b1fa2;
}

#temperature {
    background-color: #00bcd4;
}

#temperature:hover {
    background-color: #00acc1;
}

#temperature:active {
    background-color: #0097a7;
}

#toggle-dark-mode {
    background-color: #607d8b;
}

#toggle-dark-mode:hover {
    background-color: #546e7a;
}

#toggle-dark-mode:active {
    background-color: #455a64;
}

.clock, .calendar, .temperature, .laps {
    margin-top: 5px;
    animation: fadeIn 1s ease-in-out;
}

#current-time, #current-date, #current-temperature, #weather-description {
    font-size: 1em;
    color: #ffffff;
}

#weather-icon {
    width: 60px;
    height: 60px;
    vertical-align: middle;
    margin-left: 5px;
}

/* Hidden by default */
.hidden {
    display: none;
}

/* Visual Alert Styles */
#visual-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2em;
    font-weight: bold;
    color: #f44336;
    background-color: #ffffff;
    padding: 20px;
    border: 2px solid #f44336;
    border-radius: 10px;
    text-align: center;
    z-index: 1000;
    animation: flash 1s infinite;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Flashing Animation */
@keyframes flash {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
}

@media (max-width: 600px) {
    h1 {
        font-size: 1em;
    }

    button, input[type="text"] {
        font-size: 0.6em;
        padding: 4px 8px;
    }

    #current-time, #current-date, #current-temperature, #weather-description {
        font-size: 0.8em;
    }

    #weather-icon {
        width: 40px;
        height: 40px;
    }
}
