/* ══════════════════════════════════════════════════════════════
   egogo VPN — Documentation Page Stylesheet
   ══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── Custom Properties ─────────────────────────────────────── */
:root {
  --c-bg:       #0a0a0f;
  --c-bg-2:     #0d0d17;
  --c-bg-3:     #111122;
  --c-cyan:     #00d4ff;
  --c-violet:   #8b5cf6;
  --c-magenta:  #c026d3;
  --c-green:    #00e676;
  --c-text:     #eeeeff;
  --c-muted:    rgba(238, 238, 255, .55);
  --c-faint:    rgba(238, 238, 255, .22);

  --glass-bg:     rgba(255, 255, 255, .04);
  --glass-bg-h:   rgba(255, 255, 255, .08);
  --glass-border: rgba(255, 255, 255, .08);

  --grad:      linear-gradient(135deg, var(--c-cyan) 0%, var(--c-violet) 50%, var(--c-magenta) 100%);
  --grad-text: linear-gradient(90deg, var(--c-cyan) 0%, var(--c-violet) 55%, var(--c-magenta) 100%);

  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --nav-h: 72px;
  --sidebar-w: 260px;
  --max-w: 1200px;

  --r-sm: 8px;
  --r:    14px;
  --r-lg: 20px;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a        { color: inherit; text-decoration: none; }
ul       { list-style: none; }
button   { cursor: pointer; border: none; background: none; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Gradient text ─────────────────────────────────────────── */
.gradient-text {
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ══════════════════════════════════════════════════════════════
   NAV
   ══════════════════════════════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(10, 10, 15, .75);
  backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid var(--glass-border);
  transition: background .3s;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1rem;
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -.01em;
}

.nav__brand img { height: 28px; }

.nav__back {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .875rem;
  color: var(--c-muted);
  transition: color .2s;
}
.nav__back:hover { color: var(--c-text); }
.nav__back svg { width: 16px; height: 16px; }

.nav__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-switcher {
  display: flex;
  align-items: center;
  gap: .25rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  padding: .2rem .35rem;
}

.lang-switcher button {
  padding: .25rem .6rem;
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .05em;
  color: var(--c-muted);
  transition: color .2s, background .2s;
}

.lang-switcher button.active {
  background: var(--glass-bg-h);
  color: var(--c-text);
}

.btn--ghost {
  display: inline-flex;
  align-items: center;
  padding: .5rem 1.25rem;
  border-radius: 100px;
  font-size: .875rem;
  font-weight: 500;
  border: 1px solid var(--glass-border);
  color: var(--c-text);
  transition: border-color .2s, background .2s;
}
.btn--ghost:hover {
  border-color: rgba(0, 212, 255, .4);
  background: var(--glass-bg-h);
}

/* ══════════════════════════════════════════════════════════════
   DOCS LAYOUT
   ══════════════════════════════════════════════════════════════ */
.docs-wrapper {
  padding-top: calc(var(--nav-h) + 2.5rem);
  padding-bottom: 5rem;
}

.docs-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: 3rem;
  align-items: start;
}

/* ── Sidebar ───────────────────────────────────────────────── */
.docs-sidebar {
  position: sticky;
  top: calc(var(--nav-h) + 1.5rem);
  max-height: calc(100vh - var(--nav-h) - 3rem);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--c-faint) transparent;
}

.docs-sidebar::-webkit-scrollbar { width: 4px; }
.docs-sidebar::-webkit-scrollbar-track { background: transparent; }
.docs-sidebar::-webkit-scrollbar-thumb { background: var(--c-faint); border-radius: 4px; }

.sidebar-title {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-muted);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--glass-border);
}

.sidebar-nav { display: flex; flex-direction: column; gap: .125rem; }

.sidebar-nav a {
  display: block;
  padding: .4rem .75rem;
  font-size: .875rem;
  color: var(--c-muted);
  border-radius: var(--r-sm);
  border-left: 2px solid transparent;
  transition: color .2s, background .2s, border-color .2s;
  line-height: 1.4;
}

.sidebar-nav a:hover {
  color: var(--c-text);
  background: var(--glass-bg);
}

.sidebar-nav a.active {
  color: var(--c-cyan);
  border-left-color: var(--c-cyan);
  background: rgba(0, 212, 255, .06);
}

/* ── Content ───────────────────────────────────────────────── */
.docs-content {
  min-width: 0;
}

.docs-header {
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--glass-border);
}

.docs-badge {
  display: inline-block;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-cyan);
  background: rgba(0, 212, 255, .1);
  border: 1px solid rgba(0, 212, 255, .2);
  border-radius: 100px;
  padding: .25rem .75rem;
  margin-bottom: 1rem;
}

.docs-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1.1;
  margin-bottom: .75rem;
}

.docs-header p {
  font-size: 1.0625rem;
  color: var(--c-muted);
  max-width: 560px;
}

/* ── Sections ──────────────────────────────────────────────── */
.doc-section {
  scroll-margin-top: calc(var(--nav-h) + 1rem);
  margin-bottom: 3.5rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid var(--glass-border);
}

.doc-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

/* ── Prose typography ──────────────────────────────────────── */
.prose h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.03em;
  margin-bottom: 1.25rem;
  color: var(--c-text);
}

.prose h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -.02em;
  margin-top: 2rem;
  margin-bottom: .75rem;
  color: var(--c-text);
}

.prose p {
  color: var(--c-muted);
  margin-bottom: 1rem;
}

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

.prose strong { color: var(--c-text); font-weight: 600; }

.prose ul, .prose ol {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.prose ul { list-style: none; padding-left: 0; }

.prose ul li {
  display: flex;
  gap: .75rem;
  color: var(--c-muted);
}

.prose ul li::before {
  content: '→';
  color: var(--c-cyan);
  font-size: .875rem;
  flex-shrink: 0;
  margin-top: .1rem;
}

.prose ol { list-style: decimal; }
.prose ol li { color: var(--c-muted); padding-left: .25rem; }
.prose ol li::marker { color: var(--c-cyan); font-weight: 600; }

.prose blockquote {
  margin: 1.25rem 0;
  padding: 1rem 1.25rem;
  background: rgba(0, 212, 255, .05);
  border-left: 3px solid var(--c-cyan);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--c-muted);
  font-size: .9375rem;
}

.prose blockquote p { margin-bottom: 0; color: inherit; }

.prose code {
  font-family: 'SF Mono', 'Fira Code', 'Fira Mono', 'Roboto Mono', monospace;
  font-size: .875em;
  background: rgba(255, 255, 255, .06);
  border: 1px solid var(--glass-border);
  border-radius: 4px;
  padding: .15em .4em;
  color: var(--c-cyan);
}

/* ── Steps ─────────────────────────────────────────────────── */
.steps {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin: 1.25rem 0;
}

.step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.step__num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  color: #fff;
  margin-top: .1rem;
}

.step__text { color: var(--c-muted); }
.step__text strong { color: var(--c-text); }

/* ── Tables ────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: 1.25rem 0; border-radius: var(--r); }

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

thead tr {
  background: var(--glass-bg);
  border-bottom: 1px solid var(--glass-border);
}

th {
  text-align: left;
  padding: .65rem 1rem;
  font-weight: 600;
  font-size: .8125rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--c-muted);
  white-space: nowrap;
}

td {
  padding: .65rem 1rem;
  color: var(--c-muted);
  border-bottom: 1px solid var(--glass-border);
  vertical-align: top;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--glass-bg); }

td code { font-size: .8125rem; }

td strong { color: var(--c-text); }

/* ── Quick-start card ──────────────────────────────────────── */
.qs-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.qs-card__title {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-cyan);
  margin-bottom: 1rem;
}

/* ── FAQ ───────────────────────────────────────────────────── */
.faq { display: flex; flex-direction: column; gap: 1rem; }

.faq-item {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  overflow: hidden;
  transition: border-color .2s;
}

.faq-item:hover { border-color: rgba(0, 212, 255, .25); }

.faq-q {
  width: 100%;
  text-align: left;
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: .9375rem;
  font-weight: 600;
  color: var(--c-text);
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--font);
}

.faq-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s, border-color .2s, transform .25s;
  color: var(--c-cyan);
  font-size: 1rem;
  line-height: 1;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
  background: rgba(0, 212, 255, .1);
  border-color: rgba(0, 212, 255, .3);
}

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
}

.faq-item.open .faq-a {
  max-height: 300px;
}

.faq-a-inner {
  padding: 0 1.25rem 1rem;
  font-size: .9375rem;
  color: var(--c-muted);
  line-height: 1.65;
}

/* ── Warning / info callout ────────────────────────────────── */
.callout {
  display: flex;
  gap: .875rem;
  align-items: flex-start;
  background: rgba(139, 92, 246, .08);
  border: 1px solid rgba(139, 92, 246, .25);
  border-radius: var(--r);
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  font-size: .9375rem;
  color: var(--c-muted);
}

.callout--warn {
  background: rgba(192, 38, 211, .07);
  border-color: rgba(192, 38, 211, .25);
}

.callout__icon { font-size: 1.125rem; flex-shrink: 0; margin-top: .05rem; }
.callout p { margin-bottom: 0; color: inherit; }

/* ── Protocol cards ────────────────────────────────────────── */
.protocol-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.25rem 0;
}

.protocol-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--r);
  padding: 1.25rem;
  transition: border-color .2s;
}

.protocol-card:hover { border-color: rgba(0, 212, 255, .3); }

.protocol-card__name {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: .375rem;
  color: var(--c-cyan);
}

.protocol-card__desc {
  font-size: .875rem;
  color: var(--c-muted);
  line-height: 1.55;
}

/* ── Footer ────────────────────────────────────────────────── */
.docs-footer {
  margin-top: 5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.docs-footer__copy {
  font-size: .8125rem;
  color: var(--c-faint);
}

.docs-footer__links {
  display: flex;
  gap: 1.25rem;
}

.docs-footer__links a {
  font-size: .8125rem;
  color: var(--c-muted);
  transition: color .2s;
}

.docs-footer__links a:hover { color: var(--c-text); }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
    max-height: none;
    overflow-y: visible;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--r);
    padding: 1rem 1.25rem;
  }

  .sidebar-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .25rem;
  }
}

@media (max-width: 600px) {
  .docs-wrapper { padding-top: calc(var(--nav-h) + 1.5rem); }

  .sidebar-nav { grid-template-columns: 1fr; }

  .protocol-grid { grid-template-columns: 1fr; }

  .docs-footer { flex-direction: column; align-items: flex-start; }

  .nav__back span { display: none; }

  .nav__brand span { display: none; }

  .btn--ghost { display: none; }
}
