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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

/* Navigation Bar */
.navbar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
}

.navbar-brand i {
    color: #ffc107;
}


.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 80px 0;
    margin-bottom: -50px;
}

.hero-section h1 {
    animation: fadeInUp 1s ease-in-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-section {
    position: relative;
    z-index: 10;
}

.search-section .card {
    border: none;
    border-radius: 15px;
}

.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.recipe-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 30px;
    height: 100%;
}

.recipe-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

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

.recipe-card .card-body {
    padding: 20px;
}

.recipe-card .card-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recipe-card .card-text {
    color: #666;
    font-size: 0.9rem;
}

.badge-custom {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    margin: 2px;
}

.favorite-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.favorite-btn:hover {
    transform: scale(1.1);
}

.favorite-btn i {
    font-size: 1.2rem;
    color: #dc3545;
}

.favorite-btn.active i {
    animation: heartBeat 0.5s ease;
}

@keyframes heartBeat {
    0%, 100% {
        transform: scale(1);
    }
    25% {
        transform: scale(1.3);
    }
    50% {
        transform: scale(0.9);
    }
}

.recipe-detail-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
}

.ingredient-list {
    list-style: none;
    padding: 0;
}

.ingredient-list li {
    padding: 8px;
    border-bottom: 1px solid #eee;
}

.ingredient-list li:before {
    content: "✓ ";
    color: #28a745;
    font-weight: bold;
    margin-right: 10px;
}

.nutrition-info {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
}

.nutrition-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #dee2e6;
}

.nutrition-item:last-child {
    border-bottom: none;
}


#loadingSpinner {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 20px;
}

.empty-state h4 {
    color: #666;
    margin-bottom: 10px;
}

.empty-state p {
    color: #999;
}

.alert {
    border-radius: 10px;
    border: none;
}
footer {
    margin-top: auto;
}


@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .recipe-card img {
        height: 200px;
    }

    .search-section .card-body {
        padding: 20px;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 1.5rem;
    }

    .hero-section p {
        font-size: 0.9rem;
    }

    .recipe-card img {
        height: 180px;
    }

    .favorite-btn {
        width: 40px;
        height: 40px;
    }

    .favorite-btn i {
        font-size: 1rem;
    }
}

.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #667eea;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.scroll-top:hover {
    background: #764ba2;
    transform: translateY(-5px);
}

.scroll-top.show {
    display: flex;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}