/* ============================================
   粥谱大全工具 - 专用样式
   ============================================ */

/* 搜索功能区域 */
.search-section {
    margin-bottom: 20px;
}

.search-box {
    display: flex;
    gap: 0;
    margin-bottom: 10px;
}

.search-input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #4a90e2;
}

.search-btn {
    padding: 12px 24px;
    background-color: #4a90e2;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.search-btn:hover {
    background-color: #357abd;
}

.search-btn i {
    font-size: 16px;
}

/* 搜索标签 */
.search-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.tag {
    padding: 6px 12px;
    background-color: #f0f7ff;
    color: #4a90e2;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.tag:hover {
    background-color: #4a90e2;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.3);
}

/* 分类导航 */
.category-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.category-btn {
    padding: 8px 15px;
    background-color: #f5f5f5;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    color: #333;
}

.category-btn:hover,
.category-btn.active {
    background-color: #4a90e2;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(74, 144, 226, 0.3);
}

/* 粥谱卡片容器 */
.recipes-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* 粥谱卡片 */
.recipe-card {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    background: white;
}

.recipe-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.recipe-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #f9f9f9;
    border-bottom: 1px solid #eee;
}

.recipe-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

/* 分类徽章 */
.category-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: white;
    font-weight: 500;
}

.breakfast {
    background-color: #3498db;
}

.health {
    background-color: #2ecc71;
}

.weight-loss {
    background-color: #9b59b6;
}

.beauty {
    background-color: #e74c3c;
}

.seasonal {
    background-color: #f39c12;
}

/* 粥谱内容 */
.recipe-content {
    padding: 15px;
}

.ingredients,
.method,
.nutrition {
    margin-bottom: 15px;
}

.ingredients h4,
.method h4,
.nutrition h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #555;
    font-weight: 600;
}

.ingredients ul {
    margin: 0;
    padding-left: 20px;
}

.ingredients li {
    margin-bottom: 5px;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.method ol {
    margin: 0;
    padding-left: 20px;
}

.method li {
    margin-bottom: 5px;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.nutrition p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* 喝粥好处展示区域 */
.benefits-section {
    margin-bottom: 30px;
}

.section-title {
    margin-bottom: 15px;
    font-size: 20px;
    color: #333;
    border-left: 4px solid #4a90e2;
    padding-left: 10px;
    font-weight: 600;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.benefit-card {
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #eee;
    text-align: center;
    transition: all 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.benefit-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.benefit-card h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

.benefit-card p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* 注意事项区域 */
.notice-section {
    padding: 15px 20px;
    background-color: #fff3f3;
    border-radius: 8px;
    border-left: 4px solid #ff4d4f;
    margin-bottom: 30px;
}

.notice-section .section-title {
    border-left: none;
    padding-left: 0;
    color: #ff4d4f;
    margin-bottom: 12px;
}

.notice-content ul {
    margin: 0;
    padding-left: 20px;
}

.notice-content li {
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* ============================================
   响应式设计
   ============================================ */

/* 平板设备 */
@media (max-width: 1024px) {
    .recipes-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }

    .benefits-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

/* 手机设备 */
@media (max-width: 768px) {
    .search-input {
        font-size: 14px;
        padding: 10px 12px;
    }

    .search-btn {
        padding: 10px 16px;
        font-size: 14px;
    }

    .category-nav {
        gap: 8px;
    }

    .category-btn {
        font-size: 13px;
        padding: 6px 12px;
    }

    .recipes-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .recipe-header h3 {
        font-size: 16px;
    }

    .recipe-content {
        padding: 12px;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .section-title {
        font-size: 18px;
    }
}

/* 超小屏幕 */
@media (max-width: 480px) {
    .search-box {
        flex-direction: column;
    }

    .search-input {
        border-radius: 4px;
        border: 1px solid #ddd;
    }

    .search-btn {
        border-radius: 4px;
        margin-top: 8px;
    }

    .search-tags {
        gap: 8px;
    }

    .tag {
        font-size: 13px;
        padding: 5px 10px;
    }

    .category-nav {
        gap: 6px;
    }

    .category-btn {
        font-size: 12px;
        padding: 5px 10px;
    }

    .notice-section {
        padding: 12px 15px;
    }
}
