* {
    box-sizing: border-box;
}

body {
    font-family: sans-serif;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f0f0f0;
    margin: 0;
    /* Remove default body margin */
}

.container {
    background-color: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    /* Center the container */
}

h2 {
    text-align: center;
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 5px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"] {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

button {
    width: 100%;
    padding: 12px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background-color: #45a049;
}

/* Success button animation */
button.success {
    background-color: #4CAF50;
    /* Green */
    color: white;
    animation: success-pulse 0.5s ease-in-out;
}

@keyframes success-pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Success message styling */
.success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    font-size: 1rem;
    z-index: 1000;
    animation: fade-in-out 3s ease-in-out;
}

@keyframes fade-in-out {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }

    10% {
        opacity: 1;
        transform: translateY(0);
    }

    90% {
        opacity: 1;
        transform: translateY(0);
    }

    100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.signup-link {
    text-align: center;
    margin-top: 10px;
}

.signup-link a {
    color: #007bff;
    text-decoration: none;
}

.signup-link a:hover {
    text-decoration: underline;
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.navigation-buttons button {
    width: 48%;
}

.header {
    overflow: hidden;
    background-color: #f1f1f1;
    padding: 10px;
}

.header a {
    float: left;
    color: black;
    text-align: center;
    padding: 10px;
    text-decoration: none;
    font-size: 18px;
    line-height: 25px;
    border-radius: 4px;
    display: block;
    width: 100%;
}

.header a.logo {
    font-size: 25px;
    font-weight: bold;
}

.header a:hover {
    background-color: #ddd;
    color: black;
}

.header a.active {
    background-color: dodgerblue;
    color: white;
}

.header-right {
    float: right;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 5px;
}

@media screen and (max-width: 500px) {
    .header a {
        float: none;
        display: block;
        text-align: left;
    }

    .header-right {
        float: none;
    }
}

.menu-button {
    cursor: pointer;
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
}

.menu {
    display: none;
    position: absolute;
    background-color: white;
    border: 1px solid #ccc;
    padding: 10px;
    z-index: 1;
    right: 20px;
    top: 60px;
    border-radius: 5px;
}

.menu a {
    display: block;
    padding: 5px;
    text-decoration: none;
    color: #333;
}

.food-info {
    text-align: center;
    margin-bottom: 20px;
    padding: 10px;
}

.buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
}

#progress-graph {
    height: 300px;
    border: 1px solid #ccc;
    width: 100%;
    margin-top: 20px;
}

/* Tablet and desktop styles */
@media screen and (min-width: 768px) {
    .buttons {
        flex-direction: row;
        justify-content: center;
    }

    .buttons button {
        width: auto;
        min-width: 150px;
    }

    .header-right {
        flex-direction: row;
        align-items: center;
    }

    .header a {
        width: auto;
    }
}

@media screen and (max-width: 480px) {
    h2 {
        font-size: 1.5rem;
    }

    p {
        font-size: 0.9rem;
    }

    #next_task,
    #todays-goal {
        font-size: 0.9rem;
        padding: 0 10px;
    }
}

.menu-button {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 10;
}

.menu-button span {
    width: 30px;
    height: 3px;
    background: #333;
    border-radius: 10px;
    transition: all 0.3s linear;
}

.header-right {
    transition: transform 0.3s ease-in-out;
}

@media screen and (max-width: 768px) {
    .menu-button {
        display: flex;
    }

    .header-right {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 250px;
        background-color: white;
        padding: 50px 20px;
        transform: translateX(100%);
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    }

    .header-right.active {
        transform: translateX(0);
    }

    .menu-button.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-button.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-button.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}

/* Floating button styling */
.floating-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #f44336;
    /* Red color */
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

.floating-button:hover {
    background-color: #d32f2f;
    /* Darker red on hover */
    transform: scale(1.1);
    /* Slightly enlarge on hover */
}

/* Modal styling */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    /* Black background with opacity */
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border-radius: 10px;
    width: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover,
.close-button:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

form label {
    display: block;
    margin-top: 10px;
    font-weight: bold;
}

form input,
form textarea,
form button {
    width: 100%;
    margin-top: 5px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

form button {
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    margin-top: 15px;
}

form button:hover {
    background-color: #45a049;
}