/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 350px; /* Increased height to accommodate the wave and content */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    color: white;
    z-index: 2;
    padding-bottom: 80px; /* Add padding to push content up from the wave */
}

.hero-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-section p {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.9;
    position: relative; /* Ensure subtitle is positioned relative to its normal flow */
    z-index: 3; /* Give the subtitle a higher z-index than the wave */
}

.hero-wave {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 150px; /* Increased wave height to cover the bottom of the section */
    z-index: 1; /* Ensure the wave is behind the content */
}

.hero-wave svg {
    width: 100%;
    height: 100%;
}

/* New: Hero Buttons */
.hero-button {
    margin-top: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.8rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.hero-button.btn-primary {
    background: linear-gradient(135deg, #2ecc71, #27ae60); /* Green for "Add New Recipe" */
    color: white;
}
.hero-button.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
}

.hero-button.btn-secondary {
    background: linear-gradient(135deg, #e67e22, #d35400); /* Orange for "View All Recipes" */
    color: white;
}
.hero-button.btn-secondary:hover {
    transform: translateY(-3px);
    background: linear-gradient(135deg, #d35400, #c0392b);
}


/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.content-wrapper {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
    padding: 3rem;
}

/* Form Section */
.form-section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #ecf0f1;
}

.section-header i {
    font-size: 1.5rem;
    color: #e74c3c;
}

.section-header h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #2c3e50;
}

.recipe-form {
    display: grid;
    gap: 1.5rem;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #34495e;
}

.input-group label i {
    color: #3498db;
    width: 16px;
}

.input-group input,
.input-group textarea {
    padding: 1rem;
    border: 2px solid #ecf0f1;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    resize: vertical;
}

.input-group input:focus,
.input-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Buttons */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.btn-primary,
.btn-secondary {
    padding: 1rem 2rem;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    text-decoration: none; /* Ensure links look like buttons */
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
}

/* Divider */
.divider {
    display: flex;
    align-items: center;
    margin: 3rem 0;
    gap: 1rem;
}

.divider-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, #bdc3c7, transparent);
}

.divider-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #7f8c8d;
    padding: 0 1rem;
}

/* Recipe List */
.recipes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.recipes-header h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.8rem;
    color: #2c3e50;
}

.recipes-count {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.recipe-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #ecf0f1;
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.recipe-header {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.recipe-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.1);
    transform: rotate(45deg);
}

.recipe-header h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    position: relative;
}

.recipe-body {
    padding: 1.5rem;
}

.recipe-section {
    margin-bottom: 1.5rem;
}

.recipe-section:last-child {
    margin-bottom: 0;
}

.recipe-section h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.8rem;
}

.recipe-section h4 i {
    color: #e74c3c;
}

.recipe-section p {
    color: #7f8c8d;
    line-height: 1.6;
}

.recipe-actions {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #ecf0f1;
}

.edit-button,
.delete-button {
    flex: 1;
    padding: 0.8rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.edit-button {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
}

.edit-button:hover {
    background: linear-gradient(135deg, #e67e22, #d35400);
}

.delete-button {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.delete-button:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
}

/* Loading and empty states */
.loading {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
    font-size: 1.1rem;
}

.loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #3498db;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #bdc3c7;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer i {
    color: #e74c3c;
}

/* Animations */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .container {
        padding: 1rem;
    }
    
    .content-wrapper {
        padding: 2rem 1.5rem;
    }
    
    .recipes-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .recipes-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .hero-content {
        padding-bottom: 60px; /* Adjust padding for smaller screens */
    }

    .hero-button {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }
}