/* ==========================================================================
   YTF Game Center — Enchanted Cosmic Portal Theme
   Every Touch Magical Edition for games.youthtalkforum.com
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("./inter.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-deep: #070510;
  --bg-mid: #100b22;
  --bg-card: rgba(20, 15, 42, 0.72);
  --bg-card-hover: rgba(30, 22, 62, 0.88);
  --border-subtle: rgba(196, 168, 255, 0.18);
  --border-glow: rgba(246, 209, 118, 0.55);
  --text-main: #f6f3ff;
  --text-muted: #b8afd6;
  --text-soft: #8c82b0;
  --gold: #f6d176;
  --gold-bright: #ffe8a3;
  --violet: #a855f7;
  --cyan: #38bdf8;
  --rose: #f472b6;
  --emerald: #34d399;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --shadow-magic: 0 24px 60px rgba(4, 2, 14, 0.72), 0 0 40px rgba(168, 85, 247, 0.16);
  --ease-magic: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg-deep);
  color: var(--text-main);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 14%, rgba(168, 85, 247, 0.22), transparent 42%),
    radial-gradient(circle at 84% 18%, rgba(56, 189, 248, 0.16), transparent 40%),
    radial-gradient(circle at 50% 88%, rgba(246, 209, 118, 0.11), transparent 46%),
    linear-gradient(180deg, #070510 0%, #0d0820 48%, #070510 100%);
  color: var(--text-main);
  overflow-x: hidden;
  position: relative;
}

body.is-loading {
  overflow: hidden;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 9999;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  background: var(--gold);
  color: #161026;
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { left: 12px; }

/* Background Magical Canvas & Aurora Veil */
#magic-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

#aurora-veil {
  position: fixed;
  inset: -20%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.32;
  background:
    conic-gradient(from 120deg at 50% 50%,
      rgba(168, 85, 247, 0.22),
      rgba(56, 189, 248, 0.18),
      rgba(244, 114, 182, 0.18),
      rgba(246, 209, 118, 0.16),
      rgba(168, 85, 247, 0.22));
  filter: blur(90px);
  animation: auroraDrift 22s ease-in-out infinite alternate;
  transition: opacity 0.8s var(--ease-magic), filter 0.8s var(--ease-magic);
}

#aurora-veil.is-boosted {
  opacity: 0.72;
  filter: blur(65px) saturate(1.5);
}

@keyframes auroraDrift {
  0% { transform: translate3d(-4%, -3%, 0) rotate(0deg) scale(1); }
  50% { transform: translate3d(4%, 2%, 0) rotate(12deg) scale(1.08); }
  100% { transform: translate3d(-2%, 4%, 0) rotate(-10deg) scale(1.03); }
}

/* ==========================================================================
   Enchanted Portal Loading Screen
   ========================================================================== */
.portal-loader {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(46, 24, 96, 0.94) 0%, rgba(10, 6, 24, 0.98) 62%, #05030c 100%);
  transition: opacity 0.75s var(--ease-magic), visibility 0.75s var(--ease-magic), transform 0.85s var(--ease-magic);
}

.portal-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: scale(1.08);
  pointer-events: none;
}

.portal-loader-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px;
  max-width: 440px;
  width: 92%;
}

.astrolabe {
  position: relative;
  width: 176px;
  height: 176px;
  display: grid;
  place-items: center;
  margin-bottom: 26px;
}

.astro-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(246, 209, 118, 0.32);
  box-shadow: 0 0 28px rgba(168, 85, 247, 0.25), inset 0 0 24px rgba(246, 209, 118, 0.12);
}

.astro-ring--outer {
  border-style: dashed;
  border-color: rgba(246, 209, 118, 0.52);
  animation: spinCW 14s linear infinite;
}

.astro-ring--mid {
  inset: 16px;
  border-color: rgba(168, 85, 247, 0.65);
  border-top-color: var(--cyan);
  border-bottom-color: var(--gold);
  animation: spinCCW 7.5s linear infinite;
}

.astro-ring--inner {
  inset: 34px;
  border-style: dotted;
  border-color: rgba(56, 189, 248, 0.72);
  animation: spinCW 4.8s linear infinite;
}

.astro-core {
  position: relative;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(246, 209, 118, 0.28), rgba(168, 85, 247, 0.24) 60%, rgba(12, 8, 28, 0.95));
  border: 1.5px solid rgba(246, 209, 118, 0.75);
  box-shadow: 0 0 36px rgba(246, 209, 118, 0.4), 0 0 70px rgba(168, 85, 247, 0.35);
  animation: corePulse 2.2s ease-in-out infinite;
}

.astro-core img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(246, 209, 118, 0.65));
}

@keyframes spinCW { to { transform: rotate(360deg); } }
@keyframes spinCCW { to { transform: rotate(-360deg); } }
@keyframes corePulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 28px rgba(246, 209, 118, 0.35), 0 0 60px rgba(168, 85, 247, 0.3); }
  50% { transform: scale(1.07); box-shadow: 0 0 44px rgba(246, 209, 118, 0.65), 0 0 90px rgba(56, 189, 248, 0.45); }
}

.loader-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 8px;
}

.loader-title {
  margin: 0 0 10px;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, #ffffff 10%, var(--gold-bright) 52%, #c4b5fd 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.loader-status {
  margin: 0 0 18px;
  font-size: 0.92rem;
  color: var(--text-muted);
  min-height: 1.4em;
}

.mana-bar {
  width: 100%;
  height: 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(246, 209, 118, 0.28);
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.45);
}

.mana-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--violet), var(--cyan), var(--gold));
  box-shadow: 0 0 18px rgba(246, 209, 118, 0.7);
  transition: width 0.14s linear;
}

.loader-meta {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--text-soft);
}

.loader-skip {
  background: transparent;
  border: none;
  color: var(--gold);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}
.loader-skip:hover {
  background: rgba(246, 209, 118, 0.12);
  color: #fff;
}

/* ==========================================================================
   Layout Shell & Header
   ========================================================================== */
.shell {
  position: relative;
  z-index: 2;
  width: min(1160px, calc(100% - 32px));
  margin-inline: auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(9, 6, 22, 0.72);
  border-bottom: 1px solid var(--border-subtle);
}

.topbar-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 10px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-main);
  font-weight: 800;
  letter-spacing: -0.02em;
  transition: transform 0.25s var(--ease-magic);
}
.brand:hover { transform: translateY(-1px); }

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, rgba(168, 85, 247, 0.35), rgba(246, 209, 118, 0.22));
  border: 1px solid rgba(246, 209, 118, 0.45);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}
.brand-mark img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.brand-letters {
  font-size: 1.05rem;
  color: var(--gold-bright);
  letter-spacing: 0.06em;
}

.brand-rule {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.22);
}

.brand-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.22s var(--ease-magic), border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.pill-btn:hover {
  transform: translateY(-2px);
  border-color: var(--border-glow);
  background: rgba(168, 85, 247, 0.18);
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.25);
}

.pill-btn--gold {
  border-color: rgba(246, 209, 118, 0.5);
  background: linear-gradient(135deg, rgba(246, 209, 118, 0.22), rgba(168, 85, 247, 0.24));
  color: var(--gold-bright);
}

.mana-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-pill);
  background: rgba(246, 209, 118, 0.1);
  border: 1px solid rgba(246, 209, 118, 0.34);
  color: var(--gold-bright);
  font-size: 0.82rem;
  font-weight: 700;
}

.icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

/* ==========================================================================
   Hero Portal Banner
   ========================================================================== */
.hero {
  padding: 46px 0 28px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  border: 1px solid rgba(246, 209, 118, 0.26);
  background:
    linear-gradient(135deg, rgba(22, 15, 48, 0.86) 0%, rgba(12, 9, 28, 0.92) 55%, rgba(28, 16, 56, 0.86) 100%);
  box-shadow: var(--shadow-magic);
  padding: clamp(26px, 4.5vw, 52px);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.85fr);
  gap: 32px;
  align-items: center;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 22%, rgba(246, 209, 118, 0.18), transparent 46%),
    radial-gradient(circle at 18% 82%, rgba(56, 189, 248, 0.16), transparent 44%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(246, 209, 118, 0.12);
  border: 1px solid rgba(246, 209, 118, 0.36);
  color: var(--gold-bright);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 12px var(--emerald);
  animation: pulseDot 1.8s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.45); opacity: 0.55; }
}

.hero-title {
  margin: 0 0 14px;
  font-size: clamp(2rem, 4.2vw, 3.35rem);
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.text-gradient {
  background: linear-gradient(115deg, #ffffff 8%, var(--gold-bright) 48%, #c084fc 84%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  margin: 0 0 24px;
  max-width: 56ch;
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 232, 163, 0.7);
  background: linear-gradient(135deg, #f6d176 0%, #f59e0b 48%, #a855f7 100%);
  color: #130b24;
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(246, 209, 118, 0.28);
  transition: transform 0.25s var(--ease-magic), box-shadow 0.25s ease, filter 0.25s ease;
}

.cta-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 16px 38px rgba(246, 209, 118, 0.42), 0 0 28px rgba(168, 85, 247, 0.45);
  filter: brightness(1.06);
}

.cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease-magic), border-color 0.25s ease, background 0.25s ease;
}
.cta-secondary:hover {
  transform: translateY(-2px);
  border-color: var(--border-glow);
  background: rgba(168, 85, 247, 0.18);
}

.hero-visual {
  position: relative;
  z-index: 2;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(246, 209, 118, 0.34);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.55), 0 0 36px rgba(168, 85, 247, 0.26);
  aspect-ratio: 4 / 3;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.03);
  transition: transform 0.7s var(--ease-magic);
}

.hero-visual:hover img {
  transform: scale(1.09);
}

.hero-visual-caption {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(10, 7, 24, 0.78);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(246, 209, 118, 0.28);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
}

.domain-chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--gold-bright);
  font-weight: 700;
}

/* ==========================================================================
   Realtime Search & Library Toolbar
   ========================================================================== */
.library-section {
  padding: 18px 0 84px;
}

.library-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 20px;
}

.section-title {
  margin: 0 0 6px;
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.search-panel {
  padding: 18px;
  border-radius: 22px;
  background: rgba(18, 13, 38, 0.78);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
  margin-bottom: 26px;
}

.search-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.search-box {
  position: relative;
  flex: 1 1 320px;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 16px;
  color: var(--gold);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 14px 96px 14px 46px;
  border-radius: var(--radius-pill);
  border: 1.5px solid rgba(196, 168, 255, 0.24);
  background: rgba(8, 5, 20, 0.85);
  color: var(--text-main);
  font: inherit;
  font-size: 0.98rem;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.search-input::placeholder {
  color: var(--text-soft);
}

.search-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(246, 209, 118, 0.16), 0 0 28px rgba(168, 85, 247, 0.32);
}

.search-shortcut {
  position: absolute;
  right: 14px;
  padding: 4px 9px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 700;
  pointer-events: none;
}

.search-clear {
  position: absolute;
  right: 12px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(246, 209, 118, 0.38);
  background: rgba(246, 209, 118, 0.14);
  color: var(--gold-bright);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.search-clear[hidden] { display: none; }

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.22s var(--ease-magic);
}

.filter-chip:hover {
  border-color: rgba(246, 209, 118, 0.45);
  color: #fff;
}

.filter-chip.is-active {
  background: linear-gradient(135deg, rgba(246, 209, 118, 0.24), rgba(168, 85, 247, 0.32));
  border-color: var(--gold);
  color: var(--gold-bright);
  box-shadow: 0 0 18px rgba(246, 209, 118, 0.22);
}

.result-count {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ==========================================================================
   Game Cards Grid (3D Tilt + Holographic Shimmer)
   ========================================================================== */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.game-card {
  position: relative;
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform-style: preserve-3d;
  transition: transform 0.22s ease-out, border-color 0.28s ease, box-shadow 0.28s ease, background 0.28s ease;
  box-shadow: 0 16px 38px rgba(4, 2, 14, 0.55);
}

.game-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 50%), rgba(246, 209, 118, 0.18), transparent 60%);
  opacity: 0;
  transition: opacity 0.28s ease;
  pointer-events: none;
}

.game-card:hover {
  border-color: rgba(246, 209, 118, 0.62);
  background: var(--bg-card-hover);
  box-shadow: 0 24px 54px rgba(4, 2, 14, 0.72), 0 0 34px rgba(168, 85, 247, 0.28);
}

.game-card:hover::after {
  opacity: 1;
}

.game-card[hidden] {
  display: none;
}

.game-card--slot {
  border-style: dashed;
  border-color: rgba(196, 168, 255, 0.26);
  background: rgba(16, 11, 34, 0.48);
}

.game-thumb {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: radial-gradient(circle at 30% 25%, rgba(168, 85, 247, 0.35), rgba(14, 10, 32, 0.95));
}

.game-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease-magic);
}

.game-card:hover .game-thumb img {
  transform: scale(1.07);
}

.slot-art {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 20px;
  background:
    radial-gradient(circle at 50% 45%, rgba(56, 189, 248, 0.16), transparent 62%),
    linear-gradient(145deg, rgba(22, 14, 48, 0.92), rgba(10, 7, 24, 0.96));
}

.slot-sigil {
  font-size: 2.6rem;
  filter: drop-shadow(0 0 18px rgba(246, 209, 118, 0.55));
}

.game-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.game-category {
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: rgba(9, 6, 22, 0.78);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #e9e4ff;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.status--deploying {
  background: rgba(246, 209, 118, 0.2);
  border: 1px solid rgba(246, 209, 118, 0.58);
  color: var(--gold-bright);
  backdrop-filter: blur(8px);
}

.status--template {
  background: rgba(168, 85, 247, 0.22);
  border: 1px solid rgba(196, 168, 255, 0.45);
  color: #e9d5ff;
  backdrop-filter: blur(8px);
}

.game-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.game-title {
  margin: 0 0 8px;
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.game-description {
  margin: 0 0 18px;
  font-size: 0.92rem;
  line-height: 1.58;
  color: var(--text-muted);
  flex: 1;
}

.game-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.route-tag {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.78rem;
  color: var(--cyan);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.28);
  padding: 5px 10px;
  border-radius: 8px;
}

.play-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, rgba(246, 209, 118, 0.22), rgba(168, 85, 247, 0.34));
  border: 1px solid rgba(246, 209, 118, 0.54);
  color: var(--gold-bright);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.play-link:hover {
  transform: translateX(2px);
  background: linear-gradient(135deg, var(--gold), var(--violet));
  color: #130b24;
  box-shadow: 0 0 22px rgba(246, 209, 118, 0.45);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 52px 24px;
  border-radius: var(--radius-xl);
  border: 1px dashed rgba(246, 209, 118, 0.36);
  background: rgba(18, 13, 38, 0.65);
  margin-top: 18px;
}
.empty-state[hidden] { display: none; }

.empty-state h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}
.empty-state p {
  margin: 0 0 18px;
  color: var(--text-muted);
}

/* ==========================================================================
   Tarot Under Deployment Page (/tarrot/)
   ========================================================================== */
.deploy-main {
  padding: 46px 0 92px;
}

.deploy-card {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(246, 209, 118, 0.36);
  background: linear-gradient(145deg, rgba(22, 15, 48, 0.88), rgba(10, 7, 24, 0.94));
  box-shadow: var(--shadow-magic);
  padding: clamp(28px, 4.5vw, 54px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 34px;
  align-items: center;
}

.deploy-artwork {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(246, 209, 118, 0.45);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 42px rgba(168, 85, 247, 0.3);
}

.deploy-artwork img {
  width: 100%;
  height: auto;
  display: block;
}

.deploy-seal {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, rgba(16, 10, 36, 0.25), rgba(7, 5, 16, 0.68));
}

.seal-ring {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 2px dashed rgba(246, 209, 118, 0.78);
  display: grid;
  place-items: center;
  background: rgba(12, 8, 28, 0.72);
  backdrop-filter: blur(8px);
  box-shadow: 0 0 36px rgba(246, 209, 118, 0.36);
  animation: spinCW 18s linear infinite;
}

.seal-inner {
  animation: spinCCW 18s linear infinite;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-bright);
  padding: 8px;
}

.deploy-progress-box {
  margin: 22px 0 26px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(8, 5, 20, 0.72);
  border: 1px solid rgba(196, 168, 255, 0.22);
}

.deploy-progress-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--gold-bright);
}

.deploy-bar {
  height: 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.deploy-bar-fill {
  height: 100%;
  width: 72%;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--violet), var(--cyan), var(--gold));
  background-size: 200% 100%;
  animation: shimmerBar 3s linear infinite;
}

@keyframes shimmerBar {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* ==========================================================================
   Floating Magic Surprises: Invoke Wonder Button, Wisps, Toasts, Rune Ripples
   ========================================================================== */
.wonder-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 18px;
  border-radius: var(--radius-pill);
  border: 1.5px solid rgba(246, 209, 118, 0.65);
  background: linear-gradient(135deg, rgba(28, 16, 62, 0.92), rgba(88, 28, 135, 0.88));
  color: var(--gold-bright);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), 0 0 26px rgba(168, 85, 247, 0.42);
  backdrop-filter: blur(12px);
  transition: transform 0.25s var(--ease-magic), box-shadow 0.25s ease;
}

.wonder-fab:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.65), 0 0 36px rgba(246, 209, 118, 0.52);
}

.magic-toast-stack {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: min(420px, calc(100% - 32px));
}

.magic-toast {
  padding: 12px 18px;
  border-radius: 16px;
  background: rgba(15, 10, 36, 0.92);
  border: 1px solid rgba(246, 209, 118, 0.52);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: center;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55), 0 0 24px rgba(168, 85, 247, 0.35);
  backdrop-filter: blur(12px);
  animation: toastIn 0.35s var(--ease-magic);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(14px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.mystery-wisp {
  position: fixed;
  z-index: 150;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 232, 163, 0.9);
  background: radial-gradient(circle, #fff 0%, var(--gold) 36%, rgba(168, 85, 247, 0.5) 72%, transparent 100%);
  box-shadow: 0 0 24px var(--gold), 0 0 44px var(--violet);
  cursor: pointer;
  animation: wispFloat 3.2s ease-in-out infinite;
  transition: transform 0.2s ease;
}
.mystery-wisp:hover { transform: scale(1.28); }

@keyframes wispFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-14px); }
}

.rune-ripple {
  position: fixed;
  pointer-events: none;
  z-index: 4000;
  width: 24px;
  height: 24px;
  margin-left: -12px;
  margin-top: -12px;
  border-radius: 50%;
  border: 1.5px solid rgba(246, 209, 118, 0.85);
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.65);
  animation: runeExpand 0.72s var(--ease-magic) forwards;
}

@keyframes runeExpand {
  0% { transform: scale(0.4) rotate(0deg); opacity: 0.95; }
  100% { transform: scale(4.2) rotate(90deg); opacity: 0; }
}

.site-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border-subtle);
  padding: 26px 0 42px;
  color: var(--text-soft);
  font-size: 0.86rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

@media (max-width: 860px) {
  .hero-card,
  .deploy-card {
    grid-template-columns: 1fr;
  }
  .wonder-fab {
    right: 14px;
    bottom: 14px;
    padding: 10px 14px;
    font-size: 0.8rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* ==========================================================================
   Shared Game Arena & Playable Status Enhancements (v2)
   ========================================================================== */
.status--live {
  background: rgba(52, 211, 153, 0.22);
  border: 1px solid rgba(52, 211, 153, 0.65);
  color: #a7f3d0;
  backdrop-filter: blur(8px);
}

.game-page-main {
  padding: 28px 0 88px;
}

.game-panel {
  position: relative;
  border-radius: 26px;
  background: rgba(16, 11, 36, 0.84);
  border: 1px solid rgba(246, 209, 118, 0.26);
  box-shadow: var(--shadow-magic);
  padding: clamp(18px, 3vw, 32px);
  backdrop-filter: blur(14px);
}

.game-header-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.game-header-title {
  margin: 0;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  font-weight: 900;
  letter-spacing: -0.02em;
}

.game-header-sub {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.hud-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.hud-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(196, 168, 255, 0.24);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.hud-chip strong {
  color: var(--gold-bright);
}

.session-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-soft);
}
