/* =========================
   RESET / BASE
   ========================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #0b1226;
  color: #e6ecff;
}

a {
  color: inherit;
  text-decoration: none;
}

.center {
  text-align: center;
}

/* =========================
   HEADER GLOBAL
   ========================= */
.rb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: #0e1530;
  border-bottom: 1px solid #1e2a55;
}

.rb-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rb-logo {
  height: 28px;
}

.rb-name {
  font-size: 18px;
  font-weight: 600;
  color: #cfd8ff;
}

.rb-nav a {
  margin-left: 16px;
  font-size: 14px;
  color: #cfd8ff;
}

.rb-nav a:hover {
  color: #5cffc8;
}

/* =========================
   HOME
   ========================= */
.rb-home {
  text-align: center;
  padding: 40px 20px;
}

.rb-logo-big {
  width: 120px;
  margin-bottom: 12px;
}

.rb-tagline {
  color: #9fb3ff;
  margin-bottom: 24px;
}

.rb-actions .btn {
  display: inline-block;
  margin: 6px;
  padding: 10px 18px;
  background: #5cffc8;
  color: #0e1530;
  border-radius: 6px;
  font-weight: 600;
}

.rb-actions .btn.secondary {
  background: transparent;
  border: 1px solid #5cffc8;
  color: #5cffc8;
}

/* =========================
   INFO BAR (jeu)
   ========================= */
.info-bar {
  text-align: center;
  font-size: 13px;
  color: #9fb3ff;
  margin: 12px 0;
}

/* =========================
   MAP + CONSOLE (jeu)
   ========================= */
.map-console-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-bottom: 20px;
}

canvas {
  border: 1px solid #1e2a55;
  border-radius: 6px;
  background: #000;
  image-rendering: pixelated;
}

.rb-console {
  width: 320px;
  height: 260px;
  background: #0e1530;
  border: 1px solid #1e2a55;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
}

.rb-console-title {
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 600;
  color: #9fb3ff;
  border-bottom: 1px solid #1e2a55;
}

.rb-console-body {
  flex: 1;
  padding: 8px;
  overflow-y: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.4;
}

/* =========================
   TRAINING / PANELS
   ========================= */
.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  padding: 12px 20px;
  background: #0e1530;
  border-bottom: 1px solid #1e2a55;
}

.layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  padding: 20px;
}

.panel {
  background: #0e1530;
  border: 1px solid #1e2a55;
  border-radius: 6px;
  padding: 12px;
}

.panelTitle {
  font-weight: 600;
  margin-bottom: 8px;
  color: #9fb3ff;
}

textarea,
input[type="text"],
input[type="color"] {
  width: 100%;
  background: #0b1226;
  border: 1px solid #1e2a55;
  color: #e6ecff;
  border-radius: 4px;
  padding: 6px;
}

/* =========================
   MAP EDITOR / MAPS
   ========================= */
.editor-bar {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 20px;
}

.gallery {
  display: flex;
  gap: 20px;
  justify-content: center;
  padding: 20px;
}

.map-card {
  background: #0e1530;
  border: 1px solid #1e2a55;
  border-radius: 6px;
  padding: 10px;
  text-align: center;
}

.map-card .title {
  margin-top: 6px;
  font-size: 13px;
}

/* =========================
   FOOTER
   ========================= */
.rb-footer {
  margin-top: 40px;
  padding: 12px;
  font-size: 12px;
  text-align: center;
  color: #8893c7;
  border-top: 1px solid #1e2a55;
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 480px) {
  .rb-console {
    width: 90%;
    height: 220px;
  }

  canvas {
    max-width: 90%;
    height: auto;
  }
}
