@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Roboto+Mono:wght@400;700&display=swap');

body {
    background-color: #0f3854;
    background-image: radial-gradient(ellipse at center, #0a2e38 0%, #000000 70%);
    display: flex;
    flex-direction: column; /* Arrange items vertically */
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    font-family: 'Orbitron', sans-serif;
    color: #61dafb;
}

#clock {
    font-size: 5rem;
    text-shadow: 0 0 20px #61dafb;
}

#date {
    font-size: 1.5rem;
    margin-top: 10px;
}

#stopwatch, #alarm, #themes {
    margin-top: 20px;
    text-align: center;
}

#stopwatch-display {
    font-family: 'Roboto Mono', monospace; /* Monospaced font */
    font-size: 2.2rem;
    background-color: #000; /* Black background */
    padding: 15px;
    border-radius: 10px;
    border: 2px solid #61dafb; /* Matching border */
    box-shadow: 0 0 15px rgba(97, 218, 251, 0.5);
    margin-bottom: 15px;
    min-width: 320px; /* Prevent resizing */
    text-align: center;
}

button {
    background-color: #61dafb;
    border: none;
    color: #0f3854;
    padding: 10px 20px;
    margin: 5px;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    border-radius: 5px;
}

button:hover {
    background-color: #21a1f1;
}

input[type="time"] {
    background-color: #0f3854;
    border: 1px solid #61dafb;
    color: #61dafb;
    padding: 5px;
    font-family: 'Orbitron', sans-serif;
    border-radius: 5px;
}

/* Dark Theme */
body.dark {
    background-color: #121212;
    background-image: none;
    color: #ffffff;
}

body.dark #clock {
    color: #bb86fc;
    text-shadow: 0 0 20px #bb86fc;
}

body.dark button {
    background-color: #bb86fc;
    color: #121212;
}

body.dark button:hover {
    background-color: #3700b3;
}

body.dark input[type="time"] {
    background-color: #121212;
    border: 1px solid #bb86fc;
    color: #bb86fc;
}

/* Light Theme */
body.light {
    background-color: #f0f0f0;
    background-image: none;
    color: #333333;
}

body.light #clock {
    color: #ff4081;
    text-shadow: 0 0 20px #ff4081;
}

body.light button {
    background-color: #ff4081;
    color: #f0f0f0;
}

body.light button:hover {
    background-color: #c51162;
}

body.light input[type="time"] {
    background-color: #f0f0f0;
    border: 1px solid #ff4081;
    color: #333333;
}

#alarm-instruction {
    font-size: 0.9rem;
    color: #a0a0a0; /* Lighter color for instruction */
    margin-top: 10px;
}

body.dark #alarm-instruction {
    color: #707070;
}

body.light #alarm-instruction {
    color: #666666;
}

#alarm-status {
    font-size: 1.5rem;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes alarm-flash {
    0%, 100% { background-color: red; }
    50% { background-color: inherit; }
}

.alarm-active {
    animation: alarm-flash 1s infinite;
}
