:root{
  --bg-dark:#050505;
  --bg-dark-2:#0b0b0b;
  --text:#eaeaea;
  --muted:#9aa0a6;
  --card:#101010;
  --stroke:#1e1e1e;
  --accent:#e3ff00;

  --bg-light:#ffffff;
  --text-dark:#141414;
  --muted-dark:#5f6368;
  --card-light:#f7f7f8;
  --stroke-light:#e7e7ea;

  --radius:18px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --shadow-light: 0 12px 30px rgba(0,0,0,.08);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji","Segoe UI Emoji";
  line-height:1.45;
}

/* Page themes */
body.theme-dark{
  background: radial-gradient(1200px 700px at 10% -10%, rgba(227,255,0,.14), transparent 55%),
              radial-gradient(900px 600px at 95% 10%, rgba(227,255,0,.08), transparent 60%),
              var(--bg-dark);
  color:var(--text);
}
body.theme-light{
  background: var(--bg-light);
  color: var(--text-dark);
}

/* Layout */
.container{
  width:min(1200px, 92vw);
  margin:0 auto;
  padding: 24px 0 92px; /* bottom padding for navbar */
}
.page-title{
  display:flex; align-items:center; justify-content:space-between;
  gap:16px; margin:10px 0 18px;
}
.h1{font-size: clamp(26px, 3vw, 40px); margin:0}
.sub{margin:6px 0 0; color: var(--muted); max-width: 70ch}
body.theme-light .sub{color: var(--muted-dark)}

.badge{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 12px; border-radius:999px;
  border:1px solid var(--stroke); background: rgba(255,255,255,.02);
  color: var(--muted);
}
body.theme-light .badge{
  border:1px solid var(--stroke-light);
  background: var(--card-light);
  color: var(--muted-dark);
}

.grid{
  display:grid;
  grid-template-columns: repeat(12, 1fr);
  gap:14px;
}
.card{
  border-radius: var(--radius);
  border:1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
  box-shadow: var(--shadow);
  overflow:hidden;
}
body.theme-light .card{
  border:1px solid var(--stroke-light);
  background: var(--bg-light);
  box-shadow: var(--shadow-light);
}

.card-inner{padding:16px}
.kicker{font-size:12px; letter-spacing:.12em; text-transform:uppercase; color: var(--muted)}
body.theme-light .kicker{color: var(--muted-dark)}
.title{font-size:18px; margin:8px 0 6px}
.small{color: var(--muted); font-size:14px}
body.theme-light .small{color: var(--muted-dark)}

.btn{
  appearance:none; border:1px solid var(--stroke);
  background: rgba(255,255,255,.03);
  color: var(--text);
  padding:10px 14px;
  border-radius: 12px;
  cursor:pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
  display:inline-flex; align-items:center; gap:10px;
  text-decoration:none;
}
.btn:hover{transform: translateY(-1px); border-color: rgba(227,255,0,.55)}
.btn:active{transform: translateY(0px) scale(.99)}
.btn-accent{
  background: var(--accent);
  color:#0a0a0a;
  border-color: rgba(227,255,0,.8);
  font-weight:700;
}
.btn-ghost{
  background: transparent;
}
body.theme-light .btn{
  border:1px solid var(--stroke-light);
  background: #fff;
  color: var(--text-dark);
}
body.theme-light .btn-ghost{background: transparent}

.input, .select{
  width:100%;
  padding:12px 12px;
  border-radius: 12px;
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.03);
  color: var(--text);
  outline:none;
}
body.theme-light .input, body.theme-light .select{
  border:1px solid var(--stroke-light);
  background: #fff;
  color: var(--text-dark);
}
.input:focus, .select:focus{border-color: rgba(227,255,0,.6)}

.row{display:flex; gap:12px; flex-wrap:wrap; align-items:center}
.spacer{height:14px}

/* Hero */
.hero{
  border-radius: calc(var(--radius) + 8px);
  border:1px solid var(--stroke);
  background:
    radial-gradient(900px 300px at 30% 10%, rgba(227,255,0,.18), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  padding: 18px;
}
.hero .hero-grid{
  display:grid; grid-template-columns: 1.3fr .7fr; gap:14px;
}
@media (max-width: 860px){
  .hero .hero-grid{grid-template-columns: 1fr}
}
.hero .stat{
  border:1px solid var(--stroke);
  background: rgba(0,0,0,.22);
  border-radius: var(--radius);
  padding:14px;
}

/* Articles listing cards */
.tool-card{
  grid-column: span 4;
}
@media (max-width: 980px){
  .tool-card{grid-column: span 6}
}
@media (max-width: 560px){
  .tool-card{grid-column: span 12}
}
.tool-top{
  display:flex; justify-content:space-between; gap:12px; align-items:flex-start;
}
.pill{
  font-size:12px; padding:6px 10px; border-radius:999px;
  border:1px solid var(--stroke);
  color: var(--muted);
}
body.theme-light .pill{
  border:1px solid var(--stroke-light);
  color: var(--muted-dark);
}

/* Article page */
.article-wrap{
  display:grid; grid-template-columns: 1fr 320px; gap:18px;
  align-items:start;
}
@media (max-width: 980px){
  .article-wrap{grid-template-columns: 1fr}
}
.article{
  padding: 18px;
}
.article h2{margin: 18px 0 10px}
.article p, .article li{color:#1f1f1f}
body.theme-dark .article p, body.theme-dark .article li{color: var(--text)}
.ad-box{
  border:1px dashed rgba(0,0,0,.25);
  background: #fbfbfd;
  border-radius: 14px;
  padding: 16px;
  color:#444;
}
body.theme-light .ad-box{box-shadow: var(--shadow-light)}
.ad-label{font-size:12px; letter-spacing:.12em; text-transform:uppercase; color:#6b7280}
.side{
  position: sticky; top: 18px;
  display:flex; flex-direction:column; gap:12px;
}

/* Premium layout */
.premium-layout{
  display:grid;
  grid-template-columns: 280px 1fr;
  gap:14px;
}
@media (max-width: 980px){
  .premium-layout{grid-template-columns: 1fr}
}
.sidebar{
  border-radius: var(--radius);
  border:1px solid var(--stroke);
  background: rgba(0,0,0,.28);
  padding:14px;
}
.sidebar h3{margin:6px 0 10px}
.sidebar .filter{display:flex; flex-direction:column; gap:10px}
.content{
  border-radius: var(--radius);
  border:1px solid var(--stroke);
  background: rgba(0,0,0,.18);
  padding:14px;
}
.lesson{
  border:1px solid var(--stroke);
  background: rgba(255,255,255,.02);
  border-radius: 14px;
  padding:12px;
  display:flex; justify-content:space-between; gap:12px;
  align-items:flex-start;
}
.progress{
  height:10px;
  background: rgba(255,255,255,.06);
  border-radius:999px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.08);
}
.progress > div{
  height:100%;
  width: 35%;
  background: var(--accent);
}

/* Bottom nav (always visible) */
.bottom-nav{
  position: fixed;
  left:0; right:0; bottom:0;
  height: 74px;
  display:flex;
  justify-content:center;
  z-index: 9999;
  backdrop-filter: blur(12px);
}
.bottom-nav .nav-inner{
  width:min(1100px, 100vw);
  display:grid;
  grid-template-columns: repeat(5, 1fr);
  align-items:stretch;
  border-top: 1px solid var(--stroke);
  background: rgba(0,0,0,.72);
}
body.theme-light .bottom-nav .nav-inner{
  border-top:1px solid var(--stroke-light);
  background: rgba(255,255,255,.92);
}
.nav-item{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:6px;
  text-decoration:none;
  color: rgba(255,255,255,.78);
  font-size: 12px;
  transition: transform .12s ease, color .12s ease;
}
body.theme-light .nav-item{color: rgba(20,20,20,.62)}
.nav-item svg{width:22px; height:22px; opacity:.92}
.nav-item:hover{transform: translateY(-1px)}
.nav-item.active{
  color: var(--accent);
}
.nav-item.active svg{filter: drop-shadow(0 0 10px rgba(227,255,0,.22))}
.nav-item .dot{
  width:6px; height:6px; border-radius:999px;
  background: transparent;
}
.nav-item.active .dot{background: var(--accent)}

/* Tiny helpers */
.hr{height:1px; background: var(--stroke); margin: 12px 0}
body.theme-light .hr{background: var(--stroke-light)}
.hidden{display:none !important}