:root {
    --primary-color: #4A90E2;
    --dark-text: #333;
    --light-bg: #f7f9fc;
    --container-bg: #ffffff;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-bg);
    color: var(--dark-text);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 1rem;
    box-sizing: border-box;
}

.container {
    background: var(--container-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
    width: 100%;
    max-width: 500px;
}

textarea {
    width: 100%;
    height: 100px;
    padding: 10px;
    margin-bottom: 1rem;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #357ABD;
}

.secondary {
    background-color: #e0e0e0;
    color: #333;
    margin-top: 0.5rem;
}

.secondary:hover {
    background-color: #c7c7c7;
}

#result-text {
    margin-top: 1.5rem;
    text-align: left;
    /* Remove old styles */
    background-color: transparent;
    padding: 0;
    border-radius: 0;
}


#loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 1rem auto;
}

.hidden {
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.calorie-option {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.5rem; /* Adds space between checkbox and label */
}

#calorie-input-container {
    margin-bottom: 1rem;
}

#calorie-input-container input {
    width: 100px;
    padding: 8px;
    margin-left: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.recipe-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden; /* Important for the animation */
    background-color: #fff;
}

.recipe-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: #f9f9f9;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.recipe-header:hover {
    background-color: #f1f1f1;
}

.recipe-name {
  color: var(--primary-color);
}

.recipe-details {
    max-height: 0; /* This is how we hide it by default */
    opacity: 0;
    padding: 0 1rem; /* No vertical padding when hidden */
    transition: max-height 0.5s ease-out, opacity 0.3s ease-in, padding 0.5s ease-out;
    overflow: hidden;
}

/* This is the style for when a card is clicked */
.recipe-card.active .recipe-details {
    max-height: 1000px; /* Animate to a large height */
    opacity: 1;
    padding: 1rem;
    border-top: 1px solid #eee;
}
#show-more-btn {
    margin-top: 1rem;
}