<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{{.Query}} - Spitfire Search</title>
    <link rel="stylesheet" type="text/css" href="/static/css/style.css">
</head>
<body>
    <div class="header">
        <h1>TailsGo</h1>
        <form action="/search" method="post" class="search-form" autocomplete="off">
            <div class="search-bar">
                <input type="text" name="q" value="{{ .Query }}" autofocus id="search-input" placeholder="Type to search..." />
                <button type="submit" id="search-btn">Search</button>
            </div>
        </form>
    </div>
    <form class="results_settings" action="/search" method="get">
        <input type="hidden" name="q" value="{{ .Query }}">
        <select class="results-settings" name="safe" id="safeSearchSelect">
            <option value="">Safe Search Off</option>
            <option value="active">Safe Search On</option>
        </select>
        <select class="results-settings" name="lang" id="languageSelect">
            {{range .LanguageOptions}}
            <option value="{{.Code}}" {{if eq .Code $.CurrentLang}}selected{{end}}>{{.Name}}</option>
            {{end}}
        </select>        
        <button class="results-save" type="submit">Apply settings</button>
    </form>    
    <div class="results">
        <!-- Results go here -->
        {{range .Results}}
            <div class="result_item">
                <a href="{{.URL}}">{{.URL}}</a>
                <a href="{{.URL}}"><h3>{{.Header}}</h3></a>
                <p>{{.Description}}</p>
            </div>
            <br>
        {{end}}
    </div>
    <!-- Additional features and formatting based on inspiration.html -->
</body>
</html>