/* 主样式文件 */

/* 基本样式 */
body {
    font-family: "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    background-color: #f8f9fa;
    color: #333;
}

/* 搜索框样式 */
.search-box {
    background-color: #4CAF50;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.search-tags {
    margin-top: 15px;
}

.search-tag {
    display: inline-block;
    padding: 5px 10px;
    margin-right: 5px;
    margin-bottom: 5px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    color: #4CAF50;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-tag:hover {
    background-color: #fff;
    transform: translateY(-2px);
}

.search-tag-hot {
    background-color: rgba(255, 255, 255, 0.9);
    font-weight: bold;
}

/* 轮播图样式 */
.swiper {
    width: 100%;
    height: 400px;
    margin-bottom: 30px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.swiper-slide {
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.swiper-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.swiper-slide-content {
    position: relative;
    color: #fff;
    text-align: center;
    max-width: 80%;
    z-index: 1;
}

.swiper-slide-content h2 {
    font-size: 36px;
    margin-bottom: 15px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.swiper-slide-content p {
    font-size: 18px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* 食物分类样式 */
.food-category {
    background-color: #fff;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.food-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

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

.category-badge {
    display: inline-block;
    padding: 5px 10px;
    background-color: #f8f9fa;
    border-radius: 15px;
    color: #4CAF50;
    font-size: 14px;
    margin-top: 10px;
}

/* 返回顶部按钮 */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    z-index: 99;
    width: 40px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    background-color: #4CAF50;
    color: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

#back-to-top:hover {
    background-color: #3d8b40;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* 食物详情页样式 */
.food-detail-card {
    background-color: #fff;
    border-radius: 5px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.food-type-badge {
    display: inline-block;
    padding: 5px 10px;
    background-color: #4CAF50;
    border-radius: 15px;
    color: #fff;
    font-size: 14px;
    margin-top: 10px;
}

.nutrition-search-card, .nutrition-table-card {
    background-color: #fff;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.related-foods-card, .recent-views-card, .hot-foods-card, .share-card {
    background-color: #fff;
    border-radius: 5px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* 分页样式 */
.pagination .page-link {
    color: #4CAF50;
}

.pagination .page-item.active .page-link {
    background-color: #4CAF50;
    border-color: #4CAF50;
    color: #fff;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .swiper {
        height: 300px;
    }
    
    .swiper-slide-content h2 {
        font-size: 28px;
    }
    
    .swiper-slide-content p {
        font-size: 16px;
    }
}

@media (max-width: 576px) {
    .swiper {
        height: 250px;
    }
    
    .swiper-slide-content h2 {
        font-size: 24px;
    }
    
    .swiper-slide-content p {
        font-size: 14px;
    }
}