* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

.header_link {
    text-decoration: none;
    color: #565656;
    padding: 20px;
    position: absolute;
    z-index: 10;
}

.pulse-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    will-change: opacity, box-shadow;
}

.pulse-container.pulsing-in {
    animation: breathPulseIn var(--animation-duration, 4s) ease-in-out 1;
    animation-fill-mode: forwards;
}

.pulse-container.pulsing-hold {
    animation: breathPulseHold var(--animation-duration, 4s) ease-in-out 1;
    animation-fill-mode: forwards;
}

.pulse-container.pulsing-out {
    animation: breathPulseOut var(--animation-duration, 4s) linear 1;
    animation-fill-mode: forwards;
}

.pulse-container.pulsing-hold-out {
    animation: breathPulseHoldOut var(--animation-duration, 4s) ease-in-out 1;
    animation-fill-mode: forwards;
    opacity: 0 !important; /* Force opacity to 0 to prevent flashing */
}

@keyframes breathPulseIn {
    0% {
        box-shadow: 0 0 0px #228FFF inset;
        opacity: 0;
    }
    100% {
        box-shadow: 0 0 50px #228FFF inset;
        opacity: 1;
    }
}

@keyframes breathPulseHold {
    0% {
        box-shadow: 0 0 50px #228FFF inset;
        opacity: 1;
    }
    100% {
        box-shadow: 0 0 50px #228FFF inset;
        opacity: 1;
    }
}

@keyframes breathPulseOut {
    0% {
        box-shadow: 0 0 50px #228FFF inset;
        opacity: 1;
    }
    100% {
        box-shadow: 0 0 0px #228FFF inset;
        opacity: 0;
    }
}

@keyframes breathPulseHoldOut {
    0% {
        box-shadow: 0 0 0px #228FFF inset;
        opacity: 0;
    }
    100% {
        box-shadow: 0 0 0px #228FFF inset;
        opacity: 0;
    }
}

.focus_content_wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    justify-content: space-between;
    z-index: 1;
}

.focus_title_container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding-top: 20px;
}

.screen {
    width: 100%;
    min-height: 100vh;
    display: none;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    position: relative;
}

.screen:not(.hidden) {
    display: flex;
    opacity: 1;
}

.screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.title {
    font-size: 4em;
    font-weight: bold;
    text-align: center;
    margin: 50px auto 0;
    padding-bottom: 0;
    text-shadow:
        0 0 10px #ff7f00,
        0 0 20px #002fff,
        3px 11px 30px #4ac5f0,
        -11px -3px 17px #ff00ff,
        2px -4px 14px #00ff00;
}

.subtext {
    font-size: 1.2em;
    color: #565656;
    margin: 10px 0;
    text-align: center;
}

.description {
    font-size: 1em;
    text-align: center;
    line-height: 1.5;
    width: 60%;
    margin-bottom: 20px;
}

.countdown-timer {
    font-size: 0.8em;
    font-style: italic;
    color: #565656;
    text-align: center;
    position: relative;
    z-index: 1;
    margin-bottom: 5px;
}

@media screen and (min-width: 768px) {
    .description {
        width: 40%;
    }
}

@media screen and (min-width: 1024px) {
    .description {
        width: 30%;
    }
}

.exercise-name {
    font-size: 4em;
    font-weight: bold;
    text-align: center;
    margin: 50px auto 20px;
    text-shadow:
        0 0 10px #ff7f00,
        0 0 20px #002fff,
        3px 11px 30px #4ac5f0,
        -11px -3px 17px #ff00ff,
        2px -4px 14px #00ff00;
}

.instructions {
    font-size: 1.2em;
    color: #565656;
    text-align: center;
    margin-bottom: 30px;
}

.bottom_button_container {
    position: relative;
    margin-top: auto;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 40px;
}

#exercise-screen .bottom_button_container {
    flex-direction: row;
    gap: 10px;
}

#welcome-screen .bottom_button_container,
#end-screen .bottom_button_container {
    flex-direction: column;
}

.button {
    background: transparent;
    color: #ccc;
    border: 1px solid #ccc;
    padding: 10px 20px;
    margin: 10px;
    cursor: pointer;
    font-size: 1em;
    border-radius: 25px;
    transition: opacity 0.2s;
}

.button:hover {
    opacity: 0.9;
}

.action_button {
    background-color: #228FFF;
    color: white;
    padding: 10px 40px;
    border-radius: 25px;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    transition: opacity 0.2s;
}

.action_button:hover {
    opacity: 0.9;
}

.end_button {
    background: transparent;
    color: #E85A5F;
    border: 1px solid #E85A5F;
    padding: 10px 20px;
    font-size: 1.2em;
    border-radius: 25px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.end_button:hover {
    opacity: 0.9;
}

#animation-screen .cancel-button {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
}

.mute-button,
.unmute-button {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    z-index: 2;
}

.prompt-seconds {
    font-size: 2em;
    font-weight: bold;
    text-align: center;
    position: relative;
    z-index: 1;
    transition: opacity 0.5s ease-in-out;
    margin-bottom: 5px;
    text-shadow:
        0 0 10px #ff7f00,
        0 0 20px #002fff,
        3px 11px 30px #4ac5f0,
        -11px -3px 17px #ff00ff,
        2px -4px 14px #00ff00;
}

.prompt-action {
    font-size: 1em;
    text-align: center;
    position: relative;
    z-index: 1;
    transition: opacity 0.4s ease-in-out;
    margin-bottom: 5px;
}

.prompt-additional {
    font-size: 0.8em;
    font-style: italic;
    color: #565656;
    text-align: center;
    position: relative;
    z-index: 1;
    transition: opacity 0.4s ease-in-out;
    display: block;
    margin-bottom: 5px;
}

.prompt-seconds.fade,
.prompt-action.fade,
.prompt-additional.fade {
    opacity: 0;
}

.end-text {
    font-size: 4em;
    font-weight: bold;
    text-align: center;
    margin: 50px auto 10px;
    text-shadow:
        0 0 10px #ff7f00,
        0 0 20px #002fff,
        3px 11px 30px #4ac5f0,
        -11px -3px 17px #ff00ff,
        2px -4px 14px #00ff00;
}

.end-subtext {
    font-size: 1.2em;
    color: #565656;
    text-align: center;
    margin-bottom: 20px;
}

@media (max-width: 480px) {
    .title, .exercise-name, .end-text {
        font-size: 2.5em;
    }
    .prompt-seconds {
        font-size: 3.5em;
    }
    .prompt-action {
        font-size: 1.5em;
    }
    .prompt-additional {
        font-size: 0.9em;
    }
    .button, .end_button {
        padding: 8px 16px;
    }
    .action_button {
        padding: 8px 32px;
    }
    .mute-button,
    .unmute-button {
        width: 24px;
        height: 24px;
    }
}