/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #ff6b35;
    --secondary-color: #f7931e;
    --accent-color: #ffcc00;
    --dark-color: #2d3436;
    --light-color: #ffffff;
    --gray-color: #636e72;
    --light-gray: #f8f9fa;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

[data-theme="dark"] {
    --primary-color: #ff8c42;
    --secondary-color: #ffb347;
    --accent-color: #ffd700;
    --dark-color: #1a1a1a;
    --light-color: #2d3436;
    --gray-color: #b2bec3;
    --light-gray: #34495e;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--light-color);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
}

[data-theme="dark"] .navbar {
    background: rgba(45, 52, 54, 0.95);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-logo i {
    margin-right: 10px;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-link {
    margin: 0 20px;
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

[data-theme="dark"] .nav-link {
    color: var(--light-color);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.admin-link {
    background: var(--primary-color);
    color: var(--light-color) !important;
    padding: 8px 16px;
    border-radius: 20px;
    margin-left: 10px;
}

.admin-link:hover {
    background: var(--secondary-color);
    color: var(--light-color) !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--dark-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--light-color);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1.5" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.5;
}

.hero-content {
    z-index: 1;
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.search-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto 2rem;
}

#search-input {
    width: 100%;
    padding: 15px 50px 15px 20px;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    box-shadow: var(--shadow);
    outline: none;
    transition: var(--transition);
}

#search-input:focus {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

#search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: var(--light-color);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    transition: var(--transition);
}

#search-btn:hover {
    background: var(--secondary-color);
}

.filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.2);
    color: var(--light-color);
    border: 2px solid transparent;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--light-color);
    color: var(--primary-color);
    border-color: var(--light-color);
}

/* Recipes Section */
.recipes-section {
    padding: 80px 0;
    background: var(--light-gray);
}

[data-theme="dark"] .recipes-section {
    background: var(--dark-color);
}

.recipes-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark-color);
}

[data-theme="dark"] .recipes-section h2 {
    color: var(--light-color);
}

.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.recipe-card {
    background: var(--light-color);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

[data-theme="dark"] .recipe-card {
    background: var(--light-gray);
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.recipe-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.recipe-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.recipe-card:hover .recipe-image img {
    transform: scale(1.1);
}

.recipe-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-color);
    color: var(--light-color);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.recipe-content {
    padding: 20px;
}

.recipe-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--dark-color);
}

[data-theme="dark"] .recipe-title {
    color: var(--light-color);
}

.recipe-description {
    color: var(--gray-color);
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.recipe-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recipe-time,
.recipe-difficulty {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    color: var(--gray-color);
}

.recipe-time i,
.recipe-difficulty i {
    margin-right: 5px;
    color: var(--primary-color);
}

.load-more {
    text-align: center;
}

#load-more-btn {
    background: var(--primary-color);
    color: var(--light-color);
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

#load-more-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Categories Section */
.categories-section {
    padding: 80px 0;
    background: var(--light-color);
}

[data-theme="dark"] .categories-section {
    background: var(--dark-color);
}

.categories-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark-color);
}

[data-theme="dark"] .categories-section h2 {
    color: var(--light-color);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.category-card {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

[data-theme="dark"] .category-card {
    background: var(--light-gray);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.category-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

[data-theme="dark"] .category-card h3 {
    color: var(--light-color);
}

.category-card p {
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* About Section */
.about-section {
    padding: 80px 0;
    background: var(--light-gray);
}

[data-theme="dark"] .about-section {
    background: var(--dark-color);
}

.about-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark-color);
}

[data-theme="dark"] .about-section h2 {
    color: var(--light-color);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--gray-color);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.stat {
    text-align: center;
}

.stat h3 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat p {
    color: var(--gray-color);
    font-weight: 500;
}

/* Footer */
footer {
    background: var(--dark-color);
    color: var(--light-color);
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-section p {
    color: var(--gray-color);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--gray-color);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: var(--gray-color);
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid var(--gray-color);
    padding-top: 20px;
    text-align: center;
    color: var(--gray-color);
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: var(--light-color);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
    z-index: 1000;
}

.theme-toggle:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--light-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: var(--transition);
    }

    [data-theme="dark"] .nav-menu {
        background: var(--dark-color);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .recipes-grid {
        grid-template-columns: 1fr;
    }

    .categories-grid {
        grid-template-columns: 1fr;
    }

    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .filters {
        flex-direction: column;
        align-items: center;
    }

    .filter-btn {
        width: 100%;
        max-width: 200px;
    }
}
