@import url("https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700&display=swap");

/* ===========================================================================
   Moby's Games — nautical / deep-sea theme
   =========================================================================== */

:root {
  --abyss: #0a0613;
  --deep: #1b0f33;
  --sea: #3a1f63;
  --teal: #a368ff; /* luminous violet accent (kept the var name for reach) */
  --foam: #f1eafb;
  --brass: #c8a86a;
  --brass-dark: #8a6f3b;
  --brass-light: #f0d9a6;
  --coral: #ff7e9d;
  --live: #ff3d8b;
  --ink: #d9c9f5;
  --muted: #9a86c0;

  --font-display: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
  --font-body: "Archivo", "Helvetica Neue", Arial, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(120% 90% at 50% -10%, #3a1a63 0%, transparent 55%),
    linear-gradient(180deg, #271348 0%, var(--deep) 35%, var(--abyss) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* --- Ocean + waves -------------------------------------------------------- */
.ocean {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38vh;
  z-index: 0;
  pointer-events: none;
}

.wave {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 200%;
  height: 100%;
  background-repeat: repeat-x;
  background-position: bottom;
  background-size: 50% 100%;
}

.wave1 {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0 50 C150 90 350 10 600 50 C850 90 1050 10 1200 50 L1200 120 L0 120 Z' fill='%233a1f63'/%3E%3C/svg%3E");
  opacity: 0.55;
  animation: drift 18s linear infinite;
}
.wave2 {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0 60 C200 20 400 100 600 60 C800 20 1000 100 1200 60 L1200 120 L0 120 Z' fill='%23271445'/%3E%3C/svg%3E");
  opacity: 0.7;
  animation: drift 26s linear infinite reverse;
  height: 85%;
}
.wave3 {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M0 70 C150 50 350 95 600 70 C850 45 1050 95 1200 70 L1200 120 L0 120 Z' fill='%23170a2b'/%3E%3C/svg%3E");
  opacity: 0.9;
  animation: drift 34s linear infinite;
  height: 70%;
}

@keyframes drift {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* --- Bubbles -------------------------------------------------------------- */
.bubbles {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.bubble {
  position: absolute;
  bottom: -40px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.7), rgba(180, 130, 240, 0.14));
  box-shadow: 0 0 6px rgba(205, 175, 255, 0.28);
  animation-name: rise;
  animation-timing-function: ease-in;
  animation-iteration-count: infinite;
  opacity: 0;
}
@keyframes rise {
  0% {
    transform: translateY(0) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  90% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(-105vh) translateX(20px);
    opacity: 0;
  }
}

/* --- Swimming sea critters (background pod, driven by whale.js) ------------ */
.swim-critter {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  pointer-events: none;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.4));
  will-change: transform;
}
.swim-critter svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
/* Turtle paddling so it looks alive, not floating belly-up. */
.swim-critter .tfin {
  transform-box: fill-box;
  transform-origin: 85% 50%;
  animation: turtle-paddle 1.05s ease-in-out infinite;
}
.swim-critter .tfin.lower {
  animation-delay: -0.52s;
}
.swim-critter .tfin.back {
  transform-origin: 15% 50%;
  animation-duration: 1.5s;
}
.swim-critter .thead {
  transform-box: fill-box;
  transform-origin: 90% 50%;
  animation: turtle-bob 2.4s ease-in-out infinite;
}
@keyframes turtle-paddle {
  0%, 100% {
    transform: rotate(-13deg);
  }
  50% {
    transform: rotate(15deg);
  }
}
@keyframes turtle-bob {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-1px) rotate(-6deg);
  }
}

/* --- Seabed plants (swaying kelp, driven by whale.js) --------------------- */
.seabed {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34vh;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}
.kelp {
  position: absolute;
  bottom: -10px;
  transform-origin: 50% 100%;
  opacity: 0.5;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
  animation-name: kelp-sway;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}
.kelp svg {
  display: block;
  width: auto;
  height: 100%;
  overflow: visible;
}
@keyframes kelp-sway {
  0%, 100% {
    transform: rotate(-5deg);
  }
  50% {
    transform: rotate(5deg);
  }
}

/* --- Top bar -------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(14, 7, 28, 0.55);
  border-bottom: 1px solid rgba(150, 122, 190, 0.14);
  backdrop-filter: blur(12px) saturate(120%);
  -webkit-backdrop-filter: blur(12px) saturate(120%);
}
.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem clamp(1rem, 4vw, 2rem);
}

/* --- Layout --------------------------------------------------------------- */
.deck {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  min-height: calc(100vh - 60px);
  padding: 1.75rem clamp(1rem, 4vw, 2rem) 3rem;
}

/* Hidden pages stay mounted (so the live video keeps playing) but collapse. */
.page {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.page.hidden {
  display: none;
}

/* --- Brand (in top bar) --------------------------------------------------- */
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: inherit;
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.005em;
  color: var(--foam);
  white-space: nowrap;
}

/* --- Top navigation ------------------------------------------------------- */
.topnav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.navlink {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.005em;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: 9px;
  padding: 0.45rem 0.9rem;
  transition: color 0.15s ease, background 0.15s ease;
}
.navlink:hover {
  color: var(--foam);
  background: rgba(150, 122, 190, 0.1);
}
.navlink.active {
  color: var(--foam);
  background: rgba(163, 104, 255, 0.14);
}
.nav-text {
  line-height: 1;
}
/* Tiny live pip next to the Stream link. */
.nav-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.45;
  flex: 0 0 auto;
  transition: opacity 0.15s ease;
}
.nav-live.live {
  background: var(--live);
  opacity: 1;
  animation: pulse 1.6s ease-out infinite;
}

/* --- Page headings -------------------------------------------------------- */
.page-title {
  font-family: var(--font-display);
  margin: 0;
  font-size: clamp(1.4rem, 3.5vw, 2.1rem);
  letter-spacing: 0.04em;
  color: var(--foam);
  text-shadow: 0 2px 0 #0a0613, 0 0 18px rgba(163, 104, 255, 0.4);
}
.page-sub {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* --- Masthead ------------------------------------------------------------- */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.whale {
  display: block;
}
.whale svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.whale-logo {
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 3px 7px rgba(0, 0, 0, 0.45));
  animation: bob 5s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-6px) rotate(1.5deg);
  }
}
.spout {
  animation: spout 4s ease-in-out infinite;
  transform-origin: 27px 14px;
}
@keyframes spout {
  0%, 70%, 100% {
    opacity: 0.15;
    transform: translateY(3px) scale(0.85);
  }
  82% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
/* --- Live buoy ------------------------------------------------------------ */
.buoy {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: rgba(16, 8, 30, 0.65);
  border: 1px solid rgba(150, 122, 190, 0.35);
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
}
.buoy-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--muted);
  box-shadow: 0 0 0 0 rgba(255, 61, 139, 0);
}
.buoy-label {
  color: var(--muted);
}
.buoy.live .buoy-dot {
  background: var(--live);
  animation: pulse 1.6s ease-out infinite;
}
.buoy.live .buoy-label {
  color: var(--foam);
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 61, 139, 0.6);
  }
  100% {
    box-shadow: 0 0 0 12px rgba(255, 61, 139, 0);
  }
}

/* --- Player / porthole ---------------------------------------------------- */
.player-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.porthole {
  position: relative;
  width: min(100%, 920px);
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  padding: 18px;
  background:
    linear-gradient(145deg, var(--brass-light), var(--brass) 40%, var(--brass-dark) 100%);
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.55),
    inset 0 2px 4px rgba(255, 255, 255, 0.5),
    inset 0 -6px 14px rgba(0, 0, 0, 0.35);
}

/* rivets around the brass frame */
.porthole::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 22px;
  pointer-events: none;
  background-image: radial-gradient(circle, rgba(60, 40, 10, 0.85) 0 2px, transparent 3px);
  background-repeat: repeat-x, repeat-x, repeat-y, repeat-y;
  background-position: top left, bottom left, left top, right top;
  background-size: 46px 8px, 46px 8px, 8px 46px, 8px 46px;
  opacity: 0.8;
}

.glass {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  background: radial-gradient(120% 120% at 50% 0%, #2a1450, #0a0613 80%);
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.7), inset 0 0 0 3px rgba(0, 0, 0, 0.4);
}

/* glass glare */
.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.16) 0%, transparent 38%);
  border-radius: 16px;
}

.stream {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #0a0613;
}

.ring {
  position: absolute;
  inset: 10px;
  border-radius: 20px;
  pointer-events: none;
  border: 2px solid rgba(255, 255, 255, 0.18);
}

/* --- Overlay -------------------------------------------------------------- */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  text-align: center;
  padding: 1.5rem;
  background: radial-gradient(120% 120% at 50% 40%, rgba(12, 6, 24, 0.45), rgba(1, 13, 21, 0.82));
  backdrop-filter: blur(2px);
}
.overlay-msg {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 3vw, 1.8rem);
  color: var(--foam);
}
.overlay-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.overlay-msg.err {
  color: var(--coral);
  font-family: var(--font-body);
  font-size: 1rem;
  max-width: 32ch;
}
.overlay.calm .whale-idle {
  width: 140px;
  height: 140px;
  margin-bottom: 0.4rem;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5));
  animation: bob 5s ease-in-out infinite;
}

.dive {
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  color: #2a1042;
  cursor: pointer;
  padding: 0.85rem 2.1rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--brass-light), var(--brass) 60%, var(--brass-dark));
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.6);
  transition: transform 0.12s ease, filter 0.12s ease;
}
.dive:hover {
  transform: translateY(-2px) scale(1.03);
  filter: brightness(1.08);
}
.dive:active {
  transform: translateY(0) scale(0.99);
}
.anchor {
  margin-right: 0.2rem;
}

/* spinner */
.spinner {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 4px solid rgba(163, 104, 255, 0.25);
  border-top-color: var(--teal);
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* --- Controls ------------------------------------------------------------- */
.controls {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: center;
}
.ctrl {
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--foam);
  background: rgba(34, 18, 58, 0.8);
  border: 1px solid rgba(163, 104, 255, 0.4);
  padding: 0.55rem 1.1rem;
  border-radius: 10px;
  transition: background 0.12s ease, transform 0.12s ease;
}
.ctrl:hover {
  background: rgba(52, 28, 88, 0.95);
  transform: translateY(-1px);
}

/* Volume slider — brass thumb on a deep-sea track. */
.vol {
  -webkit-appearance: none;
  appearance: none;
  width: 130px;
  height: 6px;
  margin: 0 0.25rem;
  align-self: center;
  border-radius: 999px;
  background: rgba(12, 6, 24, 0.8);
  border: 1px solid rgba(163, 104, 255, 0.4);
  cursor: pointer;
  outline: none;
}
.vol::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--brass-light), var(--brass) 60%, var(--brass-dark));
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.6);
  border: none;
  transition: transform 0.12s ease;
}
.vol::-webkit-slider-thumb:hover {
  transform: scale(1.12);
}
.vol::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--brass-light), var(--brass) 60%, var(--brass-dark));
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.6);
  border: none;
  cursor: pointer;
}
.vol:focus-visible {
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(163, 104, 255, 0.35);
}

/* --- Footer --------------------------------------------------------------- */
.hull {
  margin-top: auto;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  padding-top: 1rem;
  border-top: 1px solid rgba(150, 122, 190, 0.18);
}
.hull p {
  margin: 0;
}

/* --- Old-school hit counter ----------------------------------------------- */
.hit-counter {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.7rem;
}
.hit-label {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.hit-digits {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: #0a0613;
  border: 1px solid rgba(163, 104, 255, 0.4);
  border-radius: 4px;
}
.hit-digit {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-weight: 700;
  font-size: 0.95rem;
  min-width: 0.82em;
  text-align: center;
  padding: 1px 2px;
  color: #6cff9a;
  background: #04120a;
  border-radius: 2px;
  text-shadow: 0 0 6px rgba(108, 255, 154, 0.65);
}

/* --- Servers page --------------------------------------------------------- */
.server-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.server-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 16px;
  background: rgba(30, 16, 52, 0.7);
  border: 1px solid rgba(150, 122, 190, 0.25);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transition: border-color 0.2s ease, transform 0.12s ease;
}
.server-card:hover {
  transform: translateY(-2px);
}
.server-card.online {
  border-color: rgba(63, 218, 152, 0.5);
}
.server-card.offline {
  border-color: rgba(150, 122, 190, 0.25);
  opacity: 0.85;
}

.server-glyph {
  font-size: 1.8rem;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: radial-gradient(120% 120% at 50% 0%, #2a1450, #0c0518 85%);
  border: 1px solid rgba(163, 104, 255, 0.25);
  flex: 0 0 auto;
}

.server-info {
  flex: 1 1 auto;
  min-width: 0;
}
.server-name {
  font-family: var(--font-display);
  margin: 0;
  font-size: 1.2rem;
  color: var(--foam);
  letter-spacing: 0.03em;
}
.server-meta {
  margin: 0.2rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  align-items: baseline;
}
.server-game {
  color: var(--teal);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.server-addr {
  color: var(--ink);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.9rem;
  background: rgba(12, 6, 24, 0.6);
  padding: 0.1rem 0.5rem;
  border-radius: 6px;
}
a.server-addr {
  text-decoration: none;
  border: 1px solid rgba(163, 104, 255, 0.3);
  transition: color 0.15s ease, border-color 0.15s ease;
}
a.server-addr:hover {
  color: var(--foam);
  border-color: var(--teal);
}

.server-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 auto;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  background: rgba(12, 6, 24, 0.6);
  border: 1px solid rgba(150, 122, 190, 0.25);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted);
  flex: 0 0 auto;
}
.status-label {
  color: var(--muted);
}
.server-card.online .status-dot {
  background: #3fda98;
  box-shadow: 0 0 0 0 rgba(63, 218, 152, 0.6);
  animation: pulse-ok 1.8s ease-out infinite;
}
.server-card.online .status-label {
  color: var(--foam);
}
.server-card.checking .status-dot {
  background: var(--teal);
  animation: blink 1s ease-in-out infinite;
}
.server-card.checking .status-label {
  color: var(--teal);
}
@keyframes pulse-ok {
  0% {
    box-shadow: 0 0 0 0 rgba(63, 218, 152, 0.6);
  }
  100% {
    box-shadow: 0 0 0 10px rgba(63, 218, 152, 0);
  }
}
@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.server-note {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  margin: 0.5rem 0 0;
}
.note-whale {
  width: 34px;
  height: 28px;
  flex: 0 0 auto;
  opacity: 0.7;
}

/* --- Landing hero --------------------------------------------------------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
  padding: 1.5rem 0 0.5rem;
}
.hero-whale {
  width: 120px;
  height: 120px;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.5));
  animation: bob 5s ease-in-out infinite;
}
.hero-title {
  font-family: var(--font-display);
  margin: 0;
  font-size: clamp(2.2rem, 7vw, 3.6rem);
  letter-spacing: 0.03em;
  color: var(--foam);
  text-shadow: 0 2px 0 #0a0613, 0 0 26px rgba(163, 104, 255, 0.45);
}
.hero-tagline {
  margin: 0;
  max-width: 44ch;
  color: var(--ink);
  font-size: clamp(0.98rem, 2.2vw, 1.15rem);
  line-height: 1.5;
}
/* --- Track of the day ----------------------------------------------------- */
.track {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}
.track .page-title,
.track .page-sub {
  text-align: center;
}
.track-frame {
  position: relative;
  width: min(100%, 720px);
  aspect-ratio: 16 / 9;
  margin-top: 0.7rem;
  border-radius: 16px;
  overflow: hidden;
  background: #0a0613;
  border: 1px solid rgba(163, 104, 255, 0.35);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 26px rgba(163, 104, 255, 0.18);
}
.track-embed {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.track-facade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  padding: 0;
  cursor: pointer;
  background-size: cover;
  background-position: center;
  background-color: #0a0613;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.15s ease;
}
.track-facade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 120% at 50% 50%, rgba(10, 6, 19, 0.1), rgba(10, 6, 19, 0.62));
}
.track-facade:hover {
  filter: brightness(1.06);
}
.track-play {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 74px;
  height: 74px;
  padding-left: 5px;
  border-radius: 50%;
  font-size: 1.7rem;
  color: var(--foam);
  background: linear-gradient(180deg, rgba(163, 104, 255, 0.95), rgba(122, 60, 200, 0.95));
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5), inset 0 1px 2px rgba(255, 255, 255, 0.4);
  transition: transform 0.12s ease;
}
.track-facade:hover .track-play {
  transform: scale(1.08);
}
.track-fallback {
  margin-top: 0.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  font-family: var(--font-display);
  color: var(--foam);
  background: rgba(34, 18, 58, 0.85);
  border: 1px solid rgba(163, 104, 255, 0.45);
  padding: 0.7rem 1.5rem;
  border-radius: 999px;
}

/* --- Home split (About + Find Me side by side) ---------------------------- */
.home-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}
@media (max-width: 860px) {
  .home-split {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 520px) {
  .acct-grid {
    grid-template-columns: 1fr;
  }
}

/* --- About me ------------------------------------------------------------- */
.about {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.85rem;
  padding: 1.5rem 1.6rem;
  border-radius: 16px;
  background: rgba(30, 16, 52, 0.6);
  border: 1px solid rgba(150, 122, 190, 0.25);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.about-body {
  margin: 0;
  color: var(--ink);
  font-size: clamp(0.98rem, 2vw, 1.1rem);
  line-height: 1.7;
}

/* --- Accounts deck -------------------------------------------------------- */
.accounts {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.acct-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.acct-card {
  display: flex;
  height: 76px;
  min-width: 0;
  overflow: hidden;
  align-items: center;
  gap: 0.85rem;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(30, 16, 52, 0.7);
  border: 1px solid rgba(150, 122, 190, 0.25);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font: inherit;
  transition: border-color 0.2s ease, transform 0.12s ease, background 0.15s ease;
}
.acct-card:hover {
  transform: translateY(-2px);
  border-color: rgba(163, 104, 255, 0.5);
  background: rgba(40, 22, 68, 0.8);
}
.acct-card.copied {
  border-color: rgba(63, 218, 152, 0.6);
}

.acct-badge {
  flex: 0 0 auto;
  width: 2.6rem;
  height: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: radial-gradient(120% 120% at 50% 0%, #2a1450, #0c0518 85%);
  border: 1px solid rgba(163, 104, 255, 0.25);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.acct-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
  flex: 1 1 auto;
}
.acct-name {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--foam);
  font-size: 1rem;
}
.acct-handle {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.82rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.acct-action {
  flex: 0 0 auto;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  background: rgba(12, 6, 24, 0.55);
  border: 1px solid rgba(163, 104, 255, 0.3);
}
.acct-card.copied .acct-action {
  color: #3fda98;
  border-color: rgba(63, 218, 152, 0.5);
}

/* --- Guestbook ------------------------------------------------------------ */
.guestbook {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 0.5rem;
  padding: 1.5rem 1.6rem;
  border-radius: 16px;
  background: rgba(30, 16, 52, 0.6);
  border: 1px solid rgba(150, 122, 190, 0.25);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.gb-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.gb-input {
  width: 100%;
  font: inherit;
  color: var(--foam);
  background: rgba(12, 6, 24, 0.6);
  border: 1px solid rgba(150, 122, 190, 0.3);
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
}
.gb-input::placeholder {
  color: var(--muted);
}
.gb-input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(163, 104, 255, 0.25);
}
.gb-msg {
  resize: vertical;
  min-height: 66px;
}
.gb-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}
.gb-btn {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  color: #2a1042;
  background: linear-gradient(180deg, var(--brass-light), var(--brass) 60%, var(--brass-dark));
  border: none;
  border-radius: 999px;
  padding: 0.55rem 1.6rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.5);
  transition: transform 0.12s ease, filter 0.12s ease;
}
.gb-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.06);
}
.gb-btn:disabled {
  opacity: 0.6;
  cursor: default;
}
.gb-status {
  font-size: 0.85rem;
  color: var(--muted);
}
.gb-status.ok {
  color: #3fda98;
}
.gb-status.err {
  color: var(--coral);
}
.gb-list {
  list-style: none;
  margin: 0.3rem 0 0;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 320px;
  overflow-y: auto;
  background: rgba(12, 6, 24, 0.5);
  border: 1px dashed rgba(150, 122, 190, 0.35);
  border-radius: 12px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.84rem;
}
.gb-entry {
  color: var(--ink);
  line-height: 1.5;
  padding-bottom: 0.45rem;
  border-bottom: 1px dotted rgba(150, 122, 190, 0.2);
}
.gb-entry:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.gb-empty {
  color: var(--muted);
  font-style: italic;
}
.gb-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 0.2rem;
}
.gb-page-btn {
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--foam);
  background: rgba(12, 6, 24, 0.6);
  border: 1px solid rgba(163, 104, 255, 0.35);
  border-radius: 999px;
  padding: 0.3rem 0.95rem;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.gb-page-btn:hover:not(:disabled) {
  border-color: var(--teal);
  background: rgba(34, 18, 58, 0.85);
}
.gb-page-btn:disabled {
  opacity: 0.4;
  cursor: default;
}
.gb-page-num {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
}

/* --- Floating live beacon ------------------------------------------------- */
.live-fab {
  position: fixed;
  right: clamp(0.75rem, 2vw, 1.5rem);
  top: 50%;
  transform: translateY(-50%);
  z-index: 30;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  padding: 0.7rem 0.65rem;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(180deg, #ff3b54, #d61f3d);
  border: 1px solid rgba(255, 130, 150, 0.6);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5), 0 0 22px rgba(255, 46, 77, 0.45);
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.25s ease;
}
.live-fab:hover {
  transform: translateY(-50%) scale(1.06);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), 0 0 32px rgba(255, 46, 77, 0.7);
}
.live-fab.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(150%);
}
.live-fab-pulse {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  pointer-events: none;
  animation: pulse-red 1.6s ease-out infinite;
}
.live-fab-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: #fff;
  background: rgba(0, 0, 0, 0.28);
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
}
.live-fab-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  animation: blink 1s ease-in-out infinite;
}
.live-fab-glyph {
  font-size: 1.15rem;
  line-height: 1;
}
.live-fab-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}
@keyframes pulse-red {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 46, 77, 0.6);
  }
  100% {
    box-shadow: 0 0 0 14px rgba(255, 46, 77, 0);
  }
}

/* --- Motion-reduction ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .wave1, .wave2, .wave3, .bubble, .whale-logo, .spout, .buoy.live .buoy-dot,
  .overlay.calm .whale-idle, .spinner, .nav-live.live, .server-card.online .status-dot,
  .server-card.checking .status-dot, .hero-whale,
  .live-fab-pulse, .live-fab-dot {
    animation: none !important;
  }
}

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 760px) {
  .deck {
    min-height: 0;
  }
}

/* Phones: let the top bar stack/wrap, and keep the nav reachable. */
@media (max-width: 640px) {
  .topbar-inner {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 0.75rem;
    padding: 0.5rem 0.9rem;
  }
  .brand {
    justify-content: center;
  }
  .topnav {
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    gap: 0.15rem;
  }
}

@media (max-width: 540px) {
  .navlink {
    padding: 0.4rem 0.6rem;
    font-size: 0.88rem;
  }
  .brand-name {
    font-size: 1rem;
  }
  .masthead {
    justify-content: center;
    text-align: center;
  }
  .server-card {
    flex-wrap: wrap;
  }
  .guestbook,
  .about,
  .track {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
  }
  .gb-row {
    justify-content: center;
    text-align: center;
  }
  .live-fab {
    top: auto;
    bottom: 1rem;
    transform: none;
  }
  .live-fab:hover {
    transform: scale(1.06);
  }
  .live-fab.hidden {
    transform: translateX(140%);
  }
}
