<section id="theme" class="bg-gradient-to-br from-slate-50 to-blue-50 rounded-xl p-6 border-2 border-blue-200 shadow-sm">
  <form
    id="form-theme"
    hx-post="{{ form.post_url }}"
    hx-target="#theme"
    hx-swap="outerHTML"
    class="space-y-6"
  >
    <div class="flex items-center space-x-2 mb-4">
      <div class="w-3 h-3 bg-blue-500 rounded-full"></div>
      <h2 class="text-xl font-semibold text-slate-800">Theme Settings</h2>
    </div>
    
    <div>
      <label for="name" class="block text-sm font-medium text-slate-700 mb-3">
        Choose your preferred theme
      </label>
      <div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
        <label class="relative cursor-pointer">
          <input type="radio" name="name" value="plain" class="sr-only peer" {% if form.name.value == 'plain' or not form.name.value %}checked{% endif %}>
          <div class="p-4 border-2 border-slate-200 rounded-xl peer-checked:border-blue-500 peer-checked:bg-blue-50 hover:bg-slate-50 transition-all duration-200">
            <div>
              <div class="font-semibold text-slate-800">Plain</div>
              <div class="text-sm text-slate-600">Classic, print-friendly design</div>
            </div>
          </div>
        </label>
        
        <label class="relative cursor-pointer">
          <input type="radio" name="name" value="headwind" class="sr-only peer" {% if form.name.value == 'headwind' %}checked{% endif %}>
          <div class="p-4 border-2 border-slate-200 rounded-xl peer-checked:border-blue-500 peer-checked:bg-blue-50 hover:bg-slate-50 transition-all duration-200">
            <div>
              <div class="font-semibold text-slate-800">Headwind</div>
              <div class="text-sm text-slate-600">Modern, interactive design</div>
            </div>
          </div>
        </label>
      </div>
    </div>
    
    {% for error in form.name.errors %}
      <p class="text-sm text-red-600 bg-red-50 p-3 rounded-lg">{{ error|escape }}</p>
    {% endfor %}
    
    <div class="flex items-center justify-between pt-4 border-t border-slate-200">
      <div class="text-sm text-slate-500">
        Theme will be applied after saving
      </div>
      <button
        id="submit-theme"
        type="submit"
        class="inline-flex items-center px-6 py-3 bg-gradient-to-r from-blue-600 to-blue-700 hover:from-blue-700 hover:to-blue-800 text-white font-semibold rounded-xl shadow-lg hover:shadow-xl transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2"
      >
        <svg class="w-5 h-5 mr-2" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">
          <path stroke-linecap="round" stroke-linejoin="round" d="M5 13l4 4L19 7"></path>
        </svg>
        Apply Theme
      </button>
    </div>
  </form>
</section>