/* ============================================================
   style.css — JMATHCODE CyberNexa Academy custom styles
   Tailwind handles utilities; this file holds the cyberpunk
   theme tokens, effects, components and responsive polish.
   ============================================================ */

:root {
  --neon-green: #39FF14;
  --matrix-green: #00FF41;
  --dark-blue: #000080;
  --purple: #8A2BE2;
  --cyber-purple: #8A2BE2;
  --cyber-pink: #FF2A6D;
  --bg-black: #030405;
  --panel: #050705;
}

* { scrollbar-color: var(--neon-green) #000; scrollbar-width: thin; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: var(--neon-green); border-radius: 8px; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Orbitron', sans-serif;
  color: var(--neon-green);
  background-color: var(--bg-black);
  overflow-x: hidden;
}

.font-body { font-family: 'Rajdhani', 'Orbitron', sans-serif; }

/* ---------- Neon text & glow ---------- */
.neon-text-shadow {
  text-shadow: 0 0 5px var(--neon-green), 0 0 10px var(--neon-green), 0 0 15px var(--dark-blue), 0 0 20px var(--dark-blue);
}
.neon-glow-hover:hover {
  box-shadow: 0 0 5px var(--neon-green), 0 0 10px var(--neon-green), 0 0 15px var(--dark-blue);
  transform: translateY(-2px);
}
.neon-button-glow { box-shadow: 0 0 5px var(--neon-green), 0 0 10px var(--neon-green); }
.neon-button-glow:hover { box-shadow: 0 0 10px var(--neon-green), 0 0 20px var(--neon-green), 0 0 30px var(--dark-blue); }

/* ---------- Cards ---------- */
.card-glow {
  border: 1px solid rgba(57, 255, 20, 0.35);
  background: linear-gradient(180deg, rgba(15, 22, 15, 0.65), rgba(0, 0, 0, 0.65));
  backdrop-filter: blur(6px);
  transition: all 0.3s ease-in-out;
}
.card-glow:hover {
  border-color: var(--neon-green);
  box-shadow: 0 0 15px rgba(57, 255, 20, 0.35), 0 0 25px rgba(0, 0, 128, 0.35);
  transform: translateY(-5px);
}

/* ---------- Blinking cursor (Gemini typing) ---------- */
.blinking-cursor::after { content: '|'; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: 0; } }

.gemini-response { white-space: pre-wrap; text-align: left; }

#matrix-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; opacity: 0.45; }

/* ---------- Modals ---------- */
.modal {
  position: fixed; inset: 0; background-color: rgba(0, 0, 0, 0.85);
  display: flex; align-items: center; justify-content: center; z-index: 100;
  padding: 1rem;
}
.modal-content {
  background-color: var(--panel); border: 1px solid var(--neon-green);
  padding: 2rem; border-radius: 1rem; max-width: 640px; width: 100%;
  position: relative; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 0 40px rgba(57,255,20,0.15);
}
.close-btn { position: absolute; top: 1rem; right: 1.25rem; color: var(--neon-green); font-size: 1.5rem; cursor: pointer; }

.hidden { display: none; }
#lightbox.hidden { display: none; }

/* ---------- Auth tabs ---------- */
.auth-tab { transition: all 0.25s ease; }

/* ---------- Text gradient accent ---------- */
.text-gradient-cyber {
  background: linear-gradient(90deg, var(--neon-green), var(--cyber-pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Skeleton pulse ---------- */
.skeleton { animation: pulse 1.5s ease-in-out infinite; background: rgba(57,255,20,0.08); border-radius: 0.5rem; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

input, textarea, select { color: #e6ffe6; }
input::placeholder, textarea::placeholder { color: #4a6b4a; }

/* ---------- Navbar links ---------- */
.nav-link, .mobile-nav-link { position: relative; }
.nav-link.active, .mobile-nav-link.active { color: #22d3ee; }

/* ---------- Buttons ---------- */
.btn-neon {
  background: var(--neon-green); color: #000; font-weight: 700;
  border-radius: 0.5rem; transition: all 0.25s ease;
}
.btn-neon:hover { opacity: 0.85; }
.btn-outline {
  border: 2px solid var(--neon-green); color: var(--neon-green);
  border-radius: 0.5rem; transition: all 0.25s ease;
}
.btn-outline:hover { background: var(--neon-green); color: #000; }

/* ---------- Online badge ---------- */
.online-dot { width: 8px; height: 8px; border-radius: 9999px; background: var(--neon-green); animation: ping 1.4s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(57,255,20,0.7); } 70% { box-shadow: 0 0 0 8px rgba(57,255,20,0); } 100% { box-shadow: 0 0 0 0 rgba(57,255,20,0); } }

/* ---------- Post composer ---------- */
.composer textarea { background: #000; border: 2px solid rgba(57,255,20,0.5); border-radius: 0.75rem; }
.composer textarea:focus { outline: none; border-color: var(--neon-green); box-shadow: 0 0 10px rgba(57,255,20,0.3); }

/* ---------- Blog content ---------- */
.blog-content { line-height: 1.9; color: #d1fae5; }
.blog-content h2 { font-size: 1.5rem; font-weight: 700; margin: 1.2rem 0 0.6rem; color: var(--purple); }
.blog-content p { margin-bottom: 1rem; }
.blog-content a { color: var(--neon-green); text-decoration: underline; }
.blog-content ul { list-style: disc; padding-left: 1.4rem; margin-bottom: 1rem; }
.blog-content code { background: #0b1f0b; padding: 0.1rem 0.35rem; border-radius: 0.25rem; color: #a7f3d0; }

/* ---------- Image lightbox ---------- */
#lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.92); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 1.5rem; }
#lightbox img { max-width: 95vw; max-height: 90vh; border-radius: 0.75rem; border: 1px solid var(--neon-green); }

/* ---------- Admin dashboard ---------- */
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.admin-sidebar { background: linear-gradient(180deg, #04140a, #020402); border-right: 1px solid rgba(57,255,20,0.25); padding: 1.25rem; }
.admin-nav-btn { display: flex; align-items: center; gap: 0.6rem; width: 100%; text-align: left; padding: 0.7rem 0.9rem; border-radius: 0.6rem; color: #b9f6c8; transition: all 0.2s ease; }
.admin-nav-btn:hover { background: rgba(57,255,20,0.12); }
.admin-nav-btn.active { background: var(--neon-green); color: #000; font-weight: 700; }
.stat-card { border: 1px solid rgba(57,255,20,0.3); border-radius: 1rem; padding: 1.25rem; background: linear-gradient(180deg, rgba(15,22,15,0.6), rgba(0,0,0,0.6)); }
.stat-card .num { font-size: 2rem; font-weight: 800; color: var(--neon-green); }

@media (max-width: 768px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { display: flex; overflow-x: auto; gap: 0.5rem; border-right: none; border-bottom: 1px solid rgba(57,255,20,0.25); }
  .admin-nav-btn { width: auto; white-space: nowrap; }
}

/* ---------- Table ---------- */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { padding: 0.6rem 0.75rem; border-bottom: 1px solid rgba(57,255,20,0.15); text-align: left; }
.tbl th { color: var(--neon-green); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }

/* ---------- Toast ---------- */
#toast-wrap { position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 300; display: flex; flex-direction: column; gap: 0.5rem; }
.toast { background: #04140a; border: 1px solid var(--neon-green); color: #d1fae5; padding: 0.75rem 1rem; border-radius: 0.6rem; box-shadow: 0 0 20px rgba(57,255,20,0.2); animation: slideIn 0.25s ease; }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card-glow, .neon-glow-hover { transition: none; }
  #matrix-canvas { display: none; }
}
