body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 28px;
}

/* ── Three-column layout ── */
.ttt-layout {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 18px;
  width: 100%;
  max-width: 900px;
  padding: 12px 10px 0;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

/* ── Side panels ── */
.ttt-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 110px;
  flex-shrink: 0;
}

.ttt-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ttt-label {
  font-size: 6px;
  color: var(--muted);
  letter-spacing: 2px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding-bottom: 4px;
  margin-bottom: 2px;
}

.level-tabs { display: flex; flex-direction: column; gap: 5px; }

.ltab {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  padding: 7px 8px;
  border: 1px solid rgba(255,0,204,0.2);
  background: #0d0820;
  color: #8877aa;
  transition: all .15s;
  letter-spacing: 1px;
  text-align: left;
}
.ltab:hover { background: #1a1030; color: #cc88ff; }
.ltab.lv1.active { background: #0a1f17; color: #00f5aa; border-color: #00f5aa; text-shadow: 0 0 8px #00f5aa; }
.ltab.lv2.active { background: #1f1600; color: #ffe600; border-color: #ffe600; text-shadow: 0 0 8px #ffe600; }
.ltab.lv3.active { background: #200a00; color: #ff8c00; border-color: #ff8c00; text-shadow: 0 0 8px #ff8c00; }

.diff-desc { font-size: 5px; color: #444; letter-spacing: 1px; line-height: 1.8; }

.ttt-btn {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  padding: 9px 8px;
  border: 1px solid rgba(255,0,204,0.25);
  background: transparent;
  color: var(--pink);
  transition: all .15s;
  letter-spacing: 1px;
  text-align: left;
  width: 100%;
}
.ttt-btn:hover { background: rgba(255,0,204,0.12); border-color: var(--pink); color: #fff; }
.ttt-btn.primary-btn { border-color: rgba(0,245,255,0.3); color: var(--cyan); }
.ttt-btn.primary-btn:hover { background: rgba(0,245,255,0.1); border-color: var(--cyan); }

.status-bar {
  font-size: 7px;
  padding: 8px 6px;
  background: #0d0820;
  border: 1px solid rgba(0,245,255,0.2);
  color: #00f5ff;
  text-shadow: 0 0 8px #00f5ff88;
  letter-spacing: 1px;
  text-align: center;
  line-height: 1.6;
  transition: color 0.2s, text-shadow 0.2s;
}

.next-board-hint {
  font-size: 14px;
  color: var(--yellow);
  text-shadow: 0 0 8px var(--yellow);
  letter-spacing: 1px;
  text-align: center;
  padding: 6px 0;
}

/* Scores */
.scores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.sc { background: #0d0820; padding: 8px 4px; text-align: center; border: 1px solid rgba(255,0,204,0.15); }
.sc:first-child  { border-color: rgba(0,245,255,0.3); }
.sc:nth-child(2) { border-color: rgba(255,255,255,0.1); }
.sc:last-child   { border-color: rgba(255,34,68,0.3); }
.sc-val { display: block; font-size: 16px; margin-bottom: 3px; }
.sc-lbl { font-size: 5px; color: #666688; letter-spacing: 1px; }

/* ── Center ── */
.ttt-center {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

/* ── Canvas board ── */
#super-board {
  display: block;
  border: 2px solid rgba(0,245,255,0.2);
  box-shadow: 0 0 30px rgba(0,245,255,0.08), 0 0 60px rgba(255,0,204,0.05);
  background: #07071a;
  flex-shrink: 0;
}

/* ── Responsive ── */
@media (max-width: 720px) {
  .ttt-layout { flex-direction: column; align-items: center; gap: 12px; padding: 8px 8px 0; }
  .ttt-panel { flex-direction: row; width: 100%; max-width: 480px; flex-wrap: wrap; gap: 10px; }
  .ttt-section { flex: 1; min-width: 80px; }
  .level-tabs { flex-direction: row; }
  .ltab { text-align: center; flex: 1; }
  .ttt-right { order: 3; }
}

/* ── Game Over popup — defined in style.css ── */
