* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #121212;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.screen {
    display: none;
    width: 100%;
    height: 100%;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    justify-content: flex-start;
    padding-top: 5vh;
}

.screen.active {
    display: flex;
}

/* Nový horný panel */
#top-bar {
    width: 100%;
    max-width: 350px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3vh;
}

/* Hodiny */
#clock-section {
    display: flex;
    flex-direction: column;
    text-align: left;
}

#utc-clock {
    font-size: 1.4rem;
    font-weight: bold;
    color: #00b0ff; /* Svetlomodrá ATC farba */
    letter-spacing: 1px;
    font-variant-numeric: tabular-nums;
}

#local-clock {
    font-size: 0.85rem;
    color: #888;
    font-variant-numeric: tabular-nums;
    margin-top: 2px;
}

/* Zmenšený prepínač displeja do panelu */
#wake-toggle {
    background: transparent;
    border: 2px solid #333;
    border-radius: 30px;
    color: #888;
    font-size: 0.8rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#wake-toggle .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ff5252;
    box-shadow: 0 0 8px rgba(255, 82, 82, 0.5);
    transition: all 0.3s ease;
}

#wake-toggle.active {
    border-color: #00e676;
    color: #ffffff;
}

#wake-toggle.active .dot {
    background-color: #00e676;
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.7);
}

/* Stopky */
#stopwatch-section {
    background-color: #1e1e1e;
    border: 2px solid #333;
    border-radius: 30px;
    padding: 20px;
    text-align: center;
    margin-bottom: 4vh;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    max-width: 350px;
}

#stopwatch-section:active { transform: scale(0.97); }

#stopwatch-section.running {
    border-color: #00b0ff;
    box-shadow: 0 0 15px rgba(0, 176, 255, 0.2);
}

#stopwatch-section.paused {
    border-color: #ffb300;
    box-shadow: 0 0 15px rgba(255, 179, 0, 0.2);
}

#stopwatch-display {
    font-size: 3.5rem;
    font-weight: bold;
    font-variant-numeric: tabular-nums;
    color: #ffffff;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

#stopwatch-label {
    font-size: 0.85rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.divider {
    height: 1px;
    background-color: #333;
    width: 50%;
    margin-bottom: 4vh;
    border-radius: 5px;
}

/* Kontajner pod oddelovačom */
#timer-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
}

#timer-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

#active-timer {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.hidden { display: none !important; }

.btn-time {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #00e676;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: bold;
    padding: 15px 40px;
    margin: 10px 0;
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.3), inset 0 0 5px rgba(0, 230, 118, 0.2);
    width: 100%;
    max-width: 300px;
}

.btn-time:active {
    background-color: #00e676;
    color: #121212;
    transform: scale(0.97);
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.7);
}

/* Časovač displej a Amber výstraha */
#active-timer-label {
    font-size: 1.2rem;
    color: #00e676;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: bold;
    margin-bottom: 5px;
    text-align: center;
}

#time-display {
    font-size: 5rem;
    font-weight: bold;
    font-variant-numeric: tabular-nums;
    margin-bottom: 30px;
    letter-spacing: 2px;
    transition: color 0.3s ease;
}

/* Jantárová výstraha na posledných 10 sekúnd */
#time-display.amber {
    color: #ffb300;
}

#btn-cancel {
    background: transparent;
    color: #ff5252;
    border: 2px solid #ff5252;
    border-radius: 50px;
    font-size: 1.2rem;
    padding: 15px 40px;
    cursor: pointer;
    transition: all 0.1s ease;
    box-shadow: 0 0 10px rgba(255, 82, 82, 0.3);
}

#btn-cancel:active {
    background-color: #ff5252;
    color: #121212;
    transform: scale(0.97);
}

#no-sleep-video {
    display: none;
    width: 1px;
    height: 1px;
}

@keyframes flashAlert {
    0%, 100% { background-color: #ff5252; }
    50% { background-color: #121212; }
}

.flashing {
    animation: flashAlert 0.5s infinite;
}