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

:root{
  --bg: #000321;
  --surface: #05083d;
  --surface2: #080c4a;
  --accent: #ff638c;
  --accent2: #7fffb2;
  --text: #e8e8f5;
  --muted: #7878a0;
  --border: rgba(255,99,140,0.2);
  --code-bg: #02041a;
}

*{ margin:0; padding:0; box-sizing:border-box; border-radius:0; }
html{ scroll-behavior:smooth; }

body{
  font-family: 'Inter', Consolas, sans-serif;
  font-size: 15px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar{ width:5px; height:5px; }
::-webkit-scrollbar-track{ background:var(--bg); }
::-webkit-scrollbar-thumb{ background:var(--accent); border-radius:3px; }

/* ── HEADER ── */
header{
  position: relative;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
#logo{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
  z-index: 0;
}
.con{
  position: relative;
  z-index: 10;
  text-align: center;
}
.con h1{
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 800;
  color: white;
  letter-spacing: -2px;
  margin-bottom: 8px;
}
.con p{
  color: var(--muted);
  font-size: 1.1rem;
  margin-bottom: 28px;
  max-width: 480px;
}
.con-btns{ display:flex; gap:14px; justify-content:center; flex-wrap:wrap; }
.con-btns a{
  display: inline-block;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-primary{
  background: var(--accent);
  color: white;
  border: 2px solid var(--accent);
}
.btn-primary:hover{ background: #e0405f; }
.btn-secondary{
  background: transparent;
  color: var(--text);
  border: 2px solid rgba(255,255,255,0.25);
}
.btn-secondary:hover{ border-color: var(--accent2); color: var(--accent2); }

/* ── NAV ── */
nav{
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
}
nav ul{
  list-style: none;
  display: flex;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
  height: 52px;
  gap: 4px;
}
nav ul li a{
  display: block;
  padding: 6px 14px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.15s;
}
nav ul li a:hover{ color: var(--text); background: var(--surface); }
nav ul li.active a{ color: var(--accent); }
.nav-spacer{ flex: 1; }
.nav-burger{
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  display: none;
}

/* ── ASIDE ── */
aside{
  position: fixed;
  left: 0; top: 52px; bottom: 0;
  width: 260px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  z-index: 500;
  display: none;
  padding: 16px 0 40px;
}
aside.open{ display: block; }
aside ul{ list-style: none; display: block; }
aside ul li{
  border-bottom: 1px solid var(--border);
}
aside ul li a{
  display: block;
  padding: 10px 20px;
  color: #9090b8;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
}
aside ul li a:hover{ color: var(--accent2); background: rgba(127,255,178,0.05); }

/* ── MAIN ── */
main{
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}
main > h1{
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 24px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

/* ── FIELDSET / CARD ── */
fieldset{
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
  background: var(--surface);
  display: block;
}
fieldset legend{
  padding: 0 12px;
  margin-left: 16px;
}
legend h2{
  display: inline-block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  padding: 4px 0;
}
article{
  padding: 20px 24px;
}
article > p{
  color: var(--muted);
  margin-bottom: 12px;
  font-size: 14px;
}
blockquote{
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  color: var(--muted);
  font-size: 14px;
}

/* ── DETAILS / SUMMARY ── */
details{ margin-top: 12px; }
summary{
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
  font-size: 13px;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
summary::before{ content: '▶'; font-size: 10px; transition: transform 0.2s; }
details[open] summary::before{ transform: rotate(90deg); }
details > *:not(summary){ margin-top: 14px; }

/* ── CODE / PRE ── */
pre{
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px;
  overflow-x: auto;
  font-family: 'Space Mono', monospace;
  font-size: 12.5px;
  line-height: 1.8;
  color: #b8b8d8;
  margin: 12px 0;
}
code{
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--accent2);
}
pre code{
  background: none;
  border: none;
  padding: 0;
  color: inherit;
  font-size: inherit;
}

/* ── TABLES ── */
table{
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
th{
  background: var(--surface2);
  color: var(--accent2);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
td{
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255,99,140,0.08);
  color: var(--muted);
  vertical-align: top;
}
tr:last-child td{ border-bottom: none; }
tr:hover td{ background: rgba(255,255,255,0.015); }
td b, td code{ color: var(--text); }

/* ── LEVEL BADGES ── */
.lv1{ color: #7fffb2; background: rgba(127,255,178,0.1); border: 1px solid rgba(127,255,178,0.25); }
.lv2{ color: #5b8cff; background: rgba(91,140,255,0.1); border: 1px solid rgba(91,140,255,0.25); }
.lv3{ color: #ffbb6b; background: rgba(255,187,107,0.1); border: 1px solid rgba(255,187,107,0.25); }
.lv4{ color: #ff6b6b; background: rgba(255,107,107,0.1); border: 1px solid rgba(255,107,107,0.25); }
.badge{
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 2px 8px;
  border-radius: 100px;
  text-transform: uppercase;
  margin-left: 8px;
  vertical-align: middle;
}

/* ── CALLOUT ── */
.tip{
  background: rgba(127,255,178,0.06);
  border-left: 3px solid var(--accent2);
  padding: 12px 16px;
  border-radius: 0 6px 6px 0;
  font-size: 13px;
  color: #9dffcc;
  margin: 14px 0;
}
.warn{
  background: rgba(255,187,107,0.06);
  border-left: 3px solid #ffbb6b;
  padding: 12px 16px;
  border-radius: 0 6px 6px 0;
  font-size: 13px;
  color: #ffd494;
  margin: 14px 0;
}

/* ── LINKS ── */
a{ color: var(--accent); text-decoration: none; transition: color 0.15s; }
a:hover{ color: var(--accent2); }
main a{ text-decoration: underline; text-underline-offset: 2px; }

/* ── LISTS ── */
ol, ul{ padding-left: 20px; color: var(--muted); font-size: 14px; }
li{ margin-bottom: 4px; }

/* ── IMAGES in fieldset ── */
picture, fieldset > img{
  display: block;
  background: var(--surface2);
  overflow: hidden;
  max-height: 280px;
}
picture img, fieldset > img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.85;
}

/* ── TUTORIAL GRID ── */
.tut-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 8px;
}
.tut-card{
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  background: var(--surface);
  transition: border-color 0.2s, transform 0.15s;
}
.tut-card:hover{ border-color: var(--accent); transform: translateY(-2px); }
.tut-card h3{ font-size: 1rem; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.tut-card p{ font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.tut-card ol{ font-size: 12.5px; margin-bottom: 14px; }
.tut-card a.start-btn{
  display: inline-block;
  padding: 6px 16px;
  background: var(--accent);
  color: white;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s;
}
.tut-card a.start-btn:hover{ background: #e0405f; }
.lv-dot{
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

/* ── FOOTER ── */
footer{
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: var(--muted);
  flex-wrap: wrap;
}
#fl{
  height: 22px;
  border-radius: 50%;
  vertical-align: middle;
  margin-right: 6px;
}
.footer-logo{ color: var(--accent); font-weight: 700; }

/* ── RESPONSIVE ── */
@media(max-width:750px){
  .tut-grid{ grid-template-columns: 1fr; }
  .nav-burger{ display: block; }
  .con h1{ font-size: 2.4rem; }
}
#tip{
  background: rgba(127,255,178,0.06);
  border-left: 4px solid var(--accent2);
  padding: 14px 18px;
  border-radius: 0 8px 8px 0;
  margin: 14px 0;
  color: #9dffcc;
  font-size: 13.5px;
}
