<!-- ./src/server/templates/index.html -->
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-zoom=user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <title>Be my Anchor</title>
    <link rel="stylesheet" href="{{ prefix }}/{{ url_for('static', filename='css/main.css') }}">
    <script src="{{ prefix }}/{{ url_for('static', filename='js/main.js') }}"></script>

</head>

<body>
    <header>
        <button class="history-button" onclick="toggleHistory()">
            <img src="{{ prefix }}/{{ url_for('static', filename='icons/clock.png') }}" alt="History">
        </button>

        <div class="branding">
            <img src="{{ prefix }}/{{ url_for('static', filename='logo.png') }}" alt="Logo" class="brand-logo">
            <span class="site-name">Be my Anchor</span>
        </div>

        <div class="nav-group">
            <div class="menu">
                <button class="menu-button" onclick="toggleMenu(event)">
                    <img src="{{ prefix }}/{{ url_for('static', filename='icons/people.png') }}" alt="Menu">
                </button>
                <div class="menu-dropdown" id="mainMenu">
                    <a href="{{ prefix }}/login" class="menu-item">Login</a>
                    <a href="{{ prefix }}/register" class="menu-item">Register</a>
                    <a href="{{ prefix }}/report" class="menu-item">Report Issue</a>
                </div>
            </div>
        </div>
    </header>

    <!-- index.html 修改后的搜索部分 -->
    <main class="search-main">
        <div class="search-container">
            <h1 class="search-title">Convert Content to Podcast</h1>
            <form class="search-form" action="{{ prefix }}/page" method="get">
                <!-- 搜索输入区 -->
                <div class="search-group">
                    <textarea name="content" class="search-textarea" placeholder="Paste your text or enter URL..."
                        rows="4" required></textarea>
                    <div class="search-actions">
                        <button type="button" class="advanced-toggle" onclick="toggleAdvancedOptions()">
                            Advanced Options
                            <img src="{{ prefix }}/static/icons/chevron-down.svg" alt="▼">
                        </button>
                        <button type="submit" class="search-icon-button">
                            <img src="{{ prefix }}/static/icons/convert.svg" alt="Convert">
                        </button>
                    </div>
                </div>

                <!-- 高级选项下拉 -->
                <div class="advanced-options" id="advancedOptions">
                    <div class="option-grid">
                        <div class="option-group">
                            <label>Voice Gender</label>
                            <select name="voice">
                                <option value="male">Male</option>
                                <option value="female">Female</option>
                                <option value="neutral">Neutral</option>
                            </select>
                        </div>

                        <div class="option-group">
                            <label>Style</label>
                            <select name="style">
                                <option value="news">News Report</option>
                                <option value="blog">Casual Blog</option>
                                <option value="story">Story Telling</option>
                                <option value="academic">Academic</option>
                            </select>
                        </div>

                        <div class="option-group">
                            <label>Custom Prompt</label>
                            <input type="text" name="prompt" placeholder="Additional instructions...">
                        </div>

                        <div class="option-group">
                            <label class="switch">
                                <input type="checkbox" name="experimental">
                                <span class="slider"></span>
                                <span>Experimental Mode</span>
                            </label>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </main>


    <!-- 在body末尾添加 -->
    <div class="loading-indicator">
        <div class="loading-spinner"></div>
        <span>Processing...</span>
    </div>
</body>

</html>