:root {
  --ink: #0b1c24;
  --foam: #e8f4f2;
  --mist: #b7d4ce;
  --water-deep: #0a3d4a;
  --water-mid: #12657a;
  --water-glow: #1f9aad;
  --ember: #e85d04;
  --ember-deep: #c44900;
  --coral: #ff7a45;
  --taken: #5a6b72;
  --free: #1aaa8c;
  --ok: #1f7a4c;
  --err: #b42318;
  --panel: rgba(8, 28, 36, 0.82);
  --font-display: "Bebas Neue", Impact, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --radius: 14px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--foam);
  line-height: 1.45;
  background-color: #0b1c24;
  background-image:
    linear-gradient(
      180deg,
      rgba(7, 21, 28, 0.45) 0%,
      rgba(7, 21, 28, 0.28) 45%,
      rgba(7, 21, 28, 0.55) 100%
    ),
    url("../img/magdeburg-elbe-dom.png");
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Fallback-Layer; eigentliches Motiv liegt auf body */
.atmosphere {
  display: none;
}

@media (max-width: 820px) {
  body {
    background-attachment: scroll;
  }
}

.hero {
  text-align: center;
  padding: clamp(2.5rem, 8vw, 4.5rem) 1.25rem 1.25rem;
  max-width: 52rem;
  margin: 0 auto;
  animation: rise 0.8s ease-out both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.hero-kicker {
  margin: 0 0 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--mist);
}

.hero-brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.4rem, 12vw, 6.5rem);
  letter-spacing: 0.04em;
  line-height: 0.95;
  color: #fff;
  text-shadow: 0 0 40px rgba(232, 93, 4, 0.35);
}

.hero-lead {
  margin: 0.85rem auto 0;
  max-width: 28rem;
  font-size: 1.1rem;
  color: var(--foam);
}

.status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.55rem 0.9rem;
  margin: 0.5rem auto 1.5rem;
  padding: 0.55rem 1rem;
  width: fit-content;
  max-width: calc(100% - 2rem);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  font-size: 0.95rem;
  backdrop-filter: blur(8px);
}

.live-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--taken);
}

.live-dot.is-live {
  background: #3dd68c;
  box-shadow: 0 0 0 0 rgba(61, 214, 140, 0.6);
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(61, 214, 140, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(61, 214, 140, 0); }
  100% { box-shadow: 0 0 0 0 rgba(61, 214, 140, 0); }
}

.muted { color: var(--mist); font-size: 0.85rem; }

.boats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: clamp(0.65rem, 2vw, 1.75rem);
  width: min(1200px, calc(100% - 1.25rem));
  margin: 0 auto 3rem;
}

.boat {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: calc(var(--radius) + 6px);
  padding: 1.1rem 0.75rem 1.35rem;
  box-shadow: var(--shadow);
  animation: rise 0.7s ease-out both;
  min-width: 0;
}

.boat--2 { animation-delay: 0.12s; }

.boat-head {
  text-align: center;
  margin-bottom: 0.85rem;
}

.boat-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.06em;
}

.boat--1 .boat-head h2 { color: var(--coral); }
.boat--2 .boat-head h2 { color: #7fd4e8; }

.boat-head p {
  margin: 0.25rem 0 0;
  color: var(--mist);
  font-size: 0.92rem;
}

.hull {
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem 0.6rem 1rem;
  border-radius: 999px / 48px;
  background:
    linear-gradient(180deg, rgba(18, 101, 122, 0.45), rgba(10, 61, 74, 0.75));
  border: 1px solid rgba(127, 212, 232, 0.2);
  position: relative;
}

.hull::before,
.hull::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 42%;
  height: 10px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}

.hull::before { top: 4px; }
.hull::after { bottom: 4px; }

.hull-zone--solo {
  display: flex;
  justify-content: center;
}

.hull-zone--rows {
  display: grid;
  gap: 0.4rem;
}

.paddle-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 0.35rem;
}

.paddle-row .seat:first-child { justify-self: end; }
.paddle-row .seat:last-child { justify-self: start; }

.row-num {
  width: 1.4rem;
  text-align: center;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.35);
  font-weight: 700;
}

.seat {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 12px;
  box-sizing: border-box;
  /* min-width:0 nötig, sonst sprengen lange Namen das CSS-Grid */
  min-width: 0;
  width: 100%;
  max-width: 5.2rem;
  height: 2.85rem;
  max-height: 2.85rem;
  padding: 0.28rem 0.3rem;
  display: grid;
  grid-template-rows: auto auto;
  gap: 0.05rem;
  align-content: center;
  justify-items: stretch;
  cursor: pointer;
  font: inherit;
  color: inherit;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

.seat-label,
.seat-state {
  display: block;
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.seat-label {
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.1;
}

.seat-state {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.15;
}

.seat-state--name {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.55rem;
  font-weight: 600;
}

.seat.is-free {
  background: linear-gradient(160deg, rgba(26, 170, 140, 0.95), rgba(15, 120, 110, 0.95));
  border-color: rgba(180, 255, 230, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.seat.is-free:hover,
.seat.is-free:focus-visible {
  transform: translateY(-2px) scale(1.03);
  outline: none;
  box-shadow: 0 8px 22px rgba(26, 170, 140, 0.45);
}

.seat.is-taken,
.seat.is-blocked {
  background: rgba(90, 107, 114, 0.55);
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.55);
  cursor: not-allowed;
}

.seat.is-blocked {
  background: rgba(40, 52, 58, 0.75);
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.18);
}

.seat--trommler,
.seat--steuer {
  min-width: 0;
  max-width: 6.5rem;
  width: min(100%, 6.5rem);
  background-image: none;
}

/* Nur auf sehr schmalen Phones untereinander; sonst immer nebeneinander */
@media (max-width: 520px) {
  .boats {
    grid-template-columns: 1fr;
  }

  .seat {
    min-width: 0;
    max-width: 100%;
    width: 100%;
    height: 2.85rem;
    max-height: 2.85rem;
  }

  .seat--trommler,
  .seat--steuer {
    max-width: 8rem;
    width: min(100%, 8rem);
  }
}

@media (min-width: 521px) and (max-width: 820px) {
  .boat-head h2 { font-size: 1.55rem; }
  .seat-label { font-size: 0.82rem; }
  .seat-state { font-size: 0.55rem; }
  .seat-state--name { font-size: 0.5rem; }
  .row-num { font-size: 0.6rem; width: 1rem; }
}

.boat--1 .seat.is-free.seat--trommler,
.boat--1 .seat.is-free.seat--steuer {
  background: linear-gradient(160deg, var(--ember), var(--ember-deep));
}

.boat--2 .seat.is-free.seat--trommler,
.boat--2 .seat.is-free.seat--steuer {
  background: linear-gradient(160deg, var(--water-glow), var(--water-mid));
}

.reserve-dialog {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  padding: 0;
  background: #102832;
  color: var(--foam);
  width: min(26rem, calc(100vw - 2rem));
  box-shadow: var(--shadow);
}

.reserve-dialog::backdrop {
  background: rgba(3, 12, 16, 0.72);
  backdrop-filter: blur(3px);
}

.reserve-dialog form {
  display: grid;
  gap: 0.85rem;
  padding: 1.35rem 1.25rem 1.25rem;
}

.reserve-dialog h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.8rem;
  letter-spacing: 0.04em;
}

.dialog-seat {
  margin: 0.25rem 0 0;
  color: var(--coral);
  font-weight: 700;
}

.reserve-dialog label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.reserve-dialog input {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  font: inherit;
}

.reserve-dialog input:focus {
  outline: 2px solid var(--water-glow);
  border-color: transparent;
}

.optional { color: var(--mist); font-weight: 400; }
.required { color: var(--coral); }

.fineprint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--mist);
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.btn {
  appearance: none;
  border: none;
  border-radius: 10px;
  padding: 0.65rem 1rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background: linear-gradient(160deg, var(--ember), var(--ember-deep));
  color: #fff;
}

.btn-primary:hover { filter: brightness(1.06); }

.btn-ghost {
  background: transparent;
  color: var(--foam);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-danger {
  background: #9b2c2c;
  color: #fff;
}

.btn-small {
  padding: 0.35rem 0.6rem;
  font-size: 0.85rem;
}

.btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.form-status {
  margin: 0;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  font-size: 0.9rem;
}

.form-status.is-ok {
  background: rgba(31, 122, 76, 0.25);
  color: #8de0b0;
}

.form-status.is-error {
  background: rgba(180, 35, 24, 0.22);
  color: #ffb4a8;
}

.site-footer {
  text-align: center;
  padding: 0 1rem 2.5rem;
  color: var(--mist);
  font-size: 0.9rem;
}

/* Cancel / Admin / Zugangscode – gleiches Panel-Look wie bisher */
.page-cancel,
.page-admin,
.page-access {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  /* überschreibt das Foto-Hintergrund von body */
  background-color: #07151c;
  background-image:
    radial-gradient(800px 400px at 20% 0%, rgba(232, 93, 4, 0.2), transparent 50%),
    linear-gradient(165deg, #07151c, #0a3d4a);
  background-size: auto;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: scroll;
}

.page-admin {
  place-items: start center;
  align-content: start;
}

.cancel-panel,
.admin-wrap,
.access-gate {
  width: min(40rem, 100%);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.brand-mark {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  font-size: 1.4rem;
  color: var(--coral);
}

.cancel-panel h1,
.admin-wrap h1,
.access-gate h1 {
  margin: 0.35rem 0 0.75rem;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  font-size: 2.2rem;
}

.lead { color: var(--mist); margin-top: 0; }

.cancel-meta {
  display: grid;
  gap: 0.55rem;
  margin: 1rem 0 1.25rem;
}

.cancel-meta div {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 0.5rem;
}

.cancel-meta dt {
  margin: 0;
  color: var(--mist);
}

.cancel-meta dd {
  margin: 0;
  font-weight: 700;
}

.cancel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.admin-wrap { width: min(56rem, 100%); }

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin: 1rem 0;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: middle;
}

.admin-table th { color: var(--mist); font-weight: 600; }

.admin-wrap a { color: #7fd4e8; }

.admin-inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.admin-inline-form input[type="text"] {
  width: min(11rem, 100%);
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  font: inherit;
}

.admin-settings {
  margin: 1.75rem 0 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-wrap > .admin-settings:first-of-type {
  margin-top: 1rem;
  padding-top: 0;
  border-top: none;
}

.admin-settings h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  font-size: 1.55rem;
}

.admin-reserve-form,
.access-admin-form {
  display: grid;
  gap: 0.75rem;
  max-width: 22rem;
}

.admin-reserve-form label,
.access-admin-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
}

.admin-reserve-form input,
.admin-reserve-form select,
.access-admin-form input {
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  font: inherit;
}

.admin-reserve-form select option {
  color: #0b1c24;
}

.admin-check {
  display: flex !important;
  align-items: flex-start;
  gap: 0.55rem;
  font-weight: 500 !important;
  grid-template-columns: none !important;
}

.admin-check input {
  width: auto;
  margin-top: 0.2rem;
  padding: 0;
}

.admin-reserve-form .fineprint,
.access-admin-form .fineprint {
  margin: 0;
  color: var(--mist);
  font-size: 0.85rem;
  font-weight: 400;
}

.access-gate {
  width: min(22rem, 100%);
  text-align: center;
}

.access-form {
  display: grid;
  gap: 0.85rem;
  text-align: left;
  margin-top: 1rem;
}

.access-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
}

.access-form input {
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.25);
  color: inherit;
  font: inherit;
}

.access-gate .form-status {
  margin: 0.75rem 0 0;
}

.access-form .btn {
  width: 100%;
}
