/* Reset & Base */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary-50: #F7F5FB;
    --primary-100: #ECE8F5;
    --primary-200: #D8D0EA;
    --primary-300: #B9C9E0;
    --primary-400: #9AB3D6;
    --primary-500: #7A9CC6;
    --primary-600: #6B8CAE;
    --primary-700: #587599;
    --primary-800: #445C7A;
    --primary-900: #2D2A35;
    --secondary-50: #FDF6F0;
    --secondary-100: #FBEADD;
    --secondary-200: #F6D2B3;
    --secondary-300: #EFB587;
    --secondary-400: #E79E68;
    --secondary-500: #E0894F;
    --secondary-600: #D97D42;
    --secondary-700: #B5652F;
    --secondary-800: #8F4F26;
    --secondary-900: #5C331A;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-900: #111827;
    --green-100: #D1FAE5;
    --green-800: #065F46;
    --yellow-100: #FEF3C7;
    --yellow-800: #92400E;
    --red-100: #FEE2E2;
    --red-800: #991B1B;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background: radial-gradient(circle at 50% 0%, #f6f4fc 0%, #e4e1f5 60%, #d9d5f0 100%);
    background-attachment: fixed;
    color: var(--primary-900);
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 2.5rem 1.5rem;
}

.app-shell {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 2rem;
    box-shadow: 0 30px 70px rgba(90, 70, 150, 0.18);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
}


/* Header */

.site-header {
    font-family: 'Poppins', sans-serif;
    background: #ffffff;
    box-shadow: 0 1px 0 var(--primary-100);
    z-index: 50;
}

.hero-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-700);
    padding: 2rem 2.5rem 0.5rem;
}

.header-content {
    max-width: 100%;
    margin: 0 auto;
    padding: 1.5rem 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.header-left {
    flex: 0 0 auto;
    min-width: 0;
}

.header-center {
    flex: 0 0 auto;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    text-align: left;
}

.site-header--home .header-left {
    order: 3;
}

.site-header--home .header-center {
    order: 1;
}

.site-header--home .header-right {
    order: 2;
    margin-left: auto;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.header-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    letter-spacing: -0.02em;
}

.header-tagline {
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem;
    color: var(--gray-600);
    margin: 0;
    font-weight: 400;
}

.header-nav {
    display: none;
}

.nav-link {
    font-family: 'Poppins', sans-serif;
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: all 0.2s;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-600);
    background-color: var(--primary-50);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    flex: 0 0 auto;
}


/* Header dropdown */

.header-dropdown {
    position: relative;
}

.header-dropdown-toggle {
    font-family: 'Poppins', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: transparent;
    border: 2px solid var(--primary-200);
    border-radius: 1rem;
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-dropdown-toggle:hover {
    background: var(--primary-50);
    border-color: var(--primary-300);
    color: var(--primary-700);
}

.back-to-home {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--gray-700);
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.05em;
}

.back-to-home:hover {
    opacity: 0.8;
}

.header-dropdown-toggle .dropdown-icon {
    width: 1rem;
    height: 1rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-dropdown-content {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 280px;
    max-height: 0;
    overflow: hidden;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(122, 156, 198, 0.2);
    border: 1px solid var(--primary-100);
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
    z-index: 100;
}

.header-dropdown-content.dropdown-open {
    max-height: 400px;
    opacity: 1;
    padding: 1rem;
}

.header-recipe-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--primary-100);
    margin-bottom: 0.5rem;
}

.header-recipe-item:last-child {
    margin-bottom: 0;
}

.header-recipe-item:hover {
    background: var(--primary-50);
    border-color: var(--primary-300);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(122, 156, 198, 0.1);
}

.header-recipe-image {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.75rem;
    object-fit: cover;
    flex-shrink: 0;
}

.header-recipe-info {
    flex: 1;
    min-width: 0;
}

.header-recipe-name {
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.header-recipe-time {
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.account-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    border: none;
    border-radius: 2rem;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(122, 156, 198, 0.25);
    text-decoration: none;
}

.account-btn:hover {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    box-shadow: 0 6px 20px rgba(122, 156, 198, 0.35);
    transform: translateY(-2px) scale(1.02);
}

.account-btn:active {
    transform: translateY(0);
}

.account-icon {
    width: 1.25rem;
    height: 1.25rem;
    stroke-width: 2.5;
}

.account-text {
    font-weight: 500;
}


/* Footer */

.site-footer {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(247, 245, 251, 0.8) 100%);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--primary-100);
    margin-top: auto;
    padding: 2rem 0;
}

.footer-content {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
    text-align: center;
}

.footer-credit {
    color: var(--gray-600);
    font-size: 0.9375rem;
    margin: 0;
    line-height: 1.8;
}


/* Recipe detail page */

.recipe-detail-wrapper {
    max-width: 1000px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    margin-bottom: 2rem;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid var(--primary-200);
    border-radius: 1rem;
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.back-button:hover {
    background: var(--primary-50);
    border-color: var(--primary-300);
    color: var(--primary-700);
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(122, 156, 198, 0.15);
}

.back-button svg {
    width: 1.25rem;
    height: 1.25rem;
}

.recipe-detail {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(247, 245, 251, 0.7) 100%);
    border-radius: 2rem;
    box-shadow: 0 8px 32px rgba(122, 156, 198, 0.1);
    border: 1px solid var(--primary-100);
    overflow: hidden;
}

.recipe-detail-hero {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 1.5rem;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-100), var(--primary-200));
    box-shadow: 0 12px 32px rgba(122, 156, 198, 0.25);
    border: 1px solid var(--primary-100);
}

@media (min-width: 768px) {
    .recipe-detail-hero {
        aspect-ratio: 21 / 9;
    }
}

.recipe-detail-hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recipe-detail-badges {
    display: flex;
    gap: 0.75rem;
}

.recipe-detail-hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, transparent 30%, transparent 55%, rgba(0, 0, 0, 0.75) 100%);
}

.recipe-detail-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.recipe-detail-hero-bottom {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.recipe-detail-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    line-height: 1.15;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

@media (min-width: 768px) {
    .recipe-detail-title {
        font-size: 2.5rem;
    }
}

.recipe-completed-toggle-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.recipe-completed-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
    font-family: 'Nunito', sans-serif;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.recipe-completed-checkbox {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 3.5rem;
    height: 1.875rem;
    background: var(--gray-300);
    border-radius: 1.875rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: white;
    top: 0.1875rem;
    left: 0.1875rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.recipe-completed-checkbox:checked+.toggle-slider {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    box-shadow: 0 0 0 3px rgba(122, 156, 198, 0.2);
}

.recipe-completed-checkbox:checked+.toggle-slider::before {
    transform: translateX(1.625rem);
    box-shadow: 0 2px 6px rgba(122, 156, 198, 0.4);
}

.recipe-completed-checkbox:checked~.toggle-label {
    color: var(--primary-600);
}

.toggle-label {
    transition: color 0.3s ease;
    white-space: nowrap;
}

.recipe-completed-toggle:hover .toggle-slider {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.recipe-completed-checkbox:checked:hover+.toggle-slider {
    box-shadow: 0 0 0 4px rgba(122, 156, 198, 0.25);
}

.recipe-detail-author {
    font-size: 1.0625rem;
    color: #ffffff;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
    margin: 0;
}

.recipe-detail-content {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.6);
}

.recipe-detail-columns {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .recipe-detail-columns {
        grid-template-columns: 2fr 3fr;
    }
}

.recipe-col-ingredients {
    background: var(--primary-50);
    border-radius: 1.5rem;
    padding: 1.75rem;
}

.recipe-col-steps {
    background: #ffffff;
    border: 1px solid var(--primary-100);
    border-radius: 1.5rem;
    padding: 1.75rem;
}

.recipe-section {
    margin-bottom: 2.5rem;
}

.recipe-detail-columns .recipe-section {
    margin-bottom: 0;
}

.recipe-section:last-child {
    margin-bottom: 0;
}

.recipe-section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-700);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-200);
}

.ingredients-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.servings-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.servings-label {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 1rem;
}

.servings-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid var(--primary-100);
    border-radius: 1rem;
    padding: 0.25rem;
}

.servings-btn {
    width: 2rem;
    height: 2rem;
    border: none;
    background: var(--primary-100);
    color: var(--primary-700);
    border-radius: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.servings-btn:hover {
    background: var(--primary-200);
    transform: scale(1.1);
}

.servings-input {
    width: 3rem;
    text-align: center;
    border: none;
    background: transparent;
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-700);
    outline: none;
}

.ingredients-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.ingredient-item {
    padding: 1rem 1.25rem;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid var(--primary-100);
    border-radius: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.ingredient-item:hover {
    background: var(--primary-50);
    border-color: var(--primary-300);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(122, 156, 198, 0.15);
}

.ingredient-item.checked {
    background: var(--primary-50);
    border-color: var(--primary-200);
}

.ingredient-checkbox-label-detail {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    width: 100%;
}

.ingredient-checkbox-detail {
    display: none;
}

.checkbox-custom-detail {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid var(--primary-300);
    border-radius: 0.5rem;
    background: white;
    position: relative;
    flex-shrink: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ingredient-checkbox-detail:checked+.checkbox-custom-detail {
    background: var(--primary-300);
    border-color: var(--primary-400);
}

.ingredient-checkbox-detail:checked+.checkbox-custom-detail::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 0.875rem;
}

.ingredient-name {
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    color: var(--gray-700);
    flex: 1;
    font-weight: 500;
}

.ingredient-quantity-display {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 400;
    font-style: italic;
}

.steps-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: step-counter;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step-item {
    display: flex;
    gap: 1.5rem;
    counter-increment: step-counter;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid var(--primary-100);
    border-radius: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.step-item:hover {
    background: var(--primary-50);
    border-color: var(--primary-300);
    box-shadow: 0 4px 16px rgba(122, 156, 198, 0.1);
}

.step-item.completed {
    opacity: 0.6;
}

.step-item.completed .step-text {
    text-decoration: line-through;
    text-decoration-color: var(--gray-400);
    text-decoration-thickness: 2px;
}

.step-number {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--secondary-500);
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.0625rem;
    box-shadow: 0 4px 12px rgba(224, 137, 79, 0.25);
}

.step-text {
    flex: 1;
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--gray-700);
    padding-top: 0.5rem;
}

.chef-tip {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary-100), var(--primary-50));
    border: 2px solid var(--primary-300);
    border-radius: 1.5rem;
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--gray-700);
    margin: 0;
    font-style: italic;
}

.recipe-not-found {
    text-align: center;
    padding: 4rem 2rem;
}

.recipe-not-found h2 {
    font-size: 2rem;
    color: var(--primary-700);
    margin-bottom: 1rem;
}

.recipe-not-found p {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .recipe-detail-header {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }

    .recipe-detail-title {
        font-size: 3rem;
    }

    .recipe-detail-title-row {
        flex-direction: row;
        align-items: center;
    }

    .recipe-completed-toggle-container {
        justify-content: flex-start;
    }

    .ingredients-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .recipe-detail-header {
        padding: 3rem;
    }

    .recipe-detail-content {
        padding: 3rem;
    }

    .recipe-detail-title {
        font-size: 3.5rem;
    }

    .recipe-detail-title-row {
        flex-direction: row;
        align-items: center;
    }
}


/* Mobile menu toggle */

.menu-toggle {
    display: none;
    position: fixed;
    top: 1.5rem;
    left: 1rem;
    z-index: 100;
    padding: 0.5rem;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s;
}

.menu-toggle:hover {
    background-color: var(--gray-50);
}

.menu-icon,
.close-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--gray-700);
}

.hidden {
    display: none !important;
}


/* Overlay */

.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 39;
}

.overlay.active {
    display: block;
}


/* Container */

.container {
    display: flex;
    flex: 1;
    width: 100%;
}


/* Sidebar */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 22rem;
    max-width: 85vw;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 245, 251, 0.95) 100%);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--primary-100);
    box-shadow: 4px 0 20px rgba(122, 156, 198, 0.08);
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    padding-top: 5rem;
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-content {
    padding: 2rem;
    padding-top: 2rem;
}

.sidebar-header {
    margin-bottom: 2rem;
}

.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}

.subtitle {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}


/* Themes */

.themes-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.theme-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1.25rem;
    border-radius: 1rem;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.6);
    color: var(--gray-700);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.theme-btn:hover {
    background-color: var(--primary-50);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(122, 156, 198, 0.15);
}

.theme-btn.active {
    background: linear-gradient(135deg, var(--primary-100), var(--secondary-100));
    color: var(--primary-700);
    border-color: var(--primary-300);
    box-shadow: 0 4px 16px rgba(122, 156, 198, 0.25);
    transform: translateX(4px);
}

.theme-icon {
    font-size: 1.25rem;
}


/* Search */

.search-box {
    position: relative;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: var(--gray-400);
}

.search-input {
    font-family: 'Nunito', sans-serif;
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 2.75rem;
    border: 2px solid var(--primary-100);
    border-radius: 1.5rem;
    font-size: 0.9375rem;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.8);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.search-input:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(122, 156, 198, 0.2);
}


/* Dropdown toggle */

.dropdown-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-bottom: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-toggle:hover {
    opacity: 0.8;
}

.dropdown-toggle .section-title {
    margin-bottom: 0;
}

.dropdown-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--gray-600);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}


/* Last recipes */

.last-recipes {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
}

.last-recipes.dropdown-open {
    max-height: 500px;
    opacity: 1;
    margin-top: 0.5rem;
}

.last-recipe-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.75rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid var(--primary-100);
}

.last-recipe-item:hover {
    background: var(--primary-50);
    border-color: var(--primary-300);
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(122, 156, 198, 0.1);
}

.last-recipe-image {
    width: 4rem;
    height: 4rem;
    border-radius: 0.5rem;
    object-fit: cover;
    flex-shrink: 0;
}

.last-recipe-info {
    flex: 1;
    min-width: 0;
}

.last-recipe-name {
    font-family: 'Poppins', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-900);
    margin-bottom: 0.125rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.last-recipe-time {
    font-size: 0.75rem;
    color: var(--gray-500);
}


/* Main content */

.main-content {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.content-wrapper {
    padding: 2.5rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}


/* Header subtitle section */

.header-subtitle {
    text-align: center;
    padding-top: 0.75rem;
    margin-top: 1rem;
    width: 100%;
}

.highlight-count {
    color: var(--primary-600);
    font-weight: 700;
    font-size: 1.1em;
}

.page-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-700);
    margin: 0 auto;
    letter-spacing: -0.01em;
    white-space: nowrap;
    text-align: left;
    display: block;
}

.page-subtitle {
    color: var(--gray-600);
    font-size: 0.9375rem;
    line-height: 1.6;
    margin: 0;
}


/* Recipe search */

.recipe-search-container {
    margin-bottom: 1.5rem;
}

.recipe-search-box {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 2px solid var(--primary-200);
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(122, 156, 198, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding-right: 0.375rem;
}

.recipe-search-box::after {
    content: '';
    flex: 0 0 auto;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background: var(--secondary-500);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 1.1rem;
}

.recipe-search-box:focus-within {
    border-color: var(--secondary-400);
    box-shadow: 0 4px 12px rgba(224, 137, 79, 0.15);
    background: #ffffff;
}

.recipe-search-icon {
    position: absolute;
    left: 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
    color: var(--primary-400);
    pointer-events: none;
    z-index: 1;
    transition: color 0.3s ease;
}

.recipe-search-box:focus-within .recipe-search-icon {
    color: var(--primary-600);
}

.recipe-search-input {
    font-family: 'Nunito', sans-serif;
    flex: 1;
    padding: 1rem 1.5rem 1rem 3.5rem;
    border: none;
    border-radius: 1rem;
    font-size: 1rem;
    outline: none;
    background: transparent;
    color: var(--gray-700);
}

.recipe-search-input::placeholder {
    color: var(--gray-500);
}


/* Ingredients search */

.ingredients-search-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.ingredients-toggle-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
}

.ingredients-search-toggle-btn {
    width: 3.75rem;
    height: 3.75rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(122, 156, 198, 0.3);
    position: relative;
    z-index: 10;
    align-self: flex-end;
    margin-top: auto;
}

.ingredients-search-toggle-btn:hover {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    box-shadow: 0 6px 20px rgba(122, 156, 198, 0.4);
    transform: scale(1.05);
}

.ingredients-search-toggle-btn:active {
    transform: scale(0.95);
}

.ingredients-search-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: white;
}

.ingredients-search-container {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(247, 245, 251, 0.7) 100%);
    border-radius: 1.5rem;
    box-shadow: 0 4px 16px rgba(122, 156, 198, 0.1);
    border: 1px solid var(--primary-100);
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, padding 0.3s ease, margin-top 0.3s ease;
    opacity: 0;
    padding: 0 2rem;
    margin-top: 0;
}

.ingredients-search-container.expanded {
    max-height: 2000px;
    opacity: 1;
    padding: 2rem;
    margin-top: 0;
}

.ingredients-search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

.ingredients-search-box .search-icon-large {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: var(--gray-400);
    z-index: 1;
}

.ingredient-search-input {
    font-family: 'Nunito', sans-serif;
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.75rem;
    border: 2px solid var(--primary-200);
    border-radius: 0.75rem;
    font-size: 0.875rem;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(122, 156, 198, 0.08);
}

.ingredient-search-input:focus {
    border-color: var(--primary-500);
    box-shadow: 0 4px 12px rgba(122, 156, 198, 0.15);
    background: rgba(255, 255, 255, 1);
}


/* Sort filters */

.sort-filters-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.sort-filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 220px;
}

.sort-label {
    font-family: 'Nunito', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-700);
}

.sort-select {
    font-family: 'Nunito', sans-serif;
    padding: 1rem 1.25rem;
    border: 2px solid var(--primary-200);
    border-radius: 0.75rem;
    font-size: 1.0625rem;
    background: rgba(255, 255, 255, 0.9);
    color: var(--gray-700);
    cursor: pointer;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 12 12'%3E%3Cpath fill='%23374151' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.25rem center;
    padding-right: 3rem;
}

.sort-select:hover {
    border-color: var(--primary-300);
    background-color: rgba(255, 255, 255, 1);
}

.sort-select:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(122, 156, 198, 0.1);
    background-color: rgba(255, 255, 255, 1);
}


/* Ingredients search inline */

.ingredients-search-group {
    min-width: 220px;
}

.ingredients-search-box-inline {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon-inline {
    position: absolute;
    left: 1rem;
    width: 1.125rem;
    height: 1.125rem;
    color: var(--primary-400);
    z-index: 1;
    pointer-events: none;
}

.ingredient-search-input-inline {
    font-family: 'Nunito', sans-serif;
    width: 100%;
    padding: 1rem 1.25rem 1rem 3rem;
    border: 2px solid var(--primary-200);
    border-radius: 0.75rem;
    font-size: 1.0625rem;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.9);
    color: var(--gray-700);
    appearance: none;
}

.ingredient-search-input-inline:hover {
    border-color: var(--primary-300);
    background-color: rgba(255, 255, 255, 1);
}

.ingredient-search-input-inline:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(122, 156, 198, 0.1);
    background-color: rgba(255, 255, 255, 1);
}

.ingredient-search-input-inline::placeholder {
    color: var(--gray-500);
}

.ingredients-filter-inline {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--primary-100);
    max-height: 400px;
    overflow-y: auto;
}

.ingredients-filter-inline .ingredients-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 350px;
}


/* Ingredients toggle button */

.ingredients-toggle-btn {
    width: 100%;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    border: none;
    border-radius: 1.5rem;
    font-weight: 600;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(122, 156, 198, 0.25);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.ingredients-toggle-btn:hover {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    box-shadow: 0 6px 20px rgba(122, 156, 198, 0.35);
    transform: translateY(-2px);
}

.search-icon-toggle {
    width: 1.25rem;
    height: 1.25rem;
    stroke-width: 2.5;
}

.ingredients-container {
    margin-bottom: 2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ingredients-header-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid var(--primary-100);
    border-radius: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ingredients-header-toggle:hover {
    background: var(--primary-50);
    border-color: var(--primary-300);
}

.ingredients-header-toggle .filter-title {
    margin-bottom: 0;
    font-size: 1.125rem;
}

.toggle-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--primary-600);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ingredients-container.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.ingredients-content {
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 1;
}

.ingredients-container.collapsed .ingredients-content {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
}


/* Search and filter section */

.search-filter-section {
    margin-bottom: 3rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(247, 245, 251, 0.7) 100%);
    border-radius: 2rem;
    box-shadow: 0 8px 32px rgba(122, 156, 198, 0.1);
    border: 1px solid var(--primary-100);
}

.search-container {
    margin-bottom: 2rem;
}

.search-box-large {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-icon-large {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    color: var(--gray-400);
    z-index: 1;
}

.search-input-large {
    font-family: 'Nunito', sans-serif;
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.75rem;
    border: 2px solid var(--primary-200);
    border-radius: 0.75rem;
    font-size: 0.875rem;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 8px rgba(122, 156, 198, 0.08);
}

.search-input-large:focus {
    border-color: var(--primary-500);
    box-shadow: 0 4px 12px rgba(122, 156, 198, 0.15);
    background: rgba(255, 255, 255, 1);
}

.themes-filter {
    margin-bottom: 2rem;
}

.filter-title {
    font-family: 'Nunito', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-700);
    margin-bottom: 1.5rem;
    text-align: center;
}

.themes-list-center {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.theme-btn-center {
    font-family: 'Nunito', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-radius: 1.5rem;
    border: 2px solid var(--primary-200);
    background: rgba(255, 255, 255, 0.8);
    color: var(--gray-700);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    font-size: 1rem;
}

.theme-btn-center:hover {
    background: var(--primary-50);
    border-color: var(--primary-300);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(122, 156, 198, 0.15);
}

.theme-btn-center.active {
    background: linear-gradient(135deg, var(--primary-100), var(--secondary-100));
    color: var(--primary-700);
    border-color: var(--primary-400);
    box-shadow: 0 4px 16px rgba(122, 156, 198, 0.25);
    transform: translateY(-2px);
}

.theme-btn-center .theme-icon {
    font-size: 1.5rem;
}

.ingredients-filter {
    margin-top: 2rem;
}

.ingredients-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    max-height: 300px;
    overflow-y: auto;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 1.5rem;
}

.ingredient-checkbox-item {
    display: flex;
    align-items: center;
}

.ingredient-checkbox-label {
    font-family: 'Nunito', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid var(--primary-100);
    border-radius: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    color: var(--gray-700);
}

.ingredient-checkbox-label:hover {
    background: var(--primary-50);
    border-color: var(--primary-300);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(122, 156, 198, 0.15);
}

.ingredient-checkbox {
    display: none;
}

.checkbox-custom {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid var(--primary-300);
    border-radius: 0.5rem;
    background: white;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.ingredient-checkbox:checked+.checkbox-custom {
    background: linear-gradient(135deg, var(--primary-300), var(--primary-400));
    border-color: var(--primary-400);
}

.ingredient-checkbox:checked+.checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    font-size: 0.875rem;
}

.ingredient-checkbox:checked~.ingredient-name {
    color: var(--primary-600);
    font-weight: 500;
}

.ingredient-name {
    font-family: 'Nunito', sans-serif;
    user-select: none;
    transition: color 0.3s;
}


/* Recipes grid */

.recipes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}


/* Recipe card */

.recipe-card {
    background: transparent;
    border-radius: 1.25rem;
    border: none;
    overflow: visible;
    box-shadow: none;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.recipe-card:hover {
    box-shadow: none;
    transform: translateY(-4px);
    border-color: transparent;
}

.recipe-image-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 1.25rem;
}

.favorite-btn {
    width: 1.5rem;
    height: 1.5rem;
    background: transparent;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: none;
    padding: 0;
    margin-left: auto;
}

.favorite-btn:hover {
    background: transparent;
    transform: scale(1.15);
    box-shadow: none;
}

.favorite-btn.active {
    background: transparent;
}

.favorite-btn.active .favorite-icon {
    color: var(--secondary-500);
    fill: var(--secondary-500);
}

.favorite-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--secondary-500);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.favorite-btn:hover .favorite-icon {
    color: var(--secondary-600);
}

.favorite-btn.active .favorite-icon {
    color: var(--secondary-500);
    animation: heartBeat 0.3s ease;
}

@keyframes heartBeat {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

.recipe-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.recipe-card:hover .recipe-image {
    transform: scale(1.05);
}

.recipe-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-100), var(--primary-200));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
}

.recipe-badges {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    border-radius: 2rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border: 2px solid;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
}

.badge-difficulty-facile {
    background-color: #D1FAE5;
    color: #065F46;
    border-color: #A7F3D0;
}

.badge-difficulty-moyen {
    background-color: var(--yellow-100);
    color: var(--yellow-800);
    border-color: #FDE68A;
}

.badge-difficulty-difficile {
    background-color: var(--red-100);
    color: var(--red-800);
    border-color: #FECACA;
}

.badge-time {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--gray-600);
    border-color: var(--gray-300);
}

.recipe-content {
    padding: 0.875rem 0.25rem 0;
    background: transparent;
}

.recipe-name {
    font-family: 'Poppins', sans-serif;
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--primary-700);
    margin-bottom: 0.375rem;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.recipe-footer {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
}

.star-rating {
    display: none;
}

.star {
    width: 1rem;
    height: 1rem;
    color: var(--secondary-500);
}

.star.empty {
    color: var(--gray-300);
}

.rating-value {
    margin-left: 0.25rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.recipe-author {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--secondary-500);
}


/* Responsive */

@media (min-width: 640px) {
    .recipes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .content-wrapper {
        padding: 3rem 2.5rem;
    }

    .header-content {
        padding: 2.5rem 3rem 3rem;
    }

    .page-title {
        font-size: 1.875rem;
    }

    .page-subtitle {
        font-size: 1.125rem;
    }

    .search-filter-section {
        padding: 3rem;
    }

    .ingredients-checkboxes {
        max-height: 250px;
    }

    .header-content {
        padding: 1.5rem 2.5rem;
    }

    .header-title {
        font-size: 1.875rem;
    }

    .account-text {
        display: inline;
    }
}

@media (min-width: 1024px) {
    .main-content {
        margin-left: 0;
    }

    .recipes-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .content-wrapper {
        padding: 3rem 3rem;
    }

    .header-content {
        padding: 3rem 3.5rem 3.5rem;
    }

    .page-title {
        font-size: 1.875rem;
    }

    .search-filter-section {
        padding: 3.5rem;
        margin-bottom: 4rem;
    }

    .ingredients-checkboxes {
        max-height: 200px;
    }

    .page-title {
        font-size: 1.875rem;
    }

    .header-content {
        padding: 1.75rem 3rem;
    }

    .header-title {
        font-size: 2.25rem;
    }

    .header-tagline {
        font-size: 0.875rem;
    }

    .footer-content {
        padding: 0 3rem;
    }
}

@media (min-width: 1280px) {
    .recipes-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }

    .content-wrapper {
        padding: 4rem 4rem;
    }

    .header-content {
        padding: 3.5rem 4rem 4rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .search-filter-section {
        padding: 4rem;
    }

    .header-content {
        max-width: 1600px;
        padding: 2rem 4rem;
    }

    .footer-content {
        max-width: 1600px;
        padding: 0 4rem;
    }
}


/* Mobile header adjustments */

@media (max-width: 639px) {
    .header-content {
        padding: 1rem;
    }

    .header-top {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .header-left {
        width: 100%;
    }

    .header-nav {
        width: 100%;
        justify-content: space-between;
        gap: 0.25rem;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .nav-link {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
        white-space: nowrap;
    }

    .header-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .account-btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }

    .account-text {
        display: none;
    }

    .account-icon {
        width: 1.5rem;
        height: 1.5rem;
    }

    .header-top {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .header-center {
        order: -1;
        width: 100%;
        justify-content: center;
    }

    .header-subtitle {
        padding-top: 0.5rem;
        margin-top: 0.5rem;
    }

    .page-title {
        font-size: 1.5rem;
    }

    .page-subtitle {
        font-size: 0.875rem;
    }

    .back-to-home {
        font-size: 1.25rem;
    }

    .themes-list-center {
        gap: 0.75rem;
    }

    .theme-btn-center {
        padding: 0.75rem 1.25rem;
        font-size: 0.9375rem;
    }

    .theme-btn-center .theme-icon {
        font-size: 1.25rem;
    }
}


/* Scroll to top button */

.scroll-to-top-btn {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-600);
    border: 2px solid var(--primary-200);
    box-shadow: 0 4px 12px rgba(122, 156, 198, 0.2);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99;
    opacity: 0.7;
}

.scroll-to-top-btn.visible {
    display: flex;
}

.scroll-to-top-btn:hover {
    opacity: 1;
    background: var(--primary-50);
    border-color: var(--primary-400);
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(122, 156, 198, 0.3);
}

.scroll-to-top-btn svg {
    width: 1.5rem;
    height: 1.5rem;
}


/* Add Recipe Button */

.add-recipe-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    border: none;
    box-shadow: 0 8px 24px rgba(122, 156, 198, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}

.add-recipe-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(122, 156, 198, 0.5);
}

.add-recipe-btn svg {
    width: 2rem;
    height: 2rem;
}


/* Modal */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow-y: auto;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 2rem;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--primary-100);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem 1rem;
    border-bottom: 2px solid var(--primary-100);
}

.modal-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-700);
    margin: 0;
}

.modal-close {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: none;
    background: var(--primary-50);
    color: var(--primary-700);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-close:hover {
    background: var(--primary-100);
    transform: rotate(90deg);
}

.modal-close svg {
    width: 1.5rem;
    height: 1.5rem;
}


/* Form */

.add-recipe-form {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--primary-100);
    border-radius: 0.75rem;
    font-size: 1rem;
    color: var(--gray-700);
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(122, 156, 198, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.dietary-form-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.dietary-form-checkbox-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    border: 2px solid var(--primary-100);
    background: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.dietary-form-checkbox-item:has(input:checked) {
    background: linear-gradient(135deg, var(--secondary-400), var(--secondary-500));
    border-color: var(--secondary-500);
    color: #ffffff;
}

.dietary-form-checkbox-item input {
    accent-color: var(--secondary-500);
}


/* Image Upload */

.image-upload-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.image-input {
    display: none;
}

.image-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem;
    border: 2px dashed var(--primary-300);
    border-radius: 1rem;
    background: var(--primary-50);
    color: var(--primary-700);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.image-upload-label:hover {
    background: var(--primary-100);
    border-color: var(--primary-400);
}

.image-upload-label svg {
    width: 1.5rem;
    height: 1.5rem;
}

.image-preview {
    position: relative;
    width: 100%;
    max-width: 300px;
    border-radius: 1rem;
    overflow: hidden;
    border: 2px solid var(--primary-100);
}

.preview-image {
    width: 100%;
    height: auto;
    display: block;
}

.remove-image-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    color: var(--gray-700);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.remove-image-btn:hover {
    background: white;
    transform: scale(1.1);
}

.remove-image-btn svg {
    width: 1rem;
    height: 1rem;
}


/* Ingredients Form */

.ingredients-form-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.ingredient-form-item {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid var(--primary-100);
    border-radius: 0.75rem;
    padding: 1rem;
}

.ingredient-form-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.ingredient-quantity-input {
    min-width: 200px;
    padding: 0.625rem 0.75rem;
    border: 2px solid var(--primary-100);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
}

.ingredient-quantity-input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(122, 156, 198, 0.1);
}

.ingredient-name-input {
    flex: 1;
    padding: 0.625rem 0.75rem;
    border: 2px solid var(--primary-100);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
}

.quantity-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.quantity-select {
    padding: 0.625rem 0.5rem;
    border: 2px solid var(--primary-100);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: white;
    color: var(--gray-700);
    cursor: pointer;
    min-width: 100px;
    flex-shrink: 0;
}

.quantity-select:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(122, 156, 198, 0.1);
}

.unit-input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.ingredient-unit-select {
    padding: 0.625rem 0.75rem;
    border: 2px solid var(--primary-100);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    background: white;
    color: var(--gray-700);
    cursor: pointer;
}

.ingredient-unit-select:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(122, 156, 198, 0.1);
}

.ingredient-unit-custom {
    padding: 0.625rem 0.75rem;
    border: 2px solid var(--primary-100);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    background: white;
    color: var(--gray-700);
}

.ingredient-unit-custom:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(122, 156, 198, 0.1);
}

.add-ingredient-btn {
    width: 100%;
    padding: 0.875rem;
    border: 2px dashed var(--primary-300);
    border-radius: 0.75rem;
    background: var(--primary-50);
    color: var(--primary-700);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.add-ingredient-btn:hover {
    background: var(--primary-100);
    border-color: var(--primary-400);
}


/* Steps Form */

.steps-form-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.step-form-item {
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid var(--primary-100);
    border-radius: 0.75rem;
    padding: 1rem;
}

.step-form-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.75rem;
    align-items: start;
}

.step-number-form {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.step-text-input {
    padding: 0.625rem 0.75rem;
    border: 2px solid var(--primary-100);
    border-radius: 0.5rem;
    font-size: 0.9375rem;
    resize: vertical;
    min-height: 60px;
}

.add-step-btn {
    width: 100%;
    padding: 0.875rem;
    border: 2px dashed var(--primary-300);
    border-radius: 0.75rem;
    background: var(--primary-50);
    color: var(--primary-700);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.add-step-btn:hover {
    background: var(--primary-100);
    border-color: var(--primary-400);
}

.remove-btn {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: none;
    background: var(--red-100);
    color: var(--red-800);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.remove-btn:hover {
    background: var(--red-200);
    transform: scale(1.1);
}

.remove-btn svg {
    width: 1rem;
    height: 1rem;
}


/* Form Actions */

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--primary-100);
}

.btn-cancel,
.btn-submit {
    padding: 0.875rem 2rem;
    border-radius: 1rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.btn-cancel {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-cancel:hover {
    background: var(--gray-300);
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    box-shadow: 0 4px 12px rgba(122, 156, 198, 0.3);
}

.btn-submit:hover {
    box-shadow: 0 6px 20px rgba(122, 156, 198, 0.4);
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .add-recipe-btn {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 3.5rem;
        height: 3.5rem;
    }

    .add-recipe-btn svg {
        width: 1.75rem;
        height: 1.75rem;
    }

    .modal {
        padding: 1rem;
    }

    .modal-content {
        max-height: 95vh;
    }

    .modal-header {
        padding: 1.5rem 1.5rem 1rem;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .add-recipe-form {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .ingredient-form-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    .ingredient-name-input {
        width: 100%;
    }

    .ingredient-quantity-input {
        width: 100%;
        min-width: auto;
    }

    .step-form-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-cancel,
    .btn-submit {
        width: 100%;
    }
}


/* Account Page Styles */

.account-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.account-header {
    background: var(--primary-50);
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: none;
    border: none;
}

.account-header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.account-avatar-container {
    flex-shrink: 0;
}

.account-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-200);
    box-shadow: 0 4px 12px rgba(122, 156, 198, 0.2);
}

.account-info {
    flex: 1;
}

.account-username {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-700);
    margin-bottom: 0.75rem;
}

.edit-profile-btn {
    font-family: 'Nunito', sans-serif;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(122, 156, 198, 0.25);
}

.edit-profile-btn:hover {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    box-shadow: 0 6px 20px rgba(122, 156, 198, 0.35);
    transform: translateY(-2px);
}

.account-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--primary-100);
}

.account-tab {
    font-family: 'Nunito', sans-serif;
    padding: 1rem 2rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--gray-600);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    bottom: -2px;
}

.account-tab:hover {
    color: var(--primary-600);
    background: var(--primary-50);
}

.account-tab.active {
    color: var(--primary-700);
    border-bottom-color: var(--primary-600);
    background: transparent;
}

.account-tab-content {
    position: relative;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.account-recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.account-recipe-card,
.account-favorite-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(122, 156, 198, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--primary-100);
}

.account-recipe-card:hover,
.account-favorite-card:hover {
    box-shadow: 0 8px 24px rgba(122, 156, 198, 0.2);
    transform: translateY(-4px);
}

.account-recipe-card .recipe-content {
    padding: 1.25rem;
}

.account-recipe-card .recipe-name {
    font-family: 'Poppins', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-700);
    margin-bottom: 1rem;
}

.recipe-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.recipe-action-btn {
    font-family: 'Nunito', sans-serif;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
    min-width: 80px;
}

.view-btn {
    background: var(--primary-100);
    color: var(--primary-700);
}

.view-btn:hover {
    background: var(--primary-200);
}

.edit-btn {
    background: var(--primary-200);
    color: var(--primary-700);
}

.edit-btn:hover {
    background: var(--primary-300);
}

.delete-btn {
    background: #FEE2E2;
    color: #991B1B;
}

.delete-btn:hover {
    background: #FECACA;
}

.publish-btn {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
}

.publish-btn:hover {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    box-shadow: 0 4px 12px rgba(122, 156, 198, 0.3);
}

.remove-favorite-btn {
    background: #FEE2E2;
    color: #991B1B;
    width: 100%;
}

.remove-favorite-btn:hover {
    background: #FECACA;
}

.badge-status-published {
    background-color: #D1FAE5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.badge-status-pending {
    background-color: #FEF3C7;
    color: #92400E;
    border: 1px solid #FDE68A;
}


/* Edit Profile Modal */

.edit-profile-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.edit-profile-modal.active {
    display: flex;
}

.edit-profile-modal-content {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
}

.edit-profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-100);
}

.edit-profile-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-900);
}

.edit-profile-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--gray-600);
    transition: all 0.3s ease;
    border-radius: 0.5rem;
}

.edit-profile-close:hover {
    background: var(--primary-50);
    color: var(--primary-700);
}

.edit-profile-close svg {
    width: 1.5rem;
    height: 1.5rem;
}

.edit-profile-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.edit-profile-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.edit-profile-form label {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.9375rem;
}

.form-input,
.form-textarea {
    font-family: 'Nunito', sans-serif;
    padding: 0.75rem 1rem;
    border: 2px solid var(--primary-200);
    border-radius: 0.75rem;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.9);
}

.form-input:focus,
.form-textarea:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(122, 156, 198, 0.1);
    background: white;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.edit-profile-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.edit-profile-actions .btn-cancel,
.edit-profile-actions .btn-submit {
    flex: 1;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.edit-profile-actions .btn-cancel {
    background: var(--gray-200);
    color: var(--gray-700);
}

.edit-profile-actions .btn-cancel:hover {
    background: var(--gray-300);
}

.edit-profile-actions .btn-submit {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    box-shadow: 0 4px 12px rgba(122, 156, 198, 0.25);
}

.edit-profile-actions .btn-submit:hover {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    box-shadow: 0 6px 20px rgba(122, 156, 198, 0.35);
}


/* Responsive Account Page */

@media (max-width: 768px) {
    .account-header-content {
        flex-direction: column;
        text-align: center;
    }

    .account-tabs {
        flex-wrap: wrap;
    }

    .account-tab {
        flex: 1;
        min-width: 120px;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .account-recipes-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .recipe-actions {
        flex-direction: column;
    }

    .recipe-action-btn {
        width: 100%;
    }

    .edit-profile-modal-content {
        padding: 1.5rem;
        width: 95%;
    }

    .edit-profile-actions {
        flex-direction: column;
    }
}


/* Preferences Checkboxes */

.preferences-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--primary-50);
    border-radius: 0.75rem;
    border: 1px solid var(--primary-100);
}

.preference-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    font-family: 'Nunito', sans-serif;
    font-size: 0.9375rem;
    color: var(--gray-700);
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.preference-checkbox-label:hover {
    background: rgba(255, 255, 255, 0.7);
}

.preference-checkbox {
    display: none;
}

.preference-checkbox-label .checkbox-custom {
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid var(--primary-300);
    border-radius: 0.375rem;
    background: white;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.preference-checkbox:checked+.checkbox-custom {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    border-color: var(--primary-600);
}

.preference-checkbox:checked+.checkbox-custom::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.875rem;
    font-weight: bold;
}


/* Preferences Active Message */

.preferences-active-message {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    margin: 1.5rem auto;
    max-width: 1200px;
    background: linear-gradient(135deg, rgba(253, 242, 248, 0.95) 0%, rgba(252, 231, 243, 0.7) 100%);
    border: 2px solid var(--primary-200);
    border-radius: 1rem;
    box-shadow: 0 4px 12px rgba(122, 156, 198, 0.1);
    font-family: 'Nunito', sans-serif;
    font-size: 0.9375rem;
    color: var(--primary-800);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.preferences-active-message span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.preferences-link {
    color: var(--primary-600);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.7);
}

.preferences-link:hover {
    background: var(--primary-100);
    color: var(--primary-700);
    transform: translateY(-1px);
}


/* Empty message */

.empty-message {
    font-family: 'Nunito', sans-serif;
    font-size: 1.125rem;
    color: var(--gray-600);
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 1rem;
    border: 2px dashed var(--primary-200);
    margin: 2rem 0;
}


/* Favorite notification animations */

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}


/* Preferences Toggle - Simple Switch */
.preferences-toggle-container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: 1rem;
    width: 100%;
}

.preferences-toggle-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.preferences-label-text {
    font-family: 'Nunito', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
}

.preferences-toggle-input {
    display: none;
}

.preferences-toggle-switch {
    position: relative;
    width: 3rem;
    height: 1.5rem;
    background: var(--gray-300);
    border-radius: 1.5rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.preferences-toggle-switch::after {
    content: '';
    position: absolute;
    width: 1.25rem;
    height: 1.25rem;
    background: white;
    border-radius: 50%;
    top: 0.125rem;
    left: 0.125rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.preferences-toggle-input:checked+.preferences-toggle-switch {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
}

.preferences-toggle-input:checked+.preferences-toggle-switch::after {
    transform: translateX(1.5rem);
    box-shadow: 0 2px 6px rgba(122, 156, 198, 0.4);
}

.preferences-toggle-label:hover .preferences-toggle-switch {
    box-shadow: 0 0 0 4px rgba(122, 156, 198, 0.1);
}


/* Régime / allergies quick filters (homepage) */
.dietary-filters-group {
    flex: 1 1 100%;
}

.dietary-filters-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.375rem;
}

.dietary-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem;
    border-radius: 2rem;
    border: 1.5px solid var(--primary-200);
    background: rgba(255, 255, 255, 0.7);
    font-family: 'Nunito', sans-serif;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    user-select: none;
}

.dietary-filter-chip:hover {
    border-color: var(--primary-400);
    box-shadow: 0 2px 8px rgba(122, 156, 198, 0.15);
}

.dietary-filter-checkbox {
    display: none;
}

.dietary-filter-chip:has(.dietary-filter-checkbox:checked),
.dietary-filter-chip.active {
    background: linear-gradient(135deg, var(--secondary-400), var(--secondary-500));
    border-color: var(--secondary-500);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(224, 137, 79, 0.3);
}


/* Highlight quantity styling */
.ingredient-quantity-highlight {
    color: var(--primary-600);
    font-weight: 700;
}

/* Recipe warning icon for preferences mismatch */
.recipe-warning-icon {
    width: 1.125rem;
    height: 1.125rem;
    color: #dc2626;
    margin-left: 0.5rem;
    flex-shrink: 0;
    vertical-align: middle;
    display: inline-block;
    animation: warningPulse 2s ease-in-out infinite;
}

@keyframes warningPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* Admin panel */

.admin-panel {
    padding: 2.5rem;
    width: 100%;
}

.admin-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-700);
    margin-bottom: 1.5rem;
}

.admin-denied {
    color: var(--gray-600);
}

.admin-denied a {
    color: var(--primary-600);
}

.admin-section {
    margin-bottom: 2.5rem;
}

.admin-section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--primary-700);
    margin-bottom: 1rem;
}

.admin-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.admin-section-header .admin-section-title {
    margin-bottom: 0;
}

.admin-search-input {
    padding: 0.375rem 0.875rem;
    border: 1px solid var(--primary-200);
    border-radius: 999px;
    font-size: 0.8125rem;
    color: var(--gray-700);
    background: var(--primary-50);
    width: 160px;
    outline: none;
    transition: all 0.2s;
}

.admin-search-input:focus {
    width: 220px;
    border-color: var(--primary-400);
    background: #ffffff;
}

.admin-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-recipes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

@media (max-width: 900px) {
    .admin-recipes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.admin-recipe-card {
    background: var(--primary-50);
    border-radius: 1rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.admin-recipe-card-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: var(--primary-100);
}

.admin-recipe-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.admin-recipe-card-body {
    padding: 0.875rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.admin-recipe-card-body strong {
    color: var(--primary-900);
    font-size: 0.9375rem;
}

.admin-recipe-card-body .admin-btn {
    margin-top: 0.375rem;
}

.admin-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.875rem 1.25rem;
    background: var(--primary-50);
    border-radius: 1rem;
    flex-wrap: wrap;
}

.admin-row-main {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary-900);
    flex-wrap: wrap;
}

.admin-row-sub {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.admin-badge {
    display: inline-block;
    padding: 0.2rem 0.625rem;
    border-radius: 1rem;
    background: var(--secondary-100);
    color: var(--secondary-700);
    font-size: 0.75rem;
    font-weight: 700;
}

.admin-row-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--primary-300);
    background: #ffffff;
    color: var(--primary-700);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.admin-btn:hover {
    background: var(--primary-100);
}

.admin-btn-danger {
    border-color: #FECACA;
    color: var(--red-800);
}

.admin-btn-danger:hover {
    background: var(--red-100);
}

.admin-empty {
    color: var(--gray-600);
    font-style: italic;
}


/* Avatar edit */

.avatar-edit-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar-edit-preview {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-200);
    flex-shrink: 0;
}

.recipe-video-link{display:inline-block;margin-left:.6rem;padding:.2rem .7rem;border-radius:999px;background:rgba(255,255,255,.9);color:var(--primary-700,#9a3412);font-weight:600;font-size:.85em;text-decoration:none}
.recipe-video-link:hover{background:#fff}
