:root {
  --bg: #05080f;
  --panel: rgba(10, 16, 28, 0.88);
  --border: rgba(94, 234, 212, 0.16);
  --border-hot: rgba(45, 212, 191, 0.45);
  --text: #e8eef9;
  --muted: #93a4c3;
  --dim: #5d6f8f;
  --teal: #2dd4bf;
  --cyan: #38bdf8;
  --coral: #fb7185;
  --gold: #fbbf24;
  --violet: #a78bfa;
  --grad: linear-gradient(135deg, #2dd4bf, #38bdf8 50%, #a78bfa);
  --font: "Outfit", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 16px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.skip-link {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  z-index: 100;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: var(--teal);
  color: #041018;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 0.15s ease;
}

.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
  color: inherit;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(45, 212, 191, 0.12), transparent),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(167, 139, 250, 0.08), transparent),
    linear-gradient(rgba(45, 212, 191, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45, 212, 191, 0.03) 1px, transparent 1px);
  background-size: auto, auto, 40px 40px, 40px 40px;
}

.topbar,
main,
.footer {
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.55rem clamp(0.75rem, 2.5vw, 1.5rem);
  border-bottom: 1px solid var(--border);
  background: rgba(5, 8, 15, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 0;
  transition: transform 0.22s ease, opacity 0.22s ease, box-shadow 0.22s ease;
  will-change: transform;
}

/* Phone: hide sticky section header while scrolling down to free space */
.topbar.is-scroll-hidden {
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
  box-shadow: none;
}

.topbar:focus-within {
  transform: none;
  opacity: 1;
  pointer-events: auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  flex-shrink: 0;
  min-width: 0;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.72rem;
  background: var(--grad);
  color: #041018;
}

.brand strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.15;
}

.brand small {
  color: var(--dim);
  font-size: 0.68rem;
  line-height: 1.2;
}

.top-nav {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  font-size: 0.82rem;
  color: var(--muted);
  min-width: 0;
}

.top-nav a {
  text-decoration: none;
  transition: color 0.15s;
  white-space: nowrap;
}

.top-nav a:hover {
  color: var(--teal);
}

.top-nav .nav-music {
  color: var(--cyan);
  font-weight: 550;
}

.top-nav .mute-btn {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  font-size: 0.95rem;
  padding: 0;
}

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.5rem clamp(1rem, 3vw, 2rem) 3rem;
}

.glass {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--teal);
  margin: 0 0 0.35rem;
}

.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Who I am */
.intro {
  padding: 1.35rem 1.4rem 1.25rem;
  margin: 1.25rem 0 1.25rem;
}

.intro-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.intro-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid rgba(45, 212, 191, 0.45);
  box-shadow: 0 0 24px rgba(45, 212, 191, 0.2);
  object-fit: cover;
}

.intro h1 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.intro-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.intro-list a {
  color: var(--cyan);
  text-decoration: none;
}

.intro-list a:hover {
  text-decoration: underline;
}

.intro-thanks {
  margin: 0.95rem 0 0;
  color: var(--dim);
  font-size: 0.9rem;
}

/* Side-by-side lobby top: intro | player lore */
.lobby-top {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(14rem, 0.72fr);
  gap: 0.85rem;
  margin: 0 0 1.25rem;
  align-items: stretch;
}

@media (max-width: 820px) {
  .lobby-top {
    grid-template-columns: 1fr;
  }
}

/* Fun facts deck — classic pink theme, compact for side column */
.fun-facts {
  padding: 1.25rem 1.35rem 1.2rem;
  margin: 0 0 1.25rem;
}

.fun-facts-side {
  margin: 0;
  padding: 0.85rem 0.95rem 0.8rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.fun-facts-side .fun-facts-head {
  margin-bottom: 0.55rem;
}

.fun-facts-side .section-title {
  font-size: 1rem;
}

.fun-facts-side .fun-facts-counter {
  font-size: 0.72rem;
}

.fun-facts-side .fun-fact-card {
  padding: 0.7rem 0.8rem;
  border-radius: 11px;
  flex: 1 1 auto;
}

.fun-facts-side .fun-fact-label {
  font-size: 0.65rem;
  margin-bottom: 0.3rem;
}

.fun-facts-side .fun-fact-text {
  font-size: 0.88rem;
  line-height: 1.4;
  min-height: 2.6em;
  font-weight: 600;
}

.fun-facts-side .fun-fact-actions {
  margin-top: 0.55rem;
  gap: 0.35rem;
}

.fun-facts-side .fun-fact-actions .btn.small {
  padding: 0.28rem 0.55rem;
  font-size: 0.75rem;
}

.fun-facts-side .fun-facts-hint {
  margin: 0.45rem 0 0;
  font-size: 0.65rem;
}

.fun-facts-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.fun-facts-head .section-title {
  margin: 0.15rem 0 0;
}

.fun-facts-head .eyebrow {
  margin: 0;
}

.fun-facts-counter {
  color: var(--teal);
  font-size: 0.82rem;
  margin: 0;
}

.fun-fact-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 1.15rem 1.2rem;
  border-radius: 14px;
  border: 1px dashed rgba(251, 113, 133, 0.4);
  background: rgba(251, 113, 133, 0.08);
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.fun-fact-card:hover,
.fun-fact-card:focus-visible {
  transform: translateY(-2px) scale(1.01);
  background: rgba(251, 113, 133, 0.14);
  border-color: rgba(251, 113, 133, 0.65);
  outline: none;
}

.fun-fact-card.flip {
  animation: fun-fact-flip 0.35s ease;
}

.fun-fact-label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 0.45rem;
}

.fun-fact-text {
  display: block;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  font-weight: 600;
  line-height: 1.45;
  color: #fecdd3;
  min-height: 3.2em;
}

.fun-fact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.fun-facts-hint {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  color: var(--dim);
}

body.salmon-mode .fun-fact-card {
  border-color: rgba(251, 146, 60, 0.55);
  background: rgba(251, 146, 60, 0.12);
}

body.salmon-mode .fun-fact-text {
  color: #ffedd5;
}

@keyframes fun-fact-flip {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  40% {
    transform: scale(0.97) rotateX(8deg);
    opacity: 0.35;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.mute-btn,
.fullscreen-btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  width: 40px;
  height: 36px;
  cursor: pointer;
  line-height: 1;
  font-size: 1rem;
  padding: 0;
}

.mute-btn:hover,
.fullscreen-btn:hover {
  border-color: var(--border-hot);
}

.fullscreen-btn {
  flex: 0 0 auto;
  font-size: 1.25rem;
}

.fullscreen-btn[aria-pressed="true"] {
  border-color: var(--teal);
  background: rgba(45, 212, 191, 0.14);
  color: var(--teal);
}

