/**
 * COPYRIGHT 2023 Micah De Silva
 */

body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    margin-top: 20vh;
    background-color: #f0f0f0;
    /*background-color: #141414;*/
    /*color: #ffffff;*/
}

.container {
    text-align: center;
    height: 50vh;
}

.buttonDiv {
    position: absolute;
    bottom: 10vh;
    height: 10vh;
    display: flex;
    align-items: center;
    flex-direction: column;
}

button {
    cursor: pointer;
    padding: 10px 20px;
    font-size: 16px;
    background-color: #00aa69;
    color: white;
    border: none;
    border-radius: 5px;
    margin-bottom: 30px;
    opacity: 0;
    transition: transform 0.1s ease-out, background-color 0.2s ease-out, opacity 0.5s ease-in;
}

button:active {
    background-color: #000000; /* Even darker on click */
    /*transform: translateY(2px); /* Slight push-down effect */
    transform: scale(0.9);
}

/* Animation for text appearance */
@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Apply the animation to the result text */
#result {
    animation: popIn 0.3s ease-out;
    font-size: 30px;
    display: inline-block;
    font-weight: bold;
    margin-bottom: 10px;
    text-transform: capitalize;
}

#historyTitle {
    margin-top: 30px;
    font-size: 18px;
    font-weight: bold;
}

#history {
    list-style-type: none;
    padding-left: 0;
}

@keyframes fadeIn {
    from {
        opacity: 1;
        transform: translateY(-20px);
        font-size: 30px;
        font-weight: bold;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        font-size: 16px;
        font-weight: normal;
    }
}
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Apply the fadeIn animation to all list items when they're added */
#history li {
    animation: fadeIn 0.2s ease-out;
    padding: 5px 0;
    opacity: 1;
    transition: margin-top 0.2s ease-out; /* Smooth transition for margin changes */
    text-transform: capitalize;
}

#history li.fade-out {
    animation: fadeOut 0.2s ease-out forwards;
}

#result.fade-out {
    animation: fadeOut 0.2s ease-out forwards;
}

#timerContainer.fade-out {
    animation: fadeOut 0.2s ease-out forwards;
}

#timerContainer {
    font-size: 1.5rem;
    font-family: monospace;
    margin: 1rem 0;
    transition: color 0.3s ease;
}

.timer-expired {
    color: red;
}

.new-item {
    margin-top: -43px; /* Start above the visible area */
    font-size: 30px;
    font-weight: bold;
}
