<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <meta charset="UTF-8" />
    <title>我的超级汉堡</title>
    <style>
      body {
        background-image: url("{{ url_for('static', filename='images/bg.png') }}");
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        background-attachment: fixed;
        overflow: hidden;
        text-align: center;
        font-family: Arial, sans-serif;
        width: 100vw;
        height: 100vh;
        margin: 0;
        padding: 0;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
        padding-bottom: 50px;
      }
      .view {
        flex: 1;
        position: relative;
        overflow: hidden;
      }
      .burger {
        position: relative;
        width: 300px;
        margin-left: auto;
        margin-right: auto;
      }
      .ingredient {
        width: 300px;
        display: block;
        position: absolute;
      }

      /* 滑动条容器样式 */
      .slider-container {
        position: fixed;
        right: 20px;
        top: 50%;
        transform: translateY(-50%) scale(1.5);
        height: 60vh;
        width: 30px;
        z-index: 1000;
        display: flex;
        align-items: center;
        justify-content: center;
      }

      /* 竖向滑动条样式 */
      .burger-slider {
        -webkit-appearance: slider-vertical; /* WebKit */
        width: 20px;
        height: 100%;
        background: rgba(255, 255, 255, 0.8);
        border-radius: 10px;
        outline: none;
        cursor: pointer;
      }

      /* Firefox 滑动条样式 */
      .burger-slider::-moz-range-track {
        width: 20px;
        height: 100%;
        background: rgba(255, 255, 255, 0.8);
        border-radius: 10px;
        border: none;
      }

      .burger-slider::-moz-range-thumb {
        width: 20px;
        height: 40px;
        background: #007bff;
        border-radius: 10px;
        border: none;
        cursor: pointer;
      }

      /* WebKit 滑动条样式 */
      .burger-slider::-webkit-slider-track {
        width: 20px;
        height: 100%;
        background: rgba(255, 255, 255, 0.8);
        border-radius: 10px;
      }

      .burger-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 20px;
        height: 40px;
        background: #007bff;
        border-radius: 10px;
        cursor: pointer;
      }
    </style>
  </head>
  <body>
    <h1>🎉 你的超级汉堡来了！</h1>
    <div class="view">
      <div class="burger">
        {% for ingredient in ingredients %}
        <img
          class="ingredient"
          src="{{ url_for('static', filename='images/' + ingredient + '.png') }}"
          alt="{{ ingredient }}"
          data-index="{{ loop.index0 }}"
          data-ingredient="{{ ingredient }}"
        />
        {% endfor %}
      </div>
    </div>

    <!-- 竖向滑动条 -->
    <div class="slider-container" id="sliderContainer" style="display: none">
      <input
        type="range"
        id="burgerSlider"
        class="burger-slider"
        min="0"
        max="100"
        value="0"
        orient="vertical"
      />
    </div>

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