:root {
  --bg: #060E1A; --bg-2: #0A1525; --surface: #0C1829; --surface-2: #0F1F35;
  --border: rgba(255,255,255,0.07); --border-strong: rgba(255,255,255,0.12);
  --text: #F2F5F9; --text-2: #9CA3AF; --text-3: #5C6478;
  --emerald: #00D693; --neon-green: #00E5A0; --neon-blue: #4DB8FF; --gold: #FFD666;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.75; -webkit-font-smoothing: antialiased;
}
html[dir="rtl"] body { font-family: 'Amiri', 'Inter', serif; }
a { color: var(--emerald); text-decoration: none; }
a:hover { text-decoration: underline; }
#space-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
body::before {
  content: ''; position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(800px 500px at 50% -10%, rgba(0,214,147,0.12), transparent 70%),
    radial-gradient(700px 600px at 88% 8%, rgba(77,184,255,0.08), transparent 70%),
    radial-gradient(650px 600px at 8% 35%, rgba(122,80,200,0.06), transparent 70%);
}
.orbs { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.45; will-change: transform; }
.orb.g { width: 480px; height: 480px; top: -120px; left: -100px; background: radial-gradient(circle, rgba(0,229,160,0.32), transparent 65%); animation: drift1 26s ease-in-out infinite; }
.orb.b { width: 460px; height: 460px; top: 30%; right: -140px; background: radial-gradient(circle, rgba(77,184,255,0.26), transparent 65%); animation: drift2 32s ease-in-out infinite; }
.orb.p { width: 560px; height: 560px; bottom: -200px; left: 30%; background: radial-gradient(circle, rgba(140,90,220,0.20), transparent 65%); animation: drift3 38s ease-in-out infinite; }
@keyframes drift1 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(60px,40px)} }
@keyframes drift2 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(-50px,60px)} }
@keyframes drift3 { 0%,100%{transform:translate(0,0)} 50%{transform:translate(40px,-50px)} }
@media (prefers-reduced-motion: reduce) { .orb { animation: none; } }

/* Nav */
nav { position: sticky; top: 0; z-index: 100; background: rgba(6,14,26,0.78); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: 860px; margin: 0 auto; padding: 0 24px; height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; border-radius: 9px; }
.nav-right { display: flex; align-items: center; gap: 18px; }
.back-home { color: var(--text-2); font-size: 14px; font-weight: 500; }
.back-home:hover { color: var(--text); text-decoration: none; }
.lang-switch { display: flex; gap: 2px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.lang-switch button { background: none; border: none; color: var(--text-2); font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 7px; cursor: pointer; transition: all .2s; font-family: inherit; }
.lang-switch button.active { background: var(--emerald); color: #06210F; }
.lang-switch button:hover:not(.active) { color: var(--text); }

/* Doc */
.doc { max-width: 760px; margin: 0 auto; padding: 56px 24px 80px; }
.doc h1 { font-size: clamp(30px, 5vw, 44px); font-weight: 800; letter-spacing: -1px; margin-bottom: 8px;
  background: linear-gradient(180deg, #fff, #DCEEFF 60%, var(--neon-blue)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.doc .updated { color: var(--text-3); font-size: 14px; margin-bottom: 32px; }
.doc h2 { color: var(--neon-blue); font-size: 21px; font-weight: 700; margin: 38px 0 12px; }
.doc h3 { color: var(--text); font-size: 16px; font-weight: 600; margin: 20px 0 6px; }
.doc p { color: var(--text-2); font-size: 15.5px; margin-bottom: 14px; }
.doc ul { list-style: none; margin-bottom: 14px; }
.doc li { color: var(--text-2); font-size: 15.5px; padding: 4px 0 4px 22px; position: relative; }
.doc li::before { content: '✓'; position: absolute; inset-inline-start: 0; color: var(--emerald); font-weight: 700; }
html[dir="rtl"] .doc li { padding: 4px 22px 4px 0; }
.doc .note { background: rgba(0,214,147,0.08); border: 1px solid rgba(0,229,160,0.25); border-radius: 14px; padding: 18px 20px; margin: 0 0 28px; color: var(--text); font-size: 15px; }
.doc .warn { background: rgba(255,214,102,0.07); border: 1px solid rgba(255,214,102,0.28); border-radius: 14px; padding: 16px 20px; margin: 14px 0; color: var(--text); font-size: 15px; }
.doc table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; }
.doc th, .doc td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.doc th { color: var(--neon-blue); font-weight: 600; }
.doc td { color: var(--text-2); }
.doc .tbl-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; margin: 14px 0; }
.doc .tbl-wrap table { margin: 0; }

/* Footer */
footer { border-top: 1px solid var(--border); padding: 36px 24px; }
.foot-inner { max-width: 760px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.foot-links { display: flex; gap: 24px; flex-wrap: wrap; }
.foot-links a { color: var(--text-2); font-size: 14px; }
.foot-links a:hover { color: var(--emerald); }
.foot-copy { color: var(--text-3); font-size: 13px; }
