/* Volltreffer! – Das See-Duell · Spiel-Screen */
html, body { margin: 0; padding: 0; background: #000; }
* { box-sizing: border-box; }
a { color: #f0c552; text-decoration: none; }
a:hover { color: #ffe1a0; }

.game {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 460px;
  overflow: hidden;
  background: #000;
  font-family: "Baloo 2", system-ui, sans-serif;
}

.game__board {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 50% 58%;
  animation: board-breathe 6s ease-in-out infinite;
}

.game__title {
  position: absolute;
  left: 50%;
  top: 5%;
  width: clamp(120px, 18vw, 500px);
  height: auto;
  transform: translateX(-50%);
  animation: title-float 7s ease-in-out infinite;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.6));
}

/* --- Score-Plates --- */
.plate {
  position: absolute;
  top: clamp(24px, 6vh, 60px);
  width: clamp(180px, 27vw, 600px);
  cursor: pointer;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5));
}
.plate--michael { left: clamp(14px, 2.2vw, 46px); }
.plate--susanne { right: clamp(14px, 2.2vw, 46px); }

.plate.is-active { animation: plate-turn 3s ease-in-out infinite; }
.plate--michael.is-active { filter: drop-shadow(0 0 18px rgba(120, 180, 255, 0.55)); }
.plate--susanne.is-active { filter: drop-shadow(0 0 18px rgba(240, 200, 90, 0.55)); }

.plate__frame { display: block; width: 100%; height: auto; }

.plate__avatar {
  position: absolute;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
}
.plate--michael .plate__avatar { left: 1.2%; top: 3%; width: 38.2%; }
.plate--susanne .plate__avatar { right: 0.4%; top: 2%; width: 39%; }

.plate__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 16%;
  transform: scale(1.32);
  transform-origin: 50% 22%;
}

/* Ankerfläche für den "am Zug"-Stein */
.plate__stone-slot {
  position: absolute;
  top: 68%;
  width: 30%;
  aspect-ratio: 1;
  pointer-events: none;
  z-index: 3;
}
.plate--michael .plate__stone-slot { left: 20%; }
.plate--susanne .plate__stone-slot { right: 20%; }

.plate__stone {
  display: block;
  width: 100%;
  height: auto;
  animation: turn-stone 2.6s ease-in-out infinite;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.55));
}
.plate:not(.is-active) .plate__stone,
.is-flying .plate__stone { display: none; }

.plate__value {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42%;
}
.plate--michael .plate__value { left: 116px; top: 58px; width: 37%; }
.plate--susanne .plate__value { left: 84px; top: 59px; width: 35%; }

.plate__value span {
  font-size: clamp(50px, 3.1vw, 62px);
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 2px 5px rgba(4, 16, 34, 0.75);
}
.plate--michael .plate__value span { color: #a9d3f7; }
.plate--susanne .plate__value span { color: #f2c14e; }

.plate__left {
  position: absolute;
  top: 56%;
  width: 24%;
  height: 30%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.plate--michael .plate__left { left: 74%; }
.plate--susanne .plate__left { left: 2%; }

.plate__left span {
  font-size: clamp(13px, 1.85vw, 38px);
  font-weight: 800;
  line-height: 1;
  color: #f0c552;
  text-shadow: 0 2px 4px rgba(4, 16, 34, 0.75);
}

/* Fliegender Stein (Position per JS) */
.flying-stone {
  position: absolute;
  display: none;
  height: auto;
  pointer-events: none;
  z-index: 12;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.55));
}
.flying-stone.is-visible { display: block; }

/* --- Zug-Hinweis --- */
.turn-bar {
  position: absolute;
  left: 50%;
  bottom: 3.4vh;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  border-radius: 999px;
  background: rgba(8, 22, 40, 0.62);
  border: 1px solid rgba(160, 200, 240, 0.28);
  backdrop-filter: blur(4px);
}
.turn-bar__dot { width: 9px; height: 9px; border-radius: 50%; background: #7fb6f5; }
.turn-bar__text {
  font-size: clamp(12px, 1.25vw, 22px);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
}
.turn-bar__sep { width: 1px; height: 16px; background: rgba(160, 200, 240, 0.35); }
.turn-bar__meta {
  font-size: clamp(11px, 1.05vw, 18px);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.6);
}
.turn-bar__meta--board { color: rgba(240, 197, 82, 0.9); }

/* --- Glasmorph-Flächen --- */
.glass {
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  box-shadow: 0 8px 24px rgba(4, 16, 34, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.controls { position: absolute; right: 2vw; bottom: 3vh; display: flex; align-items: center; }

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(44px, 4.4vw, 68px);
  height: clamp(44px, 4.4vw, 68px);
  padding: 0;
  cursor: pointer;
  border-radius: 16px;
  color: rgba(255, 255, 255, 0.92);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}
.icon-btn:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.45); }
.icon-btn:active { transform: translateY(1px); }
.icon-btn svg { width: 58%; height: 58%; pointer-events: none; }

/* --- Einstellungen --- */
.settings {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(4, 16, 34, 0.45);
}
.settings.is-open { display: flex; }

.settings__panel {
  width: min(440px, 86vw);
  padding: 26px 26px 22px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.13);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: 0 24px 60px rgba(4, 16, 34, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  color: #fff;
}

.settings__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.settings__title { font-size: 20px; font-weight: 700; }
.settings__close {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; padding: 0;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  color: #fff; cursor: pointer;
}
.settings__close:hover { background: rgba(255, 255, 255, 0.2); }
.settings__close svg { width: 18px; height: 18px; }

.settings__list { display: flex; flex-direction: column; gap: 16px; font-family: system-ui, sans-serif; }
.settings__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.settings__group { display: flex; flex-direction: column; gap: 8px; }
.settings__label { font-size: 15px; font-weight: 600; }

.switch {
  width: 52px; height: 30px; padding: 3px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.18);
  cursor: pointer;
  display: flex; justify-content: flex-start;
  transition: background 180ms ease;
}
.switch.is-on { background: rgba(120, 200, 140, 0.85); justify-content: flex-end; }
.switch__knob { width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(4, 16, 34, 0.4); }

.segmented {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.segmented button {
  padding: 9px 0;
  border: none;
  border-radius: 9px;
  font-family: system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  transition: background 160ms ease;
}
.segmented button.is-selected { background: rgba(255, 255, 255, 0.92); color: #12354d; }

/* --- Animationen --- */
@keyframes plate-turn {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-4px) scale(1.012); }
}
@keyframes board-breathe {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.965; }
}
@keyframes turn-stone {
  0%, 100% { transform: rotate(-9deg) translateY(0); }
  50%      { transform: rotate(7deg) translateY(-7px); }
}
@keyframes title-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
  .game__board, .game__title, .plate, .plate__stone { animation: none; }
}
