/* =========================================================================
   BlockRift — late styles (split out from styles.css)
   This file is loaded as a SECOND <link> tag because styles.css's parser
   was silently dropping rules past line ~580 in production. Splitting it
   gives this content its own parse context and ensures it renders.
   Keep this file together with styles.css; both are required.
   ========================================================================= */

/* Auth: nav slot + login modal ─────────────────────────────────────── */
.auth-slot { display: inline-flex; align-items: center; gap: 12px; margin-left: 16px; }
.auth-user {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.auth-user strong {
  color: var(--text);
  font-weight: 600;
  letter-spacing: -0.005em;
  font-family: var(--display);
}
.owner-tag {
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  padding: 2px 6px;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  border-radius: 3px;
}
.btn.btn-sm { padding: 8px 14px; font-size: 13px; }

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.auth-modal__panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line));
  border-radius: var(--radius-md);
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  animation: pop .2s ease-out;
}
@keyframes pop {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}
.auth-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  position: relative;
}
.auth-tab {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 2px solid var(--line);
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.auth-tab.is-active {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.auth-modal__close {
  position: absolute;
  right: -8px;
  top: -2px;
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  padding: 6px 10px;
  cursor: pointer;
}
.auth-modal__close:hover { color: var(--text); }
.auth-form { gap: 14px; max-width: none; }
.auth-status {
  font-size: 12.5px;
  font-family: var(--mono);
  letter-spacing: 0.04em;
  min-height: 1.2em;
}
.auth-status--err { color: var(--danger); }
.auth-modal__note {
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

/* Play hub + immersive game view ───────────────────────────────────── */
.play-hub {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.play-mode {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: border-color .15s, transform .15s, background .15s;
}
.play-mode:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  background: color-mix(in srgb, var(--accent) 6%, var(--card));
}
.play-mode .num { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; color: var(--accent); }
.play-mode h3 { font-size: 22px; letter-spacing: -0.015em; }
.play-mode p  { font-size: 14px; color: var(--muted); line-height: 1.55; }
.play-mode .arrow {
  position: absolute;
  top: 22px; right: 22px;
  color: var(--muted);
  transition: color .15s, transform .15s;
}
.play-mode:hover .arrow { color: var(--accent); transform: translateX(3px); }

/* Immersive: hides chrome, full-bleed iframe, overlay controls */
body.immersive .topbar,
body.immersive .footer,
body.immersive .bg-blocks,
body.immersive .theme-switcher,
body.immersive .page,
body.immersive [data-play-hub],
body.immersive [data-play-footer] { display: none !important; }
body.immersive { background: #000; overflow: hidden; }
.game-frame {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100dvh;
  border: 0;
  background: #000;
  z-index: 90;
}
.game-overlay {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: var(--z-modal);
  display: flex;
  gap: 8px;
}
.game-overlay button {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 16, 30, 0.78);
  color: var(--text);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: var(--radius);
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background .15s, border-color .15s;
}
.game-overlay button:hover {
  background: rgba(40, 30, 60, 0.95);
  border-color: var(--accent);
}
.game-overlay svg { width: 18px; height: 18px; }
.game-overlay button[disabled] { opacity: 0.45; cursor: not-allowed; }

/* Compact play-shell homepage ──────────────────────────────────────── */
.shell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 26px;
  padding: 64px 0 40px;
  max-width: 880px;
}
.shell .logo-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.shell .name {
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -0.045em;
  font-size: clamp(64px, 11vw, 156px);
  line-height: 0.92;
  color: var(--text);
  margin: 0;
}
.shell .name em {
  font-style: normal;
  color: var(--accent);
}
.shell .tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.shell .tag::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px var(--ok);
}
.name-input {
  display: flex;
  gap: 0;
  width: 100%;
  max-width: 560px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
  transition: border-color .15s;
}
.name-input:focus-within { border-color: var(--accent); }
.name-input input {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 16px 18px;
  font-family: var(--display);
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  outline: none;
  min-width: 0;
}
.name-input input::placeholder { color: var(--muted); font-weight: 500; }
.name-input button {
  padding: 0 28px;
  background: var(--accent);
  color: var(--bg-0);
  font-family: var(--display);
  font-weight: 700;
  font-size: 16px;
  border: 0;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.name-input button:hover { background: color-mix(in srgb, var(--accent) 85%, white); }

.mode-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 720px;
}
@media (max-width: 640px) { .mode-row { grid-template-columns: 1fr; } }
.mode-row a {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  transition: border-color .15s, color .15s, background .15s;
}
.mode-row a strong {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--text);
  display: block;
  margin-bottom: 2px;
}
.mode-row a:hover {
  border-color: var(--accent);
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 8%, var(--card));
}

.shell-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.shell-meta a { color: var(--muted); transition: color .15s; }
.shell-meta a:hover { color: var(--text); }
.shell-meta .sep { opacity: 0.4; }

/* Waitlist form (premium.html) ────────────────────────────────────── */
.waitlist-form {
  display: flex;
  gap: 0;
  width: 100%;
  max-width: 520px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg-0) 60%, transparent);
  overflow: hidden;
  transition: border-color .15s;
}
.waitlist-form:focus-within { border-color: var(--accent); }
.waitlist-form input {
  flex: 1;
  background: transparent;
  border: 0;
  padding: 14px 16px;
  font-family: var(--display);
  font-size: 15px;
  color: var(--text);
  outline: none;
  min-width: 0;
}
.waitlist-form input::placeholder { color: var(--muted); }
.waitlist-form button {
  border-radius: 0;
  padding: 0 22px;
  white-space: nowrap;
}

/* Reduced motion ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
