/* ═══════════════════════════════════════════════════════
   shared.css — apiJAV common styles
   Shared across: index.html, docs.html, api-reference.html
   ═══════════════════════════════════════════════════════ */

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

/* ── CSS VARIABLES ── */
:root {
  --bg:      #080810;
  --surface: #0f0f1a;
  --card:    #141422;
  --border:  #1e1e32;
  --gold:    #d4a843;
  --gold2:   #f0c96a;
  --text:    #e2e2f0;
  --muted:   #5a5a78;
  /* Semantic aliases (used by index + docs) */
  --accent:  #4a6cf7;
  --danger:  #e05353;
  --success: #3ecf8e;
  /* api-reference.html also uses these names */
  --green:   #3ecf8e;
  --blue:    #4a6cf7;
  --orange:  #f0a050;
  --red:     #e05353;
  --font-h:  'Bebas Neue', sans-serif;
  --font-b:  'DM Sans', sans-serif;
  --font-m:  'JetBrains Mono', monospace;
  --r:       8px;
}

/* ── BASE ── */
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-b);
  font-size: 15px;
  line-height: 1.6;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: .4;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 64px;
  background: rgba(8,8,16,.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  font-family: var(--font-h);
  font-size: 28px;
  letter-spacing: 2px;
  color: var(--gold);
}
.nav-logo span { color: var(--text); }
.nav-logo-img { height: 36px; width: auto; display: block; }
.nav-logo-fallback { font-family: var(--font-h); font-size: 28px; letter-spacing: 2px; color: var(--gold); display: none; }
.nav-logo-fallback span { color: var(--text); }

.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .5px;
  text-transform: uppercase;
  transition: color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active { color: var(--gold); }
.nav-btn {
  background: var(--gold);
  color: #000 !important;
  padding: 8px 20px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.nav-btn:hover { background: var(--gold2) !important; }

/* ── MOBILE HAMBURGER ── */
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
  padding: 8px;
}
.nav-mobile-menu {
  display: none;
  position: fixed;
  top: 64px; left: 0; right: 0;
  background: rgba(8,8,16,.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  flex-direction: column;
  padding: 20px;
  gap: 16px;
  z-index: 99;
}
.nav-mobile-menu.open { display: flex; }
.nav-mobile-menu a {
  color: var(--muted);
  text-decoration: none;
  font-size: 16px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  transition: color .2s;
}
.nav-mobile-menu a:last-child { border-bottom: none; }
.nav-mobile-menu a:hover { color: var(--gold); }

/* ── FOOTER ── */
footer {
  border-top: 1px solid var(--border);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  color: var(--muted);
  font-size: 13px;
}
.footer-logo { font-family: var(--font-h); font-size: 22px; color: var(--gold); letter-spacing: 2px; }
.footer-logo-img { height: 32px; width: auto; display: block; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--text); }
.footer-links-wrap { display: flex; gap: 24px; flex-wrap: wrap; justify-content: center; }

/* ── TELEGRAM BUTTON ── */
.tg-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: #229ED9; color: #fff !important;
  padding: 7px 16px; border-radius: 4px;
  font-weight: 600; font-size: 13px;
  text-decoration: none !important; letter-spacing: .3px;
  transition: background .2s; white-space: nowrap;
  -webkit-text-fill-color: #fff;
}
.tg-btn:hover { background: #1a8bbf; }
.tg-btn svg { width: 15px; height: 15px; fill: #fff; flex-shrink: 0; }
.footer-tg {
  display: inline-flex; align-items: center; gap: 6px;
  color: #229ED9 !important; text-decoration: none;
  font-size: 13px; font-weight: 500;
  transition: color .2s;
  -webkit-text-fill-color: #229ED9;
}
.footer-tg:hover { color: #1a8bbf !important; -webkit-text-fill-color: #1a8bbf; }
.footer-tg svg { width: 15px; height: 15px; fill: #229ED9; flex-shrink: 0; }
