/* Help page — extends game design tokens */
:root {
  --bg-deep: #0a0e17;
  --bg-panel: rgba(14, 20, 35, 0.85);
  --bg-panel-border: rgba(100, 180, 255, 0.15);
  --accent-cyan: #00e5ff;
  --accent-magenta: #ff2d95;
  --accent-purple: #9d4edd;
  --accent-gold: #ffd166;
  --text-primary: #e8f0fe;
  --text-muted: #7a8ba8;
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.65;
  min-height: 100vh;
}

.help-page {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

.help-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.help-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.2;
  pointer-events: none;
  z-index: 0;
}

.help-glow--1 { top: 5%; left: -5%; background: var(--accent-purple); }
.help-glow--2 { bottom: 10%; right: -5%; background: var(--accent-cyan); }

.help-content { position: relative; z-index: 1; }

/* ─── Top bar ─── */
.help-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.help-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  text-decoration: none;
  padding: 0.6rem 1rem;
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-radius: 6px;
  transition: 0.2s ease;
}

.help-back:hover {
  background: rgba(0, 229, 255, 0.1);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
}

.help-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.help-nav a {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  transition: 0.2s;
}

.help-nav a:hover {
  color: var(--accent-cyan);
  background: rgba(255, 255, 255, 0.05);
}

/* ─── Header ─── */
.help-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.help-header__icon {
  font-size: 2.5rem;
  color: var(--accent-cyan);
  text-shadow: 0 0 20px rgba(0, 229, 255, 0.5);
}

.help-header__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 900;
  letter-spacing: 0.2em;
  margin: 0.5rem 0;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-magenta));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.help-header__subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ─── Sections ─── */
.help-section {
  background: var(--bg-panel);
  border: 1px solid var(--bg-panel-border);
  border-radius: 12px;
  padding: 1.75rem;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(12px);
}

.help-section h2 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-cyan);
  text-transform: uppercase;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.help-section h3 {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent-gold);
  margin: 1.25rem 0 0.5rem;
}

.help-section p {
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.help-section p:last-child { margin-bottom: 0; }

.help-section ul, .help-section ol {
  margin: 0.5rem 0 0.75rem 1.25rem;
  color: var(--text-primary);
}

.help-section li { margin-bottom: 0.35rem; }

.help-section li strong { color: var(--accent-cyan); }

/* ─── Tables ─── */
.help-table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

table.help-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.help-table th {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: left;
  padding: 0.75rem 1rem;
  background: rgba(0, 229, 255, 0.08);
  color: var(--accent-cyan);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.help-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.help-table tr:last-child td { border-bottom: none; }

.help-table tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* ─── Kbd ─── */
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  padding: 0.15rem 0.45rem;
  font-family: var(--font-display);
  font-size: 0.68rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  color: var(--text-primary);
  white-space: nowrap;
}

/* ─── Piece grid ─── */
.piece-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.piece-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 0.75rem;
  text-align: center;
}

.piece-card__name {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.piece-card__shape {
  font-family: monospace;
  font-size: 0.85rem;
  line-height: 1.2;
  letter-spacing: 0.15em;
  margin-bottom: 0.35rem;
}

.piece-card__desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.piece-i { color: #00f0f0; }
.piece-o { color: #f0f000; }
.piece-t { color: #a000f0; }
.piece-s { color: #00f000; }
.piece-z { color: #f00000; }
.piece-j { color: #0000f0; }
.piece-l { color: #f0a000; }

/* ─── Callout boxes ─── */
.help-tip {
  background: rgba(0, 229, 255, 0.06);
  border-left: 3px solid var(--accent-cyan);
  padding: 0.85rem 1rem;
  border-radius: 0 6px 6px 0;
  margin: 1rem 0;
  font-size: 0.92rem;
}

.help-tip strong { color: var(--accent-cyan); }

.help-warning {
  background: rgba(255, 45, 149, 0.06);
  border-left: 3px solid var(--accent-magenta);
  padding: 0.85rem 1rem;
  border-radius: 0 6px 6px 0;
  margin: 1rem 0;
  font-size: 0.92rem;
}

/* ─── Two-column layout ─── */
.help-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .help-columns { grid-template-columns: 1fr; }
  .help-nav { display: none; }
}

/* ─── Footer ─── */
.help-footer {
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.help-footer a {
  color: var(--accent-cyan);
  text-decoration: none;
}

.help-footer a:hover { text-decoration: underline; }
