/* ============================================================
   RegiosRP — estilos compartidos (home + documentación)
   ============================================================ */
:root {
  --gold: #f5a623;
  --gold-deep: #e07b00;
  --ink: #0c0d10;
  --ink-2: #15171c;
  --ink-3: #0f1116;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(245, 166, 35, 0.25);
  --text: #eceff4;
  --muted: #9aa0ab;
  --discord: #5865f2;
  --nav-h: 60px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 50% -10%, #1d2230 0%, var(--ink) 60%) fixed;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

a { color: var(--gold); }

.hidden { display: none !important; }

/* ---------- Navbar ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 clamp(16px, 4vw, 40px);
  background: rgba(12, 13, 16, 0.82);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
  letter-spacing: 0.5px;
  font-size: 18px;
  white-space: nowrap;
}
.nav-brand img { height: 32px; width: auto; display: block; }
.nav-brand b { color: var(--gold); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-links a.active { color: var(--gold); }
.nav-links a.nav-cta {
  color: #1a1300;
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-deep) 100%);
  box-shadow: 0 6px 18px rgba(245, 166, 35, 0.3);
}
.nav-links a.nav-cta:hover { filter: brightness(1.05); color: #1a1300; }

.nav-auth { display: inline-flex; align-items: center; gap: 10px; margin-left: 6px; }

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
}

/* ---------- Botones / chips reutilizables ---------- */
.btn-discord {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--discord);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 9px 16px;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
  transition: filter 0.15s ease;
}
.btn-discord:hover { filter: brightness(1.1); }
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px 5px 5px;
  font-size: 14px;
  color: var(--text);
}
.user-chip img { width: 28px; height: 28px; border-radius: 50%; }
.user-chip .badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #1a1300;
  background: var(--gold);
  padding: 2px 7px;
  border-radius: 999px;
}
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}
.btn-ghost:hover { color: var(--text); }

/* ---------- Home (hero) ---------- */
.hero-wrap {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
}
.hero { max-width: 760px; width: 100%; }
.banner {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(245, 166, 35, 0.18);
  display: block;
}
.hero h1 { font-size: clamp(28px, 6vw, 44px); letter-spacing: 0.5px; margin: 32px 0 8px; }
.hero h1 .accent { color: var(--gold); }
.tag { color: var(--muted); font-size: clamp(14px, 3vw, 18px); margin-bottom: 28px; }
.cta {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: #1a1300;
  font-weight: 700;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 16px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 8px 24px rgba(245, 166, 35, 0.35);
}
.cta.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(245, 166, 35, 0.5); }
.cta.secondary:hover { box-shadow: none; background: rgba(245, 166, 35, 0.08); }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.meta { margin-top: 22px; color: var(--muted); font-size: 13px; letter-spacing: 0.4px; }

/* ---------- Panel de staff (home) ---------- */
.staff-panel {
  display: none;
  margin-top: 36px;
  text-align: left;
  background: var(--ink-2);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.staff-panel h2 { font-size: 20px; margin-bottom: 6px; }
.staff-panel h2 .lock { color: var(--gold); }
.staff-panel p.sub { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.staff-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.staff-card {
  background: var(--ink-3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 16px;
  font-weight: 600;
  font-size: 14px;
}

footer.site-foot { padding: 28px; text-align: center; color: #5b606b; font-size: 12px; border-top: 1px solid var(--line); }

/* ============================================================
   Documentación (sidebar + contenido)
   ============================================================ */
.docs {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  gap: 0;
  max-width: 1180px;
  margin: 0 auto;
  align-items: start;
}

.docs-side {
  position: sticky;
  top: var(--nav-h);
  align-self: start;
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
  padding: 24px 16px 40px;
  border-right: 1px solid var(--line);
}

/* Scrollbar al estilo de la página (dorado sobre fondo oscuro) */
.docs-side,
.docs-main,
.doc-table-wrap {
  scrollbar-width: thin;                                  /* Firefox */
  scrollbar-color: rgba(245, 166, 35, 0.45) transparent; /* thumb / track */
}
.docs-side::-webkit-scrollbar,
.docs-main::-webkit-scrollbar,
.doc-table-wrap::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.docs-side::-webkit-scrollbar-track,
.docs-main::-webkit-scrollbar-track,
.doc-table-wrap::-webkit-scrollbar-track {
  background: var(--ink-3);
}
.docs-side::-webkit-scrollbar-thumb,
.docs-main::-webkit-scrollbar-thumb,
.doc-table-wrap::-webkit-scrollbar-thumb {
  background: linear-gradient(var(--gold), var(--gold-deep));
  border-radius: 8px;
  border: 2px solid var(--ink-3); /* deja aire alrededor del thumb */
}
.docs-side::-webkit-scrollbar-thumb:hover,
.docs-main::-webkit-scrollbar-thumb:hover,
.doc-table-wrap::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}
.docs-search {
  width: 100%;
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  padding: 9px 12px;
  margin-bottom: 16px;
  outline: none;
}
.docs-search:focus { border-color: var(--line-strong); }

/* Selector de vista (pública/staff) — solo visible para staff */
.docs-view-switch { margin-bottom: 14px; }
.docs-view-switch label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0 8px 6px;
}
.docs-view-switch select {
  width: 100%;
  background: var(--ink-3);
  border: 1px solid var(--gold);
  border-radius: 10px;
  color: var(--text);
  font-size: 14px;
  padding: 9px 12px;
  cursor: pointer;
  outline: none;
}
.docs-group {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 18px 8px 6px;
}
.docs-group:first-child { margin-top: 0; }
.docs-side nav a {
  display: block;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  padding: 7px 12px;
  border-radius: 8px;
  border-left: 2px solid transparent;
  transition: color 0.12s ease, background 0.12s ease;
}
.docs-side nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.docs-side nav a.active {
  color: var(--gold);
  background: rgba(245, 166, 35, 0.08);
  border-left-color: var(--gold);
}

.docs-main {
  padding: 32px clamp(20px, 4vw, 48px) 80px;
  min-width: 0;
}
.docs-intro { margin-bottom: 24px; }
.docs-intro h1 { font-size: clamp(26px, 5vw, 36px); margin-bottom: 8px; }
.docs-intro p { color: var(--muted); max-width: 70ch; }

.doc-section {
  scroll-margin-top: calc(var(--nav-h) + 16px);
  padding: 28px 0;
  border-top: 1px solid var(--line);
}
.doc-section:first-of-type { border-top: 0; padding-top: 8px; }
.doc-section h2 {
  font-size: 24px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.doc-section h2 .anchor { color: var(--gold); font-weight: 800; }
.doc-section h3 { font-size: 17px; margin: 22px 0 8px; color: var(--text); }
.doc-section p { color: #c7ccd6; margin-bottom: 12px; max-width: 74ch; }
.doc-section ul, .doc-section ol { margin: 0 0 14px 22px; color: #c7ccd6; }
.doc-section li { margin-bottom: 6px; }
.doc-section code {
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 0.88em;
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  color: var(--gold);
}
.doc-section strong { color: var(--text); }

.callout {
  border-radius: 12px;
  padding: 14px 16px;
  margin: 16px 0;
  border: 1px solid var(--line);
  background: var(--ink-2);
  font-size: 14px;
}
.callout.warn { border-color: rgba(245, 166, 35, 0.4); background: rgba(245, 166, 35, 0.07); }
.callout.danger { border-color: rgba(229, 84, 84, 0.4); background: rgba(229, 84, 84, 0.08); }
.callout.staff { border-color: rgba(88, 101, 242, 0.45); background: rgba(88, 101, 242, 0.08); }
.callout b { color: var(--text); }

.doc-table-wrap { overflow-x: auto; margin: 14px 0; }
table.doc-table { border-collapse: collapse; width: 100%; font-size: 13.5px; min-width: 420px; }
table.doc-table th, table.doc-table td {
  text-align: left;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
}
table.doc-table th { color: var(--gold); font-weight: 700; background: rgba(255, 255, 255, 0.02); }
table.doc-table tr:hover td { background: rgba(255, 255, 255, 0.02); }

.pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(88, 101, 242, 0.2);
  color: #aab2ff;
  border: 1px solid rgba(88, 101, 242, 0.4);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px clamp(16px, 4vw, 40px) 20px;
    background: rgba(12, 13, 16, 0.97);
    border-bottom: 1px solid var(--line);
    transform: translateY(-130%);
    transition: transform 0.2s ease;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 12px; }
  .nav-auth { margin: 4px 0 0; }

  .docs { grid-template-columns: 1fr; }
  .docs-side {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 16px clamp(16px, 4vw, 24px);
  }
}
