* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  min-height: 100vh;
  background: #020b1a;
  font-family: 'Quicksand', sans-serif;
  color: #e0f0ff;
}

body {
  position: relative;
  /* The aquarium scene is positioned absolutely against body; everything
     else sits on top via z-index. */
  min-height: 100dvh;
}

.aq-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.lobby {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 60px 22px 28px;
  display: flex;
  flex-direction: column;
  /* Fill the body without exceeding it — body already has min-height: 100dvh,
     so matching that here (not min-height) keeps the page from being scrollable
     by default when nothing is revealed. */
  min-height: inherit;
}

.lobby-header {
  text-align: center;
  margin-bottom: auto;
}

.lobby h1 {
  font-family: 'Knewave', cursive;
  font-weight: 400;
  font-size: 50px;
  line-height: 1.05;
  color: #fff;
  letter-spacing: -0.005em;
  text-shadow:
    0 4px 30px rgba(0, 0, 0, 0.7),
    0 0 40px rgba(74, 158, 255, 0.5);
}

.subtitle {
  font-family: 'Quicksand', sans-serif;
  font-weight: 500;
  font-size: 15px;
  color: rgba(220, 235, 255, 0.85);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
  margin-top: 12px;
}

/* Primary glass action card. */
.action-card {
  margin: 14px 0 0;
  padding: 22px 20px;
  background: rgba(8, 28, 52, 0.55);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  border: 1px solid rgba(180, 215, 255, 0.18);
  border-radius: 26px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55);
}

.btn {
  /* display/text-align/text-decoration make the class behave identically whether
     it's applied to a <button> (default inline-block) or an <a> (default inline,
     underlined) — e.g. keep.html's "Open my tank" link. Without display:block an
     anchor ignores width:100% and its padding overlaps the neighbouring rows. */
  display: block;
  box-sizing: border-box;
  text-align: center;
  text-decoration: none;
  width: 100%;
  border: none;
  cursor: pointer;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
}
/* The display:block above overrides the UA [hidden] rule, so re-assert it or
   buttons toggled via the `hidden` attribute (e.g. keep.html's pay button, which
   is gated on server-reported keepPayments) would stay visible. */
.btn[hidden] { display: none; }

.btn.primary {
  background: linear-gradient(180deg, #5aabff 0%, #4a9eff 100%);
  border-radius: 50px;
  color: #fff;
  font-size: 17px;
  padding: 17px 24px;
  box-shadow:
    0 8px 24px rgba(74, 158, 255, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn.primary:hover {
  background: linear-gradient(180deg, #6db5ff 0%, #5aabff 100%);
  transform: translateY(-1px);
  box-shadow:
    0 12px 30px rgba(74, 158, 255, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn:disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
}

.primary-hint {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(220, 235, 255, 0.7);
  text-align: center;
}

.secondary-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  color: rgba(220, 235, 255, 0.85);
  font-size: 13px;
  padding: 11px 12px;
}
.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Event + How-it-works cards: same glass treatment, slightly lighter. */
.event-card,
.how-card {
  margin-top: 14px;
  padding: 22px 20px;
  background: rgba(8, 28, 52, 0.5);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid rgba(180, 215, 255, 0.16);
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.event-card h2,
.how-card h2 {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 17px;
  color: #fff;
  margin-bottom: 12px;
}

.event-card[hidden],
.how-card[hidden] { display: none; }

.field-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
/* display:flex above overrides the UA [hidden] rule, so re-assert it — otherwise
   a field-stack toggled via the `hidden` attribute (e.g. keep.html's recovery-
   email row, gated on server-reported keepEmail) would stay visible. Same trap
   as .btn[hidden] above. */
.field-stack[hidden] { display: none; }

.view-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 11px 14px;
  /* 16px keeps iOS Safari from auto-zooming on focus. */
  font-size: 16px;
  color: #e0f0ff;
  font-family: 'Quicksand', sans-serif;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.view-input::placeholder {
  color: rgba(220, 235, 255, 0.5);
  font-family: 'Quicksand', sans-serif;
  font-size: 13px;
}
.view-input:focus {
  border-color: rgba(74, 158, 255, 0.7);
  box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.35);
}

.event-card .btn.primary {
  background: linear-gradient(180deg, #c590ff 0%, #b478ff 100%);
  box-shadow:
    0 8px 24px rgba(180, 120, 255, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.event-card .btn.primary:hover {
  background: linear-gradient(180deg, #d4a4ff 0%, #c590ff 100%);
  box-shadow:
    0 12px 30px rgba(180, 120, 255, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.event-card .view-input:focus {
  border-color: rgba(180, 120, 255, 0.7);
  box-shadow: 0 0 0 2px rgba(180, 120, 255, 0.35);
}

.hint {
  color: rgba(220, 235, 255, 0.7);
  font-size: 12px;
  margin-top: 8px;
  text-align: center;
}

.error {
  color: #ff9797;
  font-size: 13px;
  margin-top: 8px;
  min-height: 18px;
  text-align: center;
}

.how-steps {
  list-style: none;
  counter-reset: how;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.how-steps li {
  counter-increment: how;
  padding-left: 30px;
  position: relative;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(220, 235, 255, 0.85);
}
.how-steps li::before {
  content: counter(how);
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(74, 158, 255, 0.25);
  border: 1px solid rgba(74, 158, 255, 0.5);
  border-radius: 50%;
  color: #fff;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 12px;
}
.how-steps strong { color: #fff; }

/* Keep My Tank upsell — a quiet glass card linking to the product page. Kept
   visible (not behind a toggle) so the offer + price are discoverable from the
   home page. */
.keep-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 14px 18px;
  background: rgba(8, 28, 52, 0.5);
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border: 1px solid rgba(180, 215, 255, 0.16);
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  text-decoration: none;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.keep-card:hover {
  transform: translateY(-1px);
  background: rgba(12, 36, 64, 0.6);
  border-color: rgba(180, 215, 255, 0.32);
}
.keep-card-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.keep-card-text strong {
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: #fff;
}
.keep-card-sub {
  font-size: 12px;
  color: rgba(220, 235, 255, 0.7);
  line-height: 1.35;
}
.keep-card-price {
  flex-shrink: 0;
  font-family: 'Fredoka', sans-serif;
  font-weight: 600;
  font-size: 18px;
  color: #fff;
  background: linear-gradient(180deg, #5aabff 0%, #4a9eff 100%);
  border-radius: 12px;
  padding: 8px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.lobby-footer {
  margin-top: 18px;
  font-family: 'Quicksand', sans-serif;
  font-size: 11px;
  color: rgba(220, 235, 255, 0.55);
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
.lobby-footer a {
  color: rgba(220, 235, 255, 0.75);
  text-decoration: none;
  border-bottom: 1px solid rgba(220, 235, 255, 0.3);
}
.lobby-footer a:hover { color: #fff; border-bottom-color: #fff; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* Tablet / laptop — wider card, bigger title, but same composition. */
@media (min-width: 768px) {
  .lobby {
    max-width: 540px;
    padding: 80px 22px 40px;
  }
  .lobby h1 {
    font-size: 76px;
    line-height: 1;
  }
  .subtitle {
    font-size: 20px;
    margin-top: 16px;
  }
  .action-card {
    padding: 34px 34px;
    border-radius: 28px;
  }
  .btn.primary {
    font-size: 19px;
    padding: 18px 28px;
  }
  .primary-hint { font-size: 13px; margin-top: 12px; }
  .btn.ghost { font-size: 14px; padding: 12px 16px; }
}
