/*
Theme Name: prism-arcade
Text Domain: prism-arcade
Description: Custom cosmic-neon arcade theme for the Block Blast guide + free online block puzzle, showcasing Prism Blast by Study10x.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
WPVibe: yes
*/

/* ============================================================
   Prism Arcade — cosmic-neon design system (plain CSS).
   Dark-only. Chakra Petch (display) + Inter (body).
   ============================================================ */

:root {
  --bg-0: #0b0b1a;
  --bg-1: #100d2e;
  --bg-2: #0d1a2e;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-2: rgba(255, 255, 255, 0.07);
  --surface-3: rgba(255, 255, 255, 0.1);
  --border: rgba(168, 158, 255, 0.22);
  --border-2: rgba(168, 158, 255, 0.4);
  --violet: #7c4dff;
  --violet-lite: #a98bff;
  --cyan: #00d4ff;
  --pink: #ff48c8;
  --gold: #ffd54f;
  --mint: #7cffd4;
  --orange: #ff8c42;
  --text: #ece9ff;
  --muted: #a89eff;
  --muted-2: #c8b8ff;
  --ink-dim: rgba(200, 184, 255, 0.6);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-glow: 0 0 0 1px rgba(124, 77, 255, 0.25), 0 18px 50px -12px rgba(124, 77, 255, 0.45);
  --maxw: 1120px;
  --font-display: "Chakra Petch", "Trebuchet MS", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

.flex-1 { flex: 1 0 auto; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }
#content { display: flex; flex-direction: column; flex: 1 0 auto; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background-color: var(--bg-0);
  background-image:
    radial-gradient(60rem 60rem at 12% -10%, rgba(124, 77, 255, 0.28), transparent 60%),
    radial-gradient(50rem 50rem at 100% 0%, rgba(0, 212, 255, 0.18), transparent 55%),
    radial-gradient(60rem 60rem at 50% 120%, rgba(255, 72, 200, 0.14), transparent 60%),
    linear-gradient(165deg, var(--bg-0) 0%, var(--bg-1) 45%, var(--bg-2) 100%);
  background-attachment: fixed;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--pink); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: #fff;
}
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.45rem); }

p { margin: 0 0 1rem; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }
.narrow { max-width: 760px; }

.grad-text {
  background: linear-gradient(100deg, var(--cyan), var(--violet-lite) 45%, var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.9rem;
}

.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-tight { padding: clamp(2.5rem, 5vw, 3.5rem) 0; }
.section h2 + .lead { margin-top: -0.2rem; }
.lead { font-size: 1.12rem; color: var(--muted-2); max-width: 60ch; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  color: #fff;
}
.btn-primary {
  background: linear-gradient(120deg, var(--violet), #6a3dff 40%, var(--cyan));
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { transform: translateY(-2px); color: #fff; box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.4), 0 22px 55px -12px rgba(0, 212, 255, 0.5); }
.btn-ghost {
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  color: var(--text);
}
.btn-ghost:hover { background: var(--surface-3); color: #fff; transform: translateY(-2px); }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.center .btn-row { justify-content: center; }

/* ---- Site header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(11, 11, 26, 0.72);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: #fff; }
.brand:hover { color: #fff; }
.brand svg { width: 30px; height: 30px; flex: none; filter: drop-shadow(0 0 8px rgba(124, 77, 255, 0.6)); }
.brand b { background: linear-gradient(100deg, var(--cyan), var(--pink)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav ul { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.nav a {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted-2);
  padding: 0.3rem 0;
  position: relative;
}
.nav a:hover, .nav .current-menu-item > a { color: #fff; }
.nav .current-menu-item > a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--pink));
  border-radius: 2px;
}
.nav-cta { display: inline-flex; }

.nav-toggle {
  display: none;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 10px;
  width: 42px; height: 42px;
  color: #fff;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(13, 12, 33, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0 1.2rem;
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav li { border-top: 1px solid var(--border); }
  .nav ul a { display: block; padding: 0.9rem clamp(1rem, 4vw, 2rem); }
  .nav-cta { margin: 1rem clamp(1rem, 4vw, 2rem) 0; justify-content: center; }
}

/* ---- Hero ---- */
.hero { position: relative; padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3rem, 7vw, 5rem); overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero h1 { margin-bottom: 0.6rem; }
.hero .lead { font-size: 1.2rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.4rem 0 1.8rem; }
.chip {
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted-2);
}

/* Floating block decoration */
.floaties { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.floaties i {
  position: absolute;
  border-radius: 26%;
  opacity: 0.5;
  animation: drift 14s ease-in-out infinite;
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.25);
}
.floaties i:nth-child(1) { width: 46px; height: 46px; left: 6%; top: 22%; background: var(--cyan); animation-delay: -1s; }
.floaties i:nth-child(2) { width: 30px; height: 30px; left: 20%; top: 68%; background: var(--pink); animation-delay: -4s; }
.floaties i:nth-child(3) { width: 60px; height: 60px; right: 8%; top: 14%; background: var(--violet); animation-delay: -2s; }
.floaties i:nth-child(4) { width: 24px; height: 24px; right: 22%; top: 74%; background: var(--gold); animation-delay: -6s; }
.floaties i:nth-child(5) { width: 38px; height: 38px; left: 48%; top: 8%; background: var(--mint); animation-delay: -3s; }
@keyframes drift {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-26px) rotate(12deg); }
}

.hero-visual { position: relative; z-index: 1; }

/* CSS "phone" mockup */
.phone {
  width: min(300px, 78vw);
  margin: 0 auto;
  border-radius: 34px;
  padding: 12px;
  background: linear-gradient(160deg, #1b1740, #0d0b22);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow-glow);
}
.phone-screen {
  border-radius: 24px;
  background: linear-gradient(165deg, #0b0b1a, #140f30 60%, #0d1a2e);
  padding: 18px 16px 20px;
  overflow: hidden;
}
.phone-title { font-family: var(--font-display); font-weight: 700; text-align: center; font-size: 1.15rem; margin-bottom: 12px; }
.mini-board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  padding: 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}
.mini-board span {
  aspect-ratio: 1;
  border-radius: 24%;
  background: rgba(255, 255, 255, 0.05);
}
.mini-board span.f { box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.35); }
.mini-board span.c1 { background: var(--cyan); }
.mini-board span.c2 { background: var(--violet); }
.mini-board span.c3 { background: var(--pink); }
.mini-board span.c4 { background: var(--gold); }
.mini-board span.c5 { background: var(--mint); }
.mini-board span.c6 { background: var(--orange); }
.phone-tray { display: flex; justify-content: space-around; margin-top: 14px; }
.phone-tray b {
  width: 26px; height: 26px; border-radius: 24%;
  box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.35);
  animation: bob 3s ease-in-out infinite;
}
.phone-tray b:nth-child(1) { background: var(--cyan); }
.phone-tray b:nth-child(2) { background: var(--pink); animation-delay: -1s; }
.phone-tray b:nth-child(3) { background: var(--gold); animation-delay: -2s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .hero-badges { justify-content: center; }
  .hero .btn-row { justify-content: center; }
}

/* ---- Cards & feature grid ---- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.1rem; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-2); background: var(--surface-2); }
.card .ico {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(124, 77, 255, 0.35), rgba(0, 212, 255, 0.25));
  border: 1px solid var(--border-2);
  margin-bottom: 1rem;
}
.card .ico svg { width: 22px; height: 22px; color: #fff; }
.card h3 { margin-bottom: 0.3rem; }
.card p { color: var(--muted-2); font-size: 0.96rem; margin: 0; }

/* Numbered steps */
.steps { display: grid; gap: 1rem; counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
}
.step::before {
  counter-increment: step;
  content: counter(step);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(135deg, var(--violet), var(--cyan));
}
.step h3 { margin-bottom: 0.2rem; font-size: 1.1rem; }
.step p { margin: 0; color: var(--muted-2); font-size: 0.96rem; }

/* stat strip */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; text-align: center; }
.stat-b {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem 1rem;
}
.stat-b b { display: block; font-family: var(--font-display); font-size: 1.9rem; color: #fff; }
.stat-b span { font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }

/* CTA band */
.cta-band {
  background: linear-gradient(120deg, rgba(124, 77, 255, 0.2), rgba(0, 212, 255, 0.14));
  border: 1px solid var(--border-2);
  border-radius: 26px;
  padding: clamp(2rem, 5vw, 3.2rem);
  text-align: center;
}
.cta-band h2 { margin-bottom: 0.5rem; }
.cta-band p { color: var(--muted-2); max-width: 52ch; margin-inline: auto; }

/* ---- Prose (page + post content) ---- */
.prose { font-size: 1.04rem; color: var(--text); }
.prose > *:first-child { margin-top: 0; }
.prose h2 { margin-top: 2.4rem; }
.prose h3 { margin-top: 1.8rem; }
.prose p, .prose li { color: var(--muted-2); }
.prose strong { color: #fff; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.3rem; margin: 0 0 1.2rem; }
.prose li { margin-bottom: 0.5rem; }
.prose ul li::marker { color: var(--cyan); }
.prose ol li::marker { color: var(--pink); font-family: var(--font-display); }
.prose blockquote {
  margin: 1.5rem 0;
  padding: 0.6rem 1.2rem;
  border-left: 3px solid var(--violet);
  background: var(--surface);
  border-radius: 0 12px 12px 0;
  color: var(--muted-2);
}
.prose code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1rem 0.4rem;
  font-size: 0.9em;
}
.prose img, .prose .wp-block-image { border-radius: var(--radius); margin: 1.5rem 0; }
.prose figure { margin: 1.5rem 0; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.95rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: 0.7rem 0.9rem; text-align: left; }
.prose th { background: var(--surface-2); font-family: var(--font-display); color: #fff; }

/* ---- Page hero header ---- */
.page-head { padding: clamp(2.5rem, 6vw, 4rem) 0 1.5rem; }
.crumbs { font-size: 0.82rem; color: var(--muted); margin-bottom: 0.8rem; font-family: var(--font-display); letter-spacing: 0.04em; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--cyan); }
.page-head p.lead { margin-top: 0.6rem; }

/* ---- FAQ / accordion ---- */
.faq { display: grid; gap: 0.7rem; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 1.2rem;
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 1.1rem 0;
  font-family: var(--font-display);
  font-weight: 600;
  color: #fff;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; color: var(--cyan); flex: none; }
.faq details[open] summary::after { content: "\2013"; }
.faq details[open] summary { border-bottom: 1px solid var(--border); }
.faq details > p { padding: 1rem 0 1.2rem; margin: 0; color: var(--muted-2); }

/* ---- Blog ---- */
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.4rem; }
.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.post-card:hover { transform: translateY(-4px); border-color: var(--border-2); }
.post-card .thumb { display: block; aspect-ratio: 16/9; background: linear-gradient(135deg, rgba(124,77,255,0.35), rgba(0,212,255,0.22)); }
.post-card .body { padding: 1.3rem 1.4rem 1.5rem; flex: 1; display: flex; flex-direction: column; }
.post-card h3 { font-size: 1.14rem; margin-bottom: 0.4rem; }
.post-card h3 a { color: #fff; }
.post-card h3 a:hover { color: var(--cyan); }
.post-card .meta { font-size: 0.78rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 0.7rem; font-family: var(--font-display); }
.post-card p { color: var(--muted-2); font-size: 0.94rem; margin: 0; }

.pagination { display: flex; gap: 0.5rem; justify-content: center; margin-top: 2.5rem; flex-wrap: wrap; }
.pagination .page-numbers {
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted-2);
  font-family: var(--font-display);
  font-size: 0.9rem;
}
.pagination .current { background: linear-gradient(120deg, var(--violet), var(--cyan)); color: #fff; border-color: transparent; }

article.post-full .post-meta { color: var(--muted); font-size: 0.85rem; font-family: var(--font-display); letter-spacing: 0.05em; margin-bottom: 1.5rem; text-transform: uppercase; }
.post-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: 0.9rem; }
.post-nav a { color: var(--muted-2); }

/* ---- Footer ---- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: rgba(9, 8, 20, 0.6);
  padding: clamp(2.5rem, 6vw, 3.5rem) 0 2rem;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; }
.footer-grid h4 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); margin-bottom: 0.9rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.footer-grid a { color: var(--muted-2); font-size: 0.92rem; }
.footer-grid a:hover { color: var(--cyan); }
.footer-about p { color: var(--muted-2); font-size: 0.92rem; max-width: 34ch; margin-top: 0.8rem; }
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--muted);
}
.disclaimer { font-size: 0.8rem; color: var(--ink-dim); max-width: 70ch; margin-top: 1rem; line-height: 1.6; }
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-about { grid-column: 1 / -1; }
}

/* ---- 404 / search ---- */
.slim { max-width: 640px; margin: 0 auto; padding: clamp(3rem, 10vw, 6rem) 0; text-align: center; }
.search-form { display: flex; gap: 0.5rem; max-width: 460px; margin: 1.5rem auto 0; }
.search-form input[type="search"] {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 999px;
  padding: 0.75rem 1.2rem;
  color: #fff;
  font-family: var(--font-body);
}
.search-form input[type="search"]:focus { outline: 2px solid var(--cyan); }
.search-form button {
  border: 0; border-radius: 999px; padding: 0 1.3rem; cursor: pointer;
  font-family: var(--font-display); font-weight: 600; color: #fff;
  background: linear-gradient(120deg, var(--violet), var(--cyan));
}

/* ============================================================
   Block Blast Online — game widget
   ============================================================ */
#bb-game {
  --bb-cell-gap: clamp(3px, 1.1vw, 6px);
  max-width: 460px;
  margin: 2rem auto;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: 24px;
  padding: clamp(0.9rem, 3vw, 1.4rem);
  box-shadow: var(--shadow-glow);
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.bb-hud { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.9rem; flex-wrap: wrap; }
.bb-stat {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.35rem 0.8rem;
  line-height: 1.2;
}
.bb-stat span { display: block; font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }
.bb-stat b { font-family: var(--font-display); font-size: 1.15rem; color: #fff; }
.bb-combo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--pink), var(--violet));
  color: #fff;
}
.bb-combo.is-bump { animation: pop 0.4s ease; }
@keyframes pop { 0% { transform: scale(0.6); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
.bb-hud-btns { margin-left: auto; display: flex; gap: 0.5rem; }
.bb-btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
}
.bb-btn:hover { background: var(--surface-3); color: #fff; }
.bb-btn.is-off { opacity: 0.55; }
.bb-btn.bb-primary { background: linear-gradient(120deg, var(--violet), var(--cyan)); border-color: transparent; color: #fff; padding: 0.7rem 1.4rem; font-size: 0.95rem; }

.bb-board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: var(--bb-cell-gap);
  padding: var(--bb-cell-gap);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 16px;
  aspect-ratio: 1;
}
.bb-cell {
  aspect-ratio: 1;
  border-radius: 22%;
  background: rgba(255, 255, 255, 0.045);
  position: relative;
  transition: background 0.12s ease;
}
.bb-cell.is-filled { box-shadow: inset 0 0 7px rgba(255, 255, 255, 0.4), inset 0 -3px 6px rgba(0, 0, 0, 0.25); }
.bb-cell.is-ghost { background: rgba(0, 212, 255, 0.4) !important; outline: 2px solid rgba(0, 212, 255, 0.7); outline-offset: -2px; }
.bb-cell.is-ghostbad { background: rgba(255, 72, 120, 0.35) !important; }
.bb-cell.is-pop::after {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: 22%;
  background: radial-gradient(circle, #fff, rgba(255, 255, 255, 0) 70%);
  animation: popflash 0.36s ease-out forwards;
}
@keyframes popflash { 0% { transform: scale(0.4); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }

.bb-tray-label { text-align: center; font-size: 0.78rem; color: var(--muted); margin: 0.9rem 0 0.5rem; font-family: var(--font-display); letter-spacing: 0.04em; }
.bb-tray {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  min-height: 84px;
  align-items: center;
}
.bb-slot {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  min-height: 80px;
  display: grid;
  place-items: center;
  padding: 0.5rem;
}
.bb-slot.is-used { opacity: 0.3; }
.bb-piece {
  display: grid;
  gap: 3px;
  cursor: grab;
  touch-action: none;
}
.bb-piece.is-dragging { opacity: 0.25; }
.bb-mini {
  width: clamp(11px, 3.4vw, 16px);
  height: clamp(11px, 3.4vw, 16px);
  border-radius: 24%;
  box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.4);
}
.bb-mini.bb-empty { background: transparent !important; box-shadow: none; }

.bb-ghost {
  position: fixed;
  z-index: 999;
  display: grid;
  gap: var(--bb-cell-gap);
  pointer-events: none;
  filter: drop-shadow(0 12px 20px rgba(0, 0, 0, 0.5));
  opacity: 0.92;
}
.bb-gcell { border-radius: 22%; box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.45); }
.bb-gcell.bb-empty { background: transparent !important; box-shadow: none; }
.bb-ghost.is-bad { filter: grayscale(0.4) drop-shadow(0 12px 20px rgba(0, 0, 0, 0.5)); }

.bb-float {
  position: fixed;
  z-index: 998;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 10px rgba(255, 213, 79, 0.6);
  pointer-events: none;
  animation: floatup 0.9s ease-out forwards;
}
@keyframes floatup { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(-38px); opacity: 0; } }

.bb-over {
  position: absolute;
  inset: 0;
  background: rgba(9, 8, 20, 0.82);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  border-radius: 24px;
  z-index: 5;
}
.bb-over-card { text-align: center; padding: 2rem; }
.bb-over-card h3 { margin-bottom: 0.4rem; }
.bb-over-card p { color: var(--muted-2); margin-bottom: 1.2rem; }
.bb-over-card .bb-final { color: var(--gold); font-family: var(--font-display); font-size: 1.3rem; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001s !important; animation-iteration-count: 1 !important; scroll-behavior: auto; }
}
