* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
}

/* Header with Logo */
header {
    background-color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.logo-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    height: 60px;
    width: auto;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0), rgba(0,0,0,0.0));
    background-size: cover;
    background-position: center;
    padding: 120px 20px 80px;
    text-align: center;
    color: white;
    position: relative;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 10px;
    line-height: 1.2;
}

.hero p {
    font-size: 16px;
    opacity: 0.9;
}

/* Search Section */
.search-section {
    max-width: 800px;
    margin: 20px auto 60px;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.search-box {
    display: flex;
    background: white;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.search-box input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    font-size: 16px;
    outline: none;
}

.search-box button {
    background: #ffc107;
    border: none;
    padding: 15px 30px;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.3s;
}

.search-box button:hover {
    background: #ffb300;
}

/* Main Content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 40px;
    color: #333;
}

.api-info {
    display: none;
}

/* Recipe Grid */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.recipe-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.recipe-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.recipe-content {
    padding: 20px;
}

.recipe-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.recipe-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.view-details-btn {
    background: #ffc107;
    color: #333;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    width: auto;          /* 👈 choto হবে */
    float: right;         /* 👈 right side যাবে */
    font-size: 14px;
}
.recipe-content::after {
    content: "";
    display: block;
    clear: both;
}

.view-details-btn {
    margin-top: 10px;
}


.view-details-btn:hover {
    background: #ffb300;
}

/* Loading Spinner */
.loading {
    text-align: center;
    padding: 40px;
    font-size: 18px;
    color: #666;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ffc107;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

#scrollTopBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 2000;

    width: 48px;
    height: 48px;

    background: linear-gradient(135deg, #ffc107, #ffb300);
    color: #333;
    border: none;
    outline: none;

    border-radius: 10px;      /* ✅ square (soft) */
    font-size: 18px;
    cursor: pointer;

    display: none;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);

    transition: transform 0.3s ease,
                box-shadow 0.3s ease,
                background 0.3s ease;
}


#scrollTopBtn:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.35);
    background: linear-gradient(135deg, #ffb300, #ffa000);
}

#scrollTopBtn i {
    font-size: 22px;        /* 🔥 বড় */
    font-weight: bold;
    transition: transform 0.3s ease;
}

#scrollTopBtn:hover i {
    transform: translateY(-3px);   /* 🔥 lift effect */
}


@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    margin: 50px auto;
    padding: 0;
    max-width: 900px;
    border-radius: 10px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.3);
    animation: slideDown 0.3s ease;
}
.modal-close-btn {
    margin-top: 30px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: bold;
    background: #ffc107;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
    float: right;        
    width: auto;          
}

.modal-close-btn:hover {
    background: #ffb300;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    position: relative;
    padding: 0;
}

.modal-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
}

.close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(0,0,0,0.5);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.close:hover {
    background: rgba(0,0,0,0.8);
}

.modal-body {
    padding: 30px;
}

.modal-title {
    font-size: 32px;
    margin-bottom: 15px;
    color: #333;
}

.recipe-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.meta-item {
    background: #f5f5f5;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
}

.section-heading {
    font-size: 24px;
    margin: 25px 0 15px;
    color: #333;
    border-bottom: 2px solid #ffc107;
    padding-bottom: 10px;
}

.ingredients-list {
    list-style: none;
    padding: 0;
}

.ingredients-list li {
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    color: #555;
}

.ingredients-list li:before {
    content: "✓ ";
    color: #7cb342;
    font-weight: bold;
    margin-right: 10px;
}

.instructions {
    line-height: 1.8;
    color: #555;
    white-space: pre-line;
}

.video-link {
    display: inline-block;
    background: #ff0000;
    color: white;
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none;
    margin-top: 15px;
    font-weight: bold;
}

.video-link:hover {
    background: #cc0000;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 20px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.copyright {
    font-size: 14px;
    color: #ddd;
}

/* Social Icons */
.social-icons {
    display: flex;
    gap: 18px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Brand hover colors */
.social-icons a:hover {
    transform: translateY(-3px);
}

.social-icons a:hover .fa-youtube {
    color: #ff0000;
}

.social-icons a:hover .fa-x-twitter {
    color: #1da1f2;
}

.social-icons a:hover .fa-facebook-f {
    color: #1877f2;
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .footer-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 { font-size: 32px; }
    .section-title { font-size: 28px; }
    .modal-image { height: 250px; }
}

@media (max-width: 480px) {
    .hero { padding: 60px 20px; }
    .hero h1 { font-size: 28px; }
}

.error-message {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 18px;
}

