/* ...moved from brick.html... */
:root{
  --bg: linear-gradient(135deg, #1e1e1e, #333);
  --panel: #23272f;
  --accent: #00a651;
  --accent-2: #22c55e;
  --text: #e0e0e0;
  --sub: #aab;
  --stat-bg: #181c20;
  --badge-bg: #23272f;
  --footer-bg: #23272f;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Ubuntu;
  background: radial-gradient(ellipse at bottom, #0d1d31 0%, #0c0d13 100%);
  color:var(--text);
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}
h1.centered-title {
  font-size: 2.5rem;
  margin: 0 auto;
  font-weight: 700;
  letter-spacing: .3px;
  text-align: center;
  color: var(--accent);
  padding: 24px 0 12px 0;
}
.wrap{max-width:1050px;margin:24px auto;padding:16px}
header{display:flex;gap:12px;align-items:center;justify-content:space-between;margin-bottom:12px}
.brand{display:flex;gap:10px;align-items:center}
.logo{width:36px;height:36px;border-radius:12px;background:linear-gradient(135deg,var(--accent),#38bdf8);box-shadow:0 8px 24px rgba(0,166,81,.45)}
h1{font-size:20px;margin:0;font-weight:700;letter-spacing:.3px}
.panel{
  background: var(--panel);
  backdrop-filter: blur(6px);
  border: 1px solid #222;
  padding: 12px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.controls{display:grid;grid-template-columns:repeat(12,1fr);gap:10px;align-items:center}
.controls .group{grid-column:span 3}
.controls .group.wide{grid-column:span 6}
.controls label{font-size:12px;color:var(--sub);display:block;margin-bottom:6px}
.controls .row{display:flex;gap:8px;align-items:center}
button{
  appearance:none;
  border:2px solid #00a651;
  border-radius:12px;
  padding:10px 14px;
  font-weight:700;
  cursor:pointer;
  color:white;
  background:var(--accent);
  box-shadow:0 0 10px #00a651, 0 0 20px #00a651;
  transition:background 0.3s, color 0.3s, box-shadow 0.3s, border-color 0.3s, transform .06s;
  font-size: 1rem;
}
button.secondary{
  background:#23272f;
  color: #00a651;
  border:2px solid #00a651;
  box-shadow:none;
}
button.ghost{
  background:transparent;
  color: #00a651;
  border:2px solid #00a651;
  box-shadow:none;
}
button:hover, button:focus{
  background:#00a651;
  color:#fff;
  border-color:#22c55e;
  box-shadow:0 0 25px #00a651, 0 0 35px #00a651;
  outline: none;
}
button:active{
  transform:translateY(1px);
  background:#007a3d;
  border-color:#007a3d;
}
.stats{
  display:flex;
  gap:16px;
  font-variant-numeric:tabular-nums;
}
.stat{
  padding:10px 12px;
  border-radius:12px;
  background: var(--stat-bg);
  border:1px solid #222;
  color: var(--text);
}
.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 8px;
  border-radius:999px;
  background: var(--badge-bg);
  border:1px solid #222;
  font-size:11px;
  color: var(--text);
}
.canvas-wrap{
  position:relative;
  margin-top:14px;
  background: linear-gradient(180deg,#23272f,#181c20);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
canvas{
  width:100%;
  height:auto;
  display:block;
  border-radius:18px;
  background:linear-gradient(180deg,#1e1e1e,#121212);
}
.footer{
  margin-top:10px;
  font-size:12px;
  color:#9aa;
  background: var(--footer-bg);
  border-radius: 10px;
  padding: 10px 0;
  text-align: center;
}
.stars {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 120vh;
  pointer-events: none;
  z-index: 0;
}
.dot {
  position: absolute;
  right: 0;
  background: #00a651;
  border-radius: 50%;
  opacity: 0.7;
  box-shadow: 0 0 8px #00a651, 0 0 2px #fff;
  animation: dot-fall linear infinite;
}
@keyframes dot-fall {
  to {
    transform: translate3d(-30em, 30em, 0);
  }
}
@keyframes fall {
  to {
    transform: translate3d(-30em, 30em, 30em);
  }
}
@keyframes tail-fade {
  0%, 50% {
    width: 6em;
    opacity: 1;
  }
  70%, 80% {
    width: 0;
    opacity: 0.4;
  }
  100% {
    width: 0;
    opacity: 0;
  }
}
.mobile-navbar {
  display: none;
}
.mobile-menu {
  display: none;
}
@media (max-width: 750px) {
  .mobile-navbar {
    display: flex;
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 54px;
    background: #181c20ee;
    color: #fff;
    align-items: center;
    justify-content: space-between;
    z-index: 1001;
    box-shadow: 0 2px 12px #0008;
    padding: 0 18px;
  }
  .nav-logo {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: #00a651;
  }
  .nav-toggle {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 8px;
    z-index: 1002;
  }
  .nav-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background: #00a651;
    border-radius: 2px;
    transition: all 0.3s;
  }
  .nav-toggle.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
  .mobile-menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 54px; left: 0; right: 0;
    background: #23272f;
    z-index: 1000;
    padding: 18px 12px 24px 12px;
    box-shadow: 0 4px 24px #000a;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    gap: 18px;
    transform: translateY(-120%);
    transition: transform 0.3s;
  }
  .mobile-menu.open {
    transform: translateY(0);
  }
  .mobile-stats {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 1.1rem;
    color: #e0e0e0;
  }
  .mobile-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .mobile-actions button {
    width: 100%;
    font-size: 1.1rem;
    padding: 12px 0;
    border-radius: 10px;
  }
  .wrap > header,
  .panel,
  .stats,
  .controls {
    display: none !important;
  }
  .wrap {
    padding: 0;
    margin: 0;
    max-width: 100vw;
  }
  .canvas-wrap {
    margin: 0 auto;
    width: 100vw;
    max-width: 100vw;
    height: 90svh;
    max-height: 100svh;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100svh;
  }
  .canvas-wrap canvas {
    width: 100vw !important;
    height: 90svh !important;
    max-width: 100vw;
    max-height: 100svh;
    min-width: 0;
    min-height: 0;
    border-radius: 0;
    box-shadow: none;
    background: linear-gradient(135deg, #1e1e1e 60%, #00a651 100%);
    display: block;
  }
}
