<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>智能推荐 - 个性化饮食推荐助手</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/recommendation.css') }}">
</head>
<body>
    <div class="container">
        <header class="header">
            <h1>🤖 智能推荐</h1>
            <p class="subtitle">基于AI的个性化餐食推荐</p>
        </header>

        <nav class="nav">
            <a href="/" class="nav-item">首页</a>
            <a href="/data-collection" class="nav-item">数据采集</a>
            <a href="/recommendation" class="nav-item active">智能推荐</a>
            <a href="/analysis" class="nav-item">营养分析</a>
            <a href="/recitation" class="nav-item">背诵排序</a>
        </nav>

        <main class="main">
            <div class="recommendation-container">
                <div id="loginSection" class="section">
                    <h2>用户登录</h2>
                    <div class="form-group">
                        <label for="userId">用户ID：</label>
                        <input type="text" id="userId" class="form-input" placeholder="请输入用户ID">
                    </div>
                    <button id="loginBtn" class="btn btn-primary">登录</button>
                </div>

                <div id="requestSection" class="section" style="display: none;">
                    <h2>获取推荐</h2>
                    <div class="form-group">
                        <label>餐次：</label>
                        <select id="mealType" class="form-input">
                            <option value="breakfast">早餐</option>
                            <option value="lunch">午餐</option>
                            <option value="dinner">晚餐</option>
                        </select>
                    </div>
                    <button id="getRecommendationBtn" class="btn btn-primary">获取推荐</button>
                </div>

                <div id="recommendationsSection" class="section" style="display: none;">
                    <h2>推荐结果</h2>
                    <div id="recommendationsList" class="recommendations-list"></div>
                </div>

                <div id="messageArea" class="message-area"></div>
            </div>
        </main>

        <footer class="footer">
            <p>&copy; 2024 个性化饮食推荐助手</p>
        </footer>
    </div>

    <script src="{{ url_for('static', filename='js/recommendation.js') }}"></script>
</body>
</html>
