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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background:  #fff;
    color: #333;
}
a, a:link, a:visited, a:hover, a:active {
    color: inherit;
    text-decoration: none;
}
header {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    background: linear-gradient(135deg, #05754e 0%, lightgreen 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links li {
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #05754e;
}

.nav-links .dropdown {
    position: relative;
    display: none;
}
.havesub {
    position: relative;
}
.havesub:hover .dropdown {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    z-index: 999;
}
.dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    border-radius: 3px;
    transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.hero {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 3rem 2rem;
    text-align: center;
    color: white;
    background: lightgreen;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.search-box {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.search-box input {
    flex: 1;
    padding: 1rem 2rem;
    border: none;
    font-size: 1rem;
    outline: none;
}

.search-box button {
    padding: 1rem 2rem;
    background: green;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.3s;
}

.search-box button:hover {
    transform: scale(1.05);
}

.categories {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.category-card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
}

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

.category-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.category-name {
    font-weight: 600;
    color: #333;
}

.recipes-section {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #333;
    text-align: center;
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.recipe-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    cursor: pointer;
}

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

.recipe-image {
    width: 100%;
    aspect-ratio: 410 / 308;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
}

.recipe-content {
    padding: 1.5rem;
}

.recipe-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
}

.recipe-meta {
    display: flex;
    gap: 1rem;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.recipe-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.recipe-description {
    color: #666;
    line-height: 1.6;
    font-size: 0.95rem;
}

footer {
    background: rgba(255, 255, 255, 0.98);
    margin-top: 3rem;
    padding: 2rem;
    text-align: center;
    color: #666;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 170px;
        right: -100%;
        width: 70%;
        max-width: 300px;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 999;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.1rem;
        padding: 0.5rem 0;
        border-bottom: 1px solid #eee;
    }

    .nav-links .dropdown {
        position: relative;
        display: block;
    }
    .havesub:hover .dropdown {
        position: static;
        box-shadow: none;
        border-radius: 0;
    }
    .categories {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    }
}


.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.pagination-btn {
    min-width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e9ecef;
    background: white;
    color: #495057;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    padding: 5px;
}

.pagination-btn:hover:not(.active):not(:disabled) {
    background: #f8f9fa;
    border-color: #05754e;
    color: #05754e;
    transform: translateY(-2px);
}

.pagination-btn.active {
    background: #05754e;
    color: white;
    border-color: lightgreen;
    cursor: default;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-dots {
    min-width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-weight: bold;
    padding: 0 5px;
    font-size: 30px;
}

@media (max-width: 768px) {
    .pagination-btn {
        min-width: 40px;
        height: 40px;
        font-size: 14px;
    }
}

#spiral {
    height: 60px;
    background: url(/image/bg/spiral.png) repeat-x bottom;
}