/* 3D Super Generator — Gamification Styles (Chip, Toasts, Skill-Tree)
   Follows site conventions: dark theme, --accent var, mobile >=360px, touch >=36px. */

/* ---------- Header-Chip (Level) ---------- */
.gam-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 12px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .05);
  color: inherit;
  text-decoration: none;
  line-height: 1;
  transition: border-color .15s ease, background .15s ease;
}
.gam-chip:hover { border-color: var(--accent, #4cc9f0); background: rgba(255, 255, 255, .08); }
.gam-chip-lv {
  font-weight: 800;
  font-size: 13px;
  color: var(--accent, #4cc9f0);
  font-variant-numeric: tabular-nums;
}
.gam-chip-bar {
  width: 56px;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .12);
  overflow: hidden;
  flex: 0 0 auto;
}
.gam-chip-bar > span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent, #4cc9f0), #7b61ff);
  transition: width .4s ease;
}
.gam-chip-xp {
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, .72);
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 560px) {
  .gam-chip-xp { display: none; }
  .gam-chip-bar { width: 40px; }
}

/* ---------- Toasts (Seiten ohne style-viewport.css) ---------- */
#toast-container {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.gam-toast {
  background: #101820;
  border: 1px solid var(--accent, #4cc9f0);
  color: #eef2f6;
  font: 600 13.5px/1.4 system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  padding: 12px 16px;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .5);
  animation: gamIn .3s ease;
  max-width: min(86vw, 340px);
}
.gam-toast.out { opacity: 0; transform: translateY(6px); transition: all .4s ease; }
@keyframes gamIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- Skill-Tree-Seite ---------- */
.gam-page {
  min-height: 100vh;
  background: #080b10;
  color: #eef2f6;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.gam-wrap { max-width: 1080px; margin: 0 auto; padding: 20px 16px 64px; }
.gam-crumb { font-size: .82rem; color: #aab6c4; margin-bottom: 18px; }
.gam-crumb a { color: #aab6c4; text-decoration: none; }
.gam-crumb a:hover { color: var(--accent, #4cc9f0); }

.gam-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  align-items: center;
  background: linear-gradient(160deg, #0d1117 0%, #101a26 100%);
  border: 1px solid #1e2a3a;
  border-radius: 18px;
  padding: 22px;
}
.gam-hero-main { flex: 1 1 260px; }
.gam-hero h1 { font-size: 1.7rem; letter-spacing: -.01em; margin: 0 0 6px; }
.gam-hero .gam-sub { color: #aab6c4; font-size: .95rem; margin: 0; }
.gam-stats {
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
}
.gam-stat { text-align: center; min-width: 64px; }
.gam-stat b {
  display: block;
  font-size: 1.55rem;
  font-variant-numeric: tabular-nums;
  color: var(--accent, #4cc9f0);
}
.gam-stat span { font-size: .74rem; color: #aab6c4; text-transform: uppercase; letter-spacing: .06em; }
.gam-flame { font-size: 1.2rem; }

.gam-xpbar {
  flex: 1 1 100%;
  height: 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .1);
  overflow: hidden;
}
.gam-xpbar > span {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--accent, #4cc9f0), #7b61ff);
  transition: width .5s ease;
}
.gam-xpnote { flex: 1 1 100%; margin: 0; font-size: .82rem; color: #aab6c4; }

/* Badges */
.gam-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 8px; }
.gam-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid #1e2a3a;
  background: #0d1117;
  color: #aab6c4;
  min-height: 36px;
}
.gam-badge.on {
  border-color: var(--accent, #4cc9f0);
  color: #eef2f6;
  box-shadow: 0 0 12px rgba(76, 201, 240, .18);
}

/* Zweige + Nodes: vertikale Ketten, wie ein echtes Skill-Tree-Panel */
.gam-tree {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin-top: 26px;
}
.gam-branch {
  background: #0d1117;
  border: 1px solid #1e2a3a;
  border-radius: 16px;
  padding: 16px;
}
.gam-branch-head {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.02rem;
  margin-bottom: 14px;
}
.gam-branch-head .ic { font-size: 1.4rem; }

.gam-nodes { position: relative; padding-left: 30px; }
.gam-nodes::before {
  content: '';
  position: absolute;
  left: 13px;
  top: 18px;
  bottom: 18px;
  width: 3px;
  border-radius: 2px;
  background: #1e2a3a;
}
.gam-node { position: relative; margin: 0 0 6px; }
.gam-node:last-child { margin-bottom: 0; }
.gam-node::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 50%;
  transform: translateY(-50%);
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #1e2a3a;
  z-index: 1;
}
.gam-node button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid #1e2a3a;
  background: #0a0e14;
  color: #aab6c4;
  font: 600 .86rem/1.3 inherit;
  text-align: left;
  cursor: default;
}
.gam-node .st { font-size: 1.05rem; flex: 0 0 auto; }
.gam-node.avail button {
  border-color: var(--accent, #4cc9f0);
  color: #eef2f6;
  cursor: pointer;
  animation: gamPulse 2s ease-in-out infinite;
}
.gam-node.avail::before { background: var(--accent, #4cc9f0); box-shadow: 0 0 8px var(--accent, #4cc9f0); }
.gam-node.done button {
  border-color: rgba(76, 201, 240, .55);
  background: rgba(76, 201, 240, .09);
  color: #eef2f6;
}
.gam-node.done::before { background: var(--accent, #4cc9f0); }
@keyframes gamPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(76, 201, 240, .25); } 50% { box-shadow: 0 0 0 6px rgba(76, 201, 240, 0); } }

/* How-it-works Strip */
.gam-how {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 26px;
}
.gam-how div {
  background: #0d1117;
  border: 1px solid #1e2a3a;
  border-radius: 12px;
  padding: 14px;
  font-size: .88rem;
  color: #aab6c4;
}
.gam-how b { color: #eef2f6; display: block; margin-bottom: 4px; }
.gam-how .n {
  display: inline-flex;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent, #4cc9f0);
  color: #04070c;
  font-weight: 800;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
  font-size: .8rem;
}

.gam-foot { margin-top: 40px; padding-top: 20px; border-top: 1px solid #1e2a3a; color: #aab6c4; font-size: .88rem; }
.gam-foot a { color: #aab6c4; }
@media (max-width: 560px) {
  .gam-hero { padding: 16px; }
  .gam-hero h1 { font-size: 1.35rem; }
  .gam-tree { grid-template-columns: 1fr; }
}

/* How-Strip Ueberschrift */
.gam-how-hdr { font-size: 1.15rem; margin: 30px 0 12px; letter-spacing: -.01em; }
