body {
  min-height: 100vh;
  margin: 0;
  font-family: Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #e0e7ef, #ffffff, #b3c6e0, #4f8cff, #1a237e);
  background-size: 400% 400%;
  animation: rgbBG 18s ease-in-out infinite;
  color: #222;
  transition: background 0.5s, color 0.5s;
}

body.dark {
  background: linear-gradient(135deg, #181c22, #232a34, #2c3440, #1a237e, #111215);
  background-size: 400% 400%;
  animation: rgbBG-dark 18s ease-in-out infinite;
  color: #f2f2f2;
}

@keyframes rgbBG {
  0% {background-position: 0% 50%;}
  25% {background-position: 50% 100%;}
  50% {background-position: 100% 50%;}
  75% {background-position: 50% 0%;}
  100% {background-position: 0% 50%;}
}

@keyframes rgbBG-dark {
  0% {background-position: 0% 50%;}
  25% {background-position: 50% 100%;}
  50% {background-position: 100% 50%;}
  75% {background-position: 50% 0%;}
  100% {background-position: 0% 50%;}
}

.glass-box {
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.25), 0 0 40px 10px rgba(79, 140, 255, 0.10);
  backdrop-filter: blur(24px) brightness(1.12);
  -webkit-backdrop-filter: blur(24px) brightness(1.12);
  border-radius: 28px;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  padding: 48px 36px;
  min-width: 340px;
  max-width: 95vw;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: box-shadow 0.3s;
}

.glass-box:hover {
  box-shadow: 0 12px 48px 0 rgba(31, 38, 135, 0.45), 0 0 60px 20px rgba(79, 140, 255, 0.25);
}

input, select, button {
  margin: 12px;
  padding: 12px;
  font-size: 1.05rem;
  border-radius: 7px;
  border: 1px solid #b3c6e0;
  background: rgba(255,255,255,0.8);
  transition: background 0.2s, border 0.2s;
}

input:focus, select:focus {
  outline: none;
  background: rgba(255,255,255,0.95);
  border: 1.5px solid #4f8cff;
}

button {
  cursor: pointer;
  background: linear-gradient(90deg, #4f8cff 0%, #1a237e 100%);
  color: white;
  border: none;
  transition: background 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 8px 0 rgba(79, 140, 255, 0.15);
  font-weight: bold;
  letter-spacing: 1px;
  padding: 12px 28px;
}

button:hover {
  background: linear-gradient(90deg, #1a237e 0%, #4f8cff 100%);
  box-shadow: 0 4px 16px 0 rgba(79, 140, 255, 0.25);
}

.glass-topbar {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  background: rgba(255,255,255,0.18);
  box-shadow: 0 2px 16px 0 rgba(31, 38, 135, 0.12);
  backdrop-filter: blur(14px) brightness(1.10);
  -webkit-backdrop-filter: blur(14px) brightness(1.10);
  border-bottom: 1.5px solid rgba(255,255,255,0.18);
  z-index: 10;
}

.result-box {
  min-height: 32px;
  margin-bottom: 18px;
  color: #1a237e;
  font-size: 1.25rem;
  font-weight: bold;
  text-align: center;
  width: 100%;
  background: rgba(255,255,255,0.35);
  border-radius: 8px;
  box-shadow: 0 1px 8px 0 rgba(79, 140, 255, 0.07);
  padding: 8px 0;
  transition: background 0.2s;
}

.theme-switch {
    display: flex;
    align-items: center;
    gap: 8px;
}

.theme-switch .icon {
    font-size: 1.5em;
    transition: opacity 0.3s;
    user-select: none;
}

.toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    width: 48px;
    height: 24px;
    background: #e0e0e0;
    border-radius: 12px;
    position: relative;
    transition: background 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.toggle-label .slider {
    position: absolute;
    left: 3px;
    top: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    transition: left 0.3s, background 0.3s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

#toggleTheme {
    display: none;
}

#toggleTheme:checked + .toggle-label {
    background: #222b3a;
}

#toggleTheme:checked + .toggle-label .slider {
    left: 27px;
    background: #444c5e;
}

/* Sonne/Mond Sichtbarkeit */
.theme-switch .sun {
    opacity: 1;
    transition: opacity 0.3s;
}
.theme-switch .moon {
    opacity: 0.4;
    transition: opacity 0.3s;
}
body.dark .theme-switch .sun {
    opacity: 0.4;
}
body.dark .theme-switch .moon {
    opacity: 1;
}

/* Beispiel-HTML für die glasige Box */
<div class="glass-box">
  <h1>EasyConvert</h1>
  <input id="inputValue" type="number" placeholder="Wert eingeben">
  <div style="display: flex; gap: 12px; margin-bottom: 16px;">
    <select id="fromUnit">
      <option value="mm">Millimeter (mm)</option>
      <option value="cm">Zentimeter (cm)</option>
      <option value="dm">Dezimeter (dm)</option>
      <option value="m">Meter (m)</option>
      <option value="km">Kilometer (km)</option>
    </select>
    <span style="align-self: center;">→</span>
    <select id="toUnit">
      <option value="mm">Millimeter (mm)</option>
      <option value="cm">Zentimeter (cm)</option>
      <option value="dm">Dezimeter (dm)</option>
      <option value="m">Meter (m)</option>
      <option value="km">Kilometer (km)</option>
    </select>
  </div>
  <div id="result" class="result-box"></div>
  <button onclick="convert()">Umrechnen</button>
  <button onclick="resetFields()">Zurücksetzen</button>
</div>