/* Global Body Styles */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    min-height: 100vh;
}

/* Background Color Animation */
body.fading-background {
    animation: backgroundAnimation 15s ease-in-out infinite;
}

@keyframes backgroundAnimation {
    0% {
        background-color: rgb(108, 92, 231);
    }

    /* Purple */
    50% {
        background-color: #ff7675;
    }

    /* Pink */
    100% {
        background-color: #6c5ce7;
    }

    /* Purple */
}


/* Site Title Styling */
.site-title {
    font-size: 6em;
    color: #e75cdb;
    text-align: center;
    text-shadow: 5px 5px 1px rgba(0, 0, 0, 0.1);
}


/* Container Styling */
.container {
    background-color: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0px 10px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 600px;
    width: 90%;
    margin: 50px auto;
}

/* How It Works Styling */
.how-it-works {
    margin: 20px auto;
    box-shadow: 10px 10px 5px rgba(0, 0, 0, 5);
    max-width: 400px;
}

ol {
    text-align: left;
    padding-left: 20px;
}

ol li {
    margin-bottom: 20px;
}

img {
    margin-top: 10px;
}

/* Header Styling */
h1 {
    font-size: 2.5em;
    color: #6c5ce7;
    margin-bottom: 20px;
    animation: fadeIn 1.5s ease-in-out;
}

h2 {
    font-size: 1.5em;
    color: #6c5ce7;
    margin-bottom: 20px;
}

/* Form Styling */
form {
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 1.2em;
    margin-bottom: 10px;
    color: #6c5ce7;
}

input[type="text"], input[type="password"] {
    width: 100%;
    padding: 15px;
    font-size: 1.2em;
    border-radius: 10px;
    border: 2px solid #6c5ce7;
    outline: none;
    margin-bottom: 20px;
    box-sizing: border-box;
    transition: border 0.3s ease;
}

input[type="text"]:focus, input[type="password"]:focu {
    border-color: #a29bfe;
}

/* Button Styling */
button, #submit-btn, #create-event-btn {
    background-color: #6c5ce7;
    color: white;
    border: none;
    padding: 15px 25px;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

button:hover, #submit-btn:hover, #create-event-btn:hover {
    background-color: #a29bfe;
    transform: scale(1.05);
}

/* Food Option Styles */
.food-option {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    text-align: left;
}

.food-option .option-number {
    flex: 0;
    margin-right: 10px;
    font-size: 1.2em;
    color: #6c5ce7;
}

.food-option input[type="text"] {
    flex: 2;
    padding: 15px;
    font-size: 1.2em;
    border-radius: 10px;
    border: 2px solid #6c5ce7;
    outline: none;
    transition: border 0.3s ease;
    box-sizing: border-box;
    margin-right: 10px;
}

.food-option button {
    flex: 0;
    border: none;
    color: white;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 5px;
    margin-left: 10px;
}

/* Arrow Button Styling */
.arrow-btn {
    background-color: #a29bfe;
    border: none;
    cursor: pointer;
    padding: 5px;
    border: solid black;
    border-width: 0 3px 3px 0;
    display: inline-block;
}

.arrow {
    border: solid rgb(255, 255, 255);
    border-width: 0 3px 3px 0;
    display: inline-block;
    padding: 3px;
}

.up {
    transform: rotate(-135deg);
    -webkit-transform: rotate(-135deg);
}

.down {
    transform: rotate(45deg);
    -webkit-transform: rotate(45deg);
}



/* Delete Button */
.delete-btn {
    background-color: #ff4d4d;
    border: none;
    color: white;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 5px;
    margin-left: 10px;
}

.delete-btn:hover {
    background-color: #ff4d4d;
    /* Same as default color */
    color: white;
    /* Keep text color white */
}



/* Additional Styling for Counts */
.item-name {
    flex: 1;
    text-align: left;
    font-size: 1.2em;
}

.count-container {
    display: flex;
    align-items: center;
}

.count {
    width: 50px;
    height: 30px;
    border: 1px solid #ccc;
    padding: 5px;
    text-align: center;
    border-radius: 5px;
    margin: 0 10px;
}

.increment, .decrement {
    background-color: #6c5ce7;
    color: #fff;
    border: none;
    padding: 5px 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
}

.increment:hover, .decrement:hover {
    background-color: #5a4bc7;
}

.decrement:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* Media Queries for Responsiveness */
/* Media Queries for Responsiveness */
@media (max-width: 600px) {
    .container {
        padding: 20px;
        width: 80%;
    }

    .how-it-works {
        width: 70%;
    }

    h1 {
        font-size: 2em;
    }

    .site-title {
        font-size: 4em;
    }

    button {
        font-size: 1em;
    }

    .count-container {
        margin-top: 10px;
    }

    .increment, .decrement {
        padding: 5px 15px;
    }

    .item-name {
        font-size: 1.1em;
        margin-bottom: 10px;
    }

    #submit-btn {
        font-size: 1.1em;
        padding: 15px;
    }

    /* Adjust food-option layout for smaller screens */
    .food-option {
        flex-direction: row;
        /* Ensure it stays in a row on smaller screens */
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    .food-option input[type="text"] {
        flex: 1;
        width: 70%;
        /* Adjust the width to fit alongside the buttons */
        margin-bottom: 10px;
    }

    .food-option-buttons {
        display: flex;
        justify-content: flex-end;
        width: 30%;
        /* Adjust the width to allow space for the buttons */
    }

    .arrow-btn, .delete-btn {
        margin-left: 5px;
        padding: 8px;
        /* Adjust the padding for better touch targets on mobile */
    }

    .food-option .arrow-btn, .food-option .delete-btn {
        flex-shrink: 0;
        /* Ensure buttons do not shrink */
    }
}

/* Confetti Animation */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    opacity: 0.6;
    animation: confettiFall linear infinite;
    top: -10px;
}

@keyframes confettiFall {
    0% {
        transform: translateY(-100vh) rotate(0);
    }

    100% {
        transform: translateY(100vh) rotate(360deg);
    }
}

/* Bounce Animation */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

h1.bouncing {
    animation: bounce 2s infinite;
}