body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-image: url('uploaded:image_589b46.png-b730a119-e4ed-4c7a-bdac-7f328d4a74aa');
    background-repeat: repeat;
    background-position: top left;
    background-size: 400px auto;
    background-attachment: fixed;
    background-color: transparent;
}
.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}
.animate-scale-in {
    animation: scaleIn 0.3s ease-out forwards;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes scaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
.animate-slide-in-right {
    animation: slideInRight 0.5s ease-out forwards;
}
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

body.no-animations * {
    transition: none !important;
    animation: none !important;
}


body.dark-mode {
    background-color: #1a202c;
    color: #e2e8f0;
}
body.dark-mode #category-nav {
    background-color: rgba(45, 55, 72, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
body.dark-mode #category-buttons-container button {
    background-color: #4a5568;
    color: #cbd5e0;
}
body.dark-mode #category-buttons-container button.bg-blue-600 {
    background-color: #2563eb;
    color: #ffffff;
}
body.dark-mode #products-section-title {
    color: #e2e8f0;
}
body.dark-mode .product-card-container {
    background-color: #2d3748;
}
body.dark-mode .product-card-container h3 {
    color: #e2e8f0;
}
body.dark-mode #product-modal .bg-white,
body.dark-mode #wishlist-modal .bg-white,
body.dark-mode #recipe-modal .bg-white {
    background-color: rgba(45, 55, 72, 0.9);
}
body.dark-mode #product-modal h2,
body.dark-mode #product-modal p.text-gray-700,
body.dark-mode #wishlist-modal h2,
body.dark-mode #wishlist-modal h4,
body.dark-mode #wishlist-modal p.text-gray-600,
body.dark-mode #recipe-modal h2,
body.dark-mode #recipe-modal p {
    color: #e2e8f0;
}
body.dark-mode #product-modal p.text-blue-600 {
    color: #93c5fd;
}
body.dark-mode #close-modal-btn,
body.dark-mode #close-wishlist-modal-btn,
body.dark-mode #close-recipe-modal-btn {
    color: #cbd5e0;
}
body.dark-mode #theme-toggle {
    background-color: rgba(45, 55, 72, 0.7);
    color: #e2e8f0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
body.dark-mode #view-wishlist-btn {
    background-color: rgba(45, 55, 72, 0.7);
    color: #e2e8f0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
body.dark-mode .add-to-wishlist-btn {
    background-color: #a0aec0;
    color: #1a202c;
}
body.dark-mode .add-to-wishlist-btn.bg-pink-500 {
    background-color: #d53f8c;
}
body.dark-mode .remove-from-wishlist-btn {
    background-color: #e53e3e;
}
body.dark-mode .wishlist-item-card {
    background-color: #4a5568;
}
body.dark-mode #wishlist-count-badge {
    background-color: #ef4444;
    color: #ffffff;
}
body.dark-mode #generate-recipe-btn {
    background-color: #047857;
    color: #e2e8f0;
}
body.dark-mode #generate-wishlist-recipe-btn {
    background-color: #047857;
    color: #e2e8f0;
}
body.dark-mode #clear-wishlist-btn {
    background-color: #b91c1c;
    color: #e2e8f0;
}

body.dark-mode #clear-mobile-search-btn,
body.dark-mode #clear-desktop-search-btn {
    color: #e2e8f0;
}
body.dark-mode #clear-mobile-search-btn:hover,
body.dark-mode #clear-desktop-search-btn:hover {
    color: #cbd5e0;
}

body.dark-mode #mobile-search-input,
body.dark-mode #desktop-search-input {
    color: #a0aec0;
    background-color: transparent;
}


#category-nav {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#category-buttons-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}
#category-buttons-container.is-expanded {
    max-height: 500px;
}
#category-toggle-btn.rotated svg {
    transform: rotate(180deg);
}

@media (min-width: 768px) {
    #category-buttons-container {
        max-height: none !important;
        overflow: visible !important;
        display: flex !important;
    }
}

@keyframes buttonClickScale {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes iconRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.button-active-animation {
    animation: buttonClickScale 0.2s ease-out;
}

.icon-active-rotation {
    animation: iconRotate 0.4s ease-out;
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    50% { transform: translateX(8px); }
    75% { transform: translateX(-8px); }
    100% { transform: translateX(0); }
}

.shake-animation {
    animation: shake 0.3s ease-in-out;
}

#wishlist-count-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ef4444;
    color: white;
    border-radius: 9999px;
    padding: 2px 7px;
    font-size: 0.75rem;
    font-weight: bold;
    line-height: 1;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transform-origin: center;
    transition: transform 0.2s ease-out;
}
#view-wishlist-btn:hover #wishlist-count-badge {
    transform: scale(1);
}

#view-wishlist-btn {
    position: fixed;
    bottom: 1rem;
    right: 90px;
    z-index: 50;
    background-color: rgba(59, 130, 246, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

#theme-toggle {
    background-color: rgba(59, 130, 246, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.remove-from-wishlist-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}


@keyframes fadeOutShrink {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.5); }
}
.wishlist-item-removing {
    animation: fadeOutShrink 0.3s ease-out forwards;
}

.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#custom-context-menu {
    visibility: hidden; 
    position: fixed;
    min-width: 180px;
    background-color: rgba(255, 255, 255, 0.5); 
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 0.5rem;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.15); 
    z-index: 100;
    opacity: 0; 
    transform: scale(0.95); 
    transition: opacity 0.2s ease-out, transform 0.2s ease-out, visibility 0s linear 0.2s; 
    pointer-events: none;
}
body.dark-mode #custom-context-menu {
    background-color: rgba(45, 55, 72, 0.5); 
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2), 0 4px 12px rgba(0, 0, 0, 0.15); 
}
#custom-context-menu.show {
    visibility: visible; 
    opacity: 1; 
    transform: scale(1); 
    transition: opacity 0.2s ease-out, transform 0.2s ease-out; 
    pointer-events: auto;
}
#custom-context-menu button {
    white-space: nowrap;
    color: #374151;
    cursor: pointer;
}
body.dark-mode #custom-context-menu button {
    color: #e2e8f0;
}
#custom-context-menu button:hover {
    background-color: #bfdbfe;
}
body.dark-mode #custom-context-menu button:hover {
    background-color: #4a5568;
}

#mobile-search-input,
#desktop-search-input {
    background-color: #e5e7eb;
    color: #000000;
    user-select: none;
}

body.dark-mode #mobile-search-input,
body.dark-mode #desktop-search-input {
    background-color: #4a5568;
    color: #e2e8f0;
}

#mobile-search-input::placeholder,
#desktop-search-input::placeholder {
    color: #1a202c;
}

body.dark-mode #mobile-search-input::placeholder,
body.dark-mode #desktop-search-input::placeholder {
    color: #a0aec0;
}

#generate-recipe-btn {
    background-color: #22c55e;
}
#generate-wishlist-recipe-btn {
    background-color: #22c55e;
}
#clear-wishlist-btn {
    background-color: #ef4444;
}

footer {
    background-color: rgba(31, 41, 55, 0.85);
}
body.black-and-white-mode {
    filter: grayscale(100%);
    -webkit-filter: grayscale(100%);
}

#products-section-title {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.product-card-container h3 {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

img {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none;
}

.product-card-container .absolute.top-2.right-2 {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}


#product-modal,
#wishlist-modal,
#recipe-modal {
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

#product-modal > div,
#wishlist-modal > div,
#recipe-modal > div {
    background-color: rgba(255, 255, 255, 1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    position: relative;
    max-width: 32rem;
    width: 100%;
    transform: scale(1);
    animation: scaleIn 0.3s ease-out forwards;
}

#wishlist-modal > div,
#recipe-modal > div {
    max-width: 42rem;
}


body.dark-mode #product-modal > div,
body.dark-mode #wishlist-modal > div,
body.dark-mode #recipe-modal > div {
    background-color: rgba(45, 55, 72, 0.95);
}

#notification-message {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: #333;
    font-weight: 600;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    overflow: hidden;
}

body.dark-mode #notification-message {
    background-color: rgba(45, 55, 72, 0.7);
    color: #e2e8f0;
}

#notification-message.show {
    opacity: 1;
    visibility: visible;
}

#notification-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background-color: #2563eb;
    width: 100%;
    animation: none;
}

@keyframes progressBarFill {
    from { width: 100%; }
    to { width: 0%; }
}

.recipe-footer {
    margin-top: 1.5rem; 
    padding-top: 1rem; 
    border-top: 1px solid #e5e7eb; 
    text-align: center; 
    font-size: 0.875rem; 
    color: #6b7280; 
}
body.dark-mode .recipe-footer {
    border-top-color: #4a5568; 
    color: #9ca3af; 
}
