body {
    margin: 0;
    padding: 20px;
    font-family: Arial, sans-serif;
    background: #000000;
}

h1 {
    text-align: center;
}

#timers {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}
.timer {
    position: relative;
    width: 180px;
    min-height: 180px;
    padding: 16px;
    box-sizing: border-box;
    border-radius: 18px;
    background: #000000;
    text-align: center;
}

.timer.hunger {
    border: 5px solid #f5d76e;
}

.timer.thirst {
    border: 5px solid #9ed8f5;
}

.timer-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    font-size: 120px;
    opacity: 0.70;
}

.hunger .timer-icon {
    color: #f5d76e;
    text-shadow:
        0 0 8px #f5d76e,
        0 0 18px #f5d76e,
        0 0 32px #f5d76e;
}

.thirst .timer-icon {
    color: #9ed8f5;
    text-shadow:
        0 0 8px #9ed8f5,
        0 0 18px #9ed8f5,
        0 0 32px #9ed8f5;
}
.reset-button {
    width: 100%;
    min-height: 34px;
    margin-top: 7px;
    padding: 5px 8px;
    border: 0;
    border-radius: 9px;
    background: #eeeeee;
    font-size: 13px;
    font-weight: bold;
    touch-action: manipulation;
    position: relative;
    z-index: 1;
}

.timer h2,
.percentage,
.countdown,
.timer-buttons {
    position: relative;
    z-index: 1;
}

.timer h2 {
    margin: 5px 0 10px;
    font-size: 24px;
}

.hunger h2,
.hunger .percentage,
.hunger .countdown {
    color: #f5d76e;
    -webkit-text-stroke: 5px black;
    paint-order: stroke fill;
}

.thirst h2,
.thirst .percentage,
.thirst .countdown {
    color: #9ed8f5;
    -webkit-text-stroke: 5px black;
    paint-order: stroke fill;
}

.hunger .percentage.critical,
.thirst .percentage.critical {
    color: #ff3b30 !important;
    -webkit-text-stroke: 5px black;
}

.percentage {
    font-size: 28px;
    font-weight: bold;
}

.countdown {
    margin-top: 5px;
    font-size: 20px;
}

button {
    margin-top: 10px;
    padding: 6px 12px;
    cursor: pointer;
    border: 2px solid #000;
     opacity: 0.75;
}
.timer-buttons {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}

.timer-buttons button {
    margin-top: 0;
}

.timer-buttons {
    gap: 10px;
}

.timer-buttons button {
    min-width: 58px;
    min-height: 34px;
    padding: 5px 8px;
    border: 0;
    border-radius: 9px;
    font-size: 13px;
    font-weight: bold;
    touch-action: manipulation;
}

.timer-buttons button:active {
    transform: scale(0.96);
}

.reset-button:active {
    transform: scale(0.96);
}

.timer-buttons button:first-child {
    background: #ffffff;
}

.timer-buttons button:last-child {
    background: #eeeeee;
}

.timer-modal.hidden {
    display: none;
}

.timer-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.timer-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.timer-modal-content {
    position: relative;
    width: min(500px, 100%);
    padding: 28px;
    box-sizing: border-box;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.timer-modal-content h2 {
    margin: 0 0 24px;
    text-align: center;
    font-size: 28px;
}

.timer-edit-fields {
    display: flex;
    gap: 12px;
}

.timer-edit-fields label {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 16px;
    font-weight: bold;
}

.timer-edit-fields input {
    width: 100%;
    min-height: 64px;
    padding: 10px;
    box-sizing: border-box;
    border: 2px solid #dddddd;
    border-radius: 14px;
    text-align: center;
    font-size: 26px;
    font-weight: bold;
}

.timer-modal-buttons {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.timer-modal-buttons button {
    flex: 1;
    min-height: 60px;
    border: 0;
    border-radius: 14px;
    font-size: 18px;
    font-weight: bold;
    touch-action: manipulation;
}

.timer-modal-buttons button:active {
    transform: scale(0.97);
}

@media (max-width: 480px) {
    .timer-modal-content {
        padding: 22px;
        border-radius: 20px;
    }

    .timer-modal-content h2 {
        font-size: 24px;
    }

    .timer-edit-fields {
        gap: 8px;
    }

    .timer-edit-fields input {
        min-height: 60px;
        font-size: 22px;
    }
}

.timer.shake {
    animation: timer-shake 0.45s ease-in-out;
}

@keyframes timer-shake {
    0%,
    100% {
        transform: translate(0, 0);
    }

    10% {
        transform: translate(-7px, -5px);
    }

    20% {
        transform: translate(7px, 5px);
    }

    30% {
        transform: translate(-7px, -5px);
    }

    40% {
        transform: translate(7px, 5px);
    }

    50% {
        transform: translate(-6px, -4px);
    }

    60% {
        transform: translate(6px, 4px);
    }

    70% {
        transform: translate(-4px, -3px);
    }

    80% {
        transform: translate(4px, 3px);
    }

    90% {
        transform: translate(-2px, -1px);
    }
}

.alert.shake {
    animation: alert-shake 0.45s ease-in-out;
}

@keyframes alert-shake {
    0%,
    100% {
        transform: translate(0, 0);
    }

    10% {
        transform: translate(-7px, -5px);
    }

    20% {
        transform: translate(7px, 5px);
    }

    30% {
        transform: translate(-7px, -5px);
    }

    40% {
        transform: translate(7px, 5px);
    }

    50% {
        transform: translate(-6px, -4px);
    }

    60% {
        transform: translate(6px, 4px);
    }

    70% {
        transform: translate(-4px, -3px);
    }

    80% {
        transform: translate(4px, 3px);
    }

    90% {
        transform: translate(-2px, -1px);
    }
}

#alert-sound-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px auto 30px;
}

#alert-sound-controls button {
    min-height: 40px;
    padding: 6px 14px;
    border: 0;
    border-radius: 9px;
    background: #eeeeee;
    font-size: 13px;
    font-weight: bold;
    touch-action: manipulation;
}

#alert-sound-controls button:active {
    transform: scale(0.96);
}

#alert-sound-enable.enabled {
    border: 3px solid #4caf50;
}

#alert-sound-mute.muted {
    border: 3px solid #ff3b30;
}

#alerts {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.alert {
    position: relative;
    width: 180px;
    height: 180px;
    padding: 14px;
    box-sizing: border-box;
    border-radius: 18px;
    background: #000000;
    text-align: center;
}

.alert-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    font-size: 72px;
    opacity: 0.25;
}

.alert h2,
.alert-countdown,
.alert-buttons,
.acknowledge-button {
    position: relative;
    z-index: 1;
}

.alert h2 {
    margin: 2px 0 4px;
    font-size: 17px;
}

.alert-countdown {
    font-size: 22px;
    font-weight: bold;
    color: #ff3b30;
}

.alert-buttons {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 7px;
}

.alert-buttons button {
    min-width: 58px;
    min-height: 34px;
    padding: 5px 8px;
    border: 0;
    border-radius: 9px;
    background: #ffffff;
    font-size: 13px;
    font-weight: bold;
    touch-action: manipulation;
}

.acknowledge-button {
    width: 100%;
    min-height: 34px;
    margin-top: 7px;
    padding: 5px 8px;
    border: 0;
    border-radius: 9px;
    background: #eeeeee;
    font-size: 13px;
    font-weight: bold;
    touch-action: manipulation;
}

.alert button:active {
    transform: scale(0.96);
}

.alert button:disabled {
    opacity: 0.5;
    cursor: default;
}

.alert.faint {
    border: 5px solid #b8b8b8;
}

.alert.faint .alert-icon,
.alert.faint h2 {
    color: #b8b8b8;
}

.alert.panic {
    border: 5px solid #c77dff;
}

.alert.panic .alert-icon,
.alert.panic h2 {
    color: #c77dff;
}

.alert.seizure {
    border: 5px solid #c4ff94;
}

.alert.seizure .alert-icon,
.alert.seizure h2 {
    color: #c4ff94;
}

.alert.stroke {
    border: 5px solid #ff5c5c;
}

.alert.stroke .alert-icon,
.alert.stroke h2 {
    color: #ff5c5c;
}