/*
 * Hills of Freedom – hof-additions.css
 * Ergänzungen zur bestehenden hof-style.css
 * Reihenfolge: hof-style.css zuerst, dann diese Datei
 */

/* ── Reset ───────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* ── Zentrierung + Safe Areas ────────────────────────────────────────── */
/*
 * hof-style.css setzt body { position:fixed; padding: 1.3svh 2vw }
 * Das reicht auf Desktop. Auf iOS mit Notch/Home-Indicator brauchen wir
 * zusätzlich env(safe-area-inset-*) und sicheres Zentrieren.
 * width:100% + margin:auto auf dem body zentriert den Inhalt.
 */
body {
  /* safe-area-insets über die bestehenden paddings legen */
  padding-top:    max(1.3svh, env(safe-area-inset-top));
  padding-bottom: max(1.3svh, env(safe-area-inset-bottom));
  padding-left:   max(2vw,    env(safe-area-inset-left));
  padding-right:  max(2vw,    env(safe-area-inset-right));
  /* Zentriert die Card horizontal auf allen Bildschirmbreiten */
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
}

/* ── iOS Unlock Overlay ──────────────────────────────────────────────── */
#ios-unlock-overlay {
  position: fixed;
  inset: 0;
  /* Muss HÖHER sein als #sleep-mode (9999) und alles andere */
  z-index: 19999;
  /* WICHTIG: display:none als Standard – nicht display:flex!
     Sonst liegt das Overlay unsichtbar über der Seite und
     blockiert alle Klicks inkl. Sleep-Mode-Button. */
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 22, 40, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#ios-unlock-box {
  text-align: center;
  color: #fff;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

#ios-unlock-icon {
  font-size: 3.5rem;
  line-height: 1;
  animation: hof-float 3s ease-in-out infinite;
}

@keyframes hof-float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

#ios-unlock-title {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: #fff;
}

#ios-unlock-sub {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.6);
}

#ios-unlock-btn {
  margin-top: 0.5rem;
  padding: 0.9rem 2.8rem;
  font-size: 1.05rem;
  font-weight: 500;
  border: none;
  border-radius: 50px;
  background: linear-gradient(135deg, #2a7fbd, #1a5a9a);
  color: #fff;
  cursor: pointer;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 20px rgba(42, 127, 189, 0.45);
  transition: transform 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
  appearance: none;
  min-height: 44px;
  min-width: 44px;
  touch-action: manipulation;
}

#ios-unlock-btn:active {
  transform: scale(0.96);
}

/* ── Slider: Original-Design erhalten, Touch verbessern ─────────────── */
.slider {
  overflow: hidden;
  touch-action: pan-y;
  cursor: pointer;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  background-image: linear-gradient(#666666, white, white, #999999);
  box-shadow: -2px 0px 5px rgba(0,0,0,0.6), -100vw 0 0 calc(100vw) #6699ff;
  border-left: 2px solid black;
  border-right: 1px solid white;
  cursor: grab;
  height: 13vw;
  position: relative;
  width: 3svh;
  z-index: 999;
}

.slider::-moz-range-thumb {
  background-image: linear-gradient(#666666, white, white, #999999);
  border-left: 2px solid black;
  border-right: 1px solid white;
  cursor: grab;
  height: 13vw;
  width: 3svh;
  border-radius: 0;
}

.slider::-moz-range-track {
  background-image: linear-gradient(-90deg, #e6e6e6, white, #b3b3b3, #b3b3b3, #e6e6e6);
  height: 100%;
}

/* ── Buttons: iOS Mindest-Touch-Target ───────────────────────────────── */
.box-centered {
  min-height: 44px;
  min-width:  44px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
}

button, a, input[type="range"] {
  touch-action: manipulation;
}

/* ── PWA Standalone ──────────────────────────────────────────────────── */
@media all and (display-mode: standalone) {
  html, body {
    overscroll-behavior: none;
    overflow: hidden;
    height: 100%;
  }
  #main-card-sea {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}
