@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Orbitron:wght@400;700;900&family=Syne:wght@300;400;600;700&display=swap');

:root {
  --bg: #040609;
  --bg2: #080c14;
  --panel: #0b1020;
  --panel2: #0e1628;
  --border: #182038;
  --border2: #1f2d4a;
  --accent: #5865F2;
  --accent-dim: rgba(88,101,242,0.15);
  --accent2: #57F287;
  --accent3: #FEE75C;
  --accent4: #EB459E;
  --text: #dce4ff;
  --text2: #8a99c8;
  --muted: #3d4d6e;
  --danger: #ED4245;
  --success: #57F287;
  --warn: #FEE75C;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Syne', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  cursor: default;
}

/* Background grid */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(88,101,242,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88,101,242,0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: 0;
}

/* Noise texture */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* Orbs */
.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
  animation: orbFloat 10s ease-in-out infinite;
}
.orb-a { width: 500px; height: 500px; background: rgba(88,101,242,0.1); top: -150px; left: -150px; }
.orb-b { width: 350px; height: 350px; background: rgba(87,242,135,0.06); bottom: 0; right: 5%; animation-delay: 4s; }
.orb-c { width: 250px; height: 250px; background: rgba(235,69,158,0.06); top: 40%; right: -80px; animation-delay: 7s; }

@keyframes orbFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-40px) scale(1.05); }
}

/* ─── NAVBAR ─── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 0 40px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(4,6,9,0.85);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.nav-logo-icon {
  width: 38px; height: 38px;
  background: var(--accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: 0 0 20px rgba(88,101,242,0.5);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.nav-logo-icon img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 10px;
  position: absolute; inset: 0;
}

.nav-logo-text {
  font-family: 'Orbitron', monospace;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #fff 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-logo-sub {
  font-family: 'Share Tech Mono', monospace;
  font-size: 9px;
  color: var(--accent2);
  letter-spacing: 3px;
  display: block;
  margin-top: 1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  letter-spacing: 1px;
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text2);
  transition: all 0.2s;
  border: 1px solid transparent;
}

.nav-link:hover { color: var(--text); background: var(--panel); border-color: var(--border); }
.nav-link.active { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }

.nav-btn {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  letter-spacing: 1px;
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: none;
  display: inline-flex; align-items: center; gap: 6px;
}

.nav-btn-primary { background: var(--accent); color: white; box-shadow: 0 0 20px rgba(88,101,242,0.3); }
.nav-btn-primary:hover { background: #6875f5; box-shadow: 0 0 28px rgba(88,101,242,0.5); transform: translateY(-1px); }
.nav-btn-ghost { background: transparent; color: var(--text2); border: 1px solid var(--border); }
.nav-btn-ghost:hover { color: var(--text); border-color: var(--border2); }

/* ─── FOOTER ─── */
.footer {
  position: relative;
  z-index: 5;
  border-top: 1px solid var(--border);
  padding: 40px;
  margin-top: 80px;
  background: rgba(4,6,9,0.9);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.footer-brand {
  font-family: 'Orbitron', monospace;
  font-size: 14px;
  font-weight: 900;
  color: var(--text2);
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-link {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-link:hover { color: var(--accent); }

.footer-copy {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  width: 100%;
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ─── CONTAINERS ─── */
.page-wrap {
  position: relative;
  z-index: 5;
  padding-top: 80px;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* ─── PANELS ─── */
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.panel:hover { border-color: var(--border2); }

.panel-glow:hover {
  border-color: rgba(88,101,242,0.4);
  box-shadow: 0 0 30px rgba(88,101,242,0.08);
}

.panel::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(88,101,242,0.5), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.panel:hover::before { opacity: 1; }

.panel-title {
  font-family: 'Orbitron', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: blink 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* ─── FORMS ─── */
.form-group { margin-bottom: 18px; }

label, .label {
  display: block;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  color: var(--text2);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text);
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
  outline: none;
  transition: all 0.2s;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
  background: rgba(88,101,242,0.05);
  box-shadow: 0 0 0 3px rgba(88,101,242,0.1);
}

input::placeholder, textarea::placeholder { color: var(--muted); }
select option { background: #0d1226; }
textarea { resize: vertical; min-height: 90px; line-height: 1.6; }

/* ─── BUTTONS ─── */
.btn {
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
  letter-spacing: 1px;
  padding: 12px 24px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.25s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 20px rgba(88,101,242,0.35);
}
.btn-primary:hover { background: #6875f5; transform: translateY(-2px); box-shadow: 0 6px 28px rgba(88,101,242,0.5); }

.btn-success { background: rgba(87,242,135,0.15); color: var(--accent2); border: 1px solid rgba(87,242,135,0.3); }
.btn-success:hover { background: rgba(87,242,135,0.25); }

.btn-danger { background: rgba(237,66,69,0.15); color: var(--danger); border: 1px solid rgba(237,66,69,0.3); }
.btn-danger:hover { background: rgba(237,66,69,0.25); }

.btn-ghost { background: transparent; color: var(--text2); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); border-color: var(--border2); }

.btn-large { font-size: 14px; padding: 15px 36px; letter-spacing: 2px; font-family: 'Orbitron', monospace; font-weight: 700; }

.btn-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.btn-icon:hover { border-color: var(--danger); color: var(--danger); background: rgba(237,66,69,0.1); }
.btn-icon.add:hover { border-color: var(--accent2); color: var(--accent2); background: rgba(87,242,135,0.1); }

/* ─── CHECKBOXES ─── */
.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.check-row:hover { border-color: var(--accent); background: var(--accent-dim); }
.check-row input { display: none; }

.check-box {
  width: 18px; height: 18px;
  border: 2px solid var(--muted);
  border-radius: 5px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
  font-size: 11px;
}

.check-row input:checked ~ .check-box {
  background: var(--accent);
  border-color: var(--accent);
}

.check-row input:checked ~ .check-box::after { content: '✓'; color: white; font-weight: bold; }

.check-label {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  color: var(--text);
  letter-spacing: 0.5px;
}

/* ─── TABS ─── */
.tab-row {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}

.tab-btn {
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px;
  letter-spacing: 1px;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.2s;
}

.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-btn:hover:not(.active) { color: var(--text2); }

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.2s ease; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ─── ALERTS ─── */
.alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}

.alert.show { display: flex; align-items: center; gap: 8px; }
.alert-error { background: rgba(237,66,69,0.1); border: 1px solid rgba(237,66,69,0.3); color: var(--danger); }
.alert-success { background: rgba(87,242,135,0.1); border: 1px solid rgba(87,242,135,0.3); color: var(--accent2); }

/* ─── TOAST ─── */
.toast {
  position: fixed;
  bottom: 28px; right: 28px;
  background: var(--panel2);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 14px 20px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
  color: var(--text);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  z-index: 9999;
  transform: translateY(80px);
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  max-width: 320px;
}

.toast.show { transform: translateY(0); opacity: 1; }
.toast-success { border-color: rgba(87,242,135,0.4); color: var(--accent2); }
.toast-error { border-color: rgba(237,66,69,0.4); color: var(--danger); }

/* ─── GRID ─── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.full { grid-column: 1 / -1; }

@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }
@media (max-width: 768px) {
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .navbar { padding: 0 20px; }
  .container { padding: 24px 16px; }
  .footer { padding: 24px 20px; }
  .nav-links .nav-link { display: none; }
}

/* ─── CODE BLOCK ─── */
.code-wrap {
  background: #02040a;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(88,101,242,0.06);
  border-bottom: 1px solid var(--border);
}

.code-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.traffic-lights { display: flex; gap: 6px; }
.tl { width: 12px; height: 12px; border-radius: 50%; }
.tl-r { background: #ff5f56; } .tl-y { background: #ffbd2e; } .tl-g { background: #27c93f; }

.code-body {
  padding: 24px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 13px;
  line-height: 1.8;
  color: #c9d1ff;
  overflow-x: auto;
  max-height: 550px;
  overflow-y: auto;
  white-space: pre;
}

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

/* ─── BADGE ─── */
.badge {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  padding: 3px 9px;
  border-radius: 20px;
  letter-spacing: 1px;
}

.badge-beta { background: rgba(254,231,92,0.1); color: var(--accent3); border: 1px solid rgba(254,231,92,0.25); }
.badge-new { background: rgba(87,242,135,0.1); color: var(--accent2); border: 1px solid rgba(87,242,135,0.25); }
.badge-pro { background: rgba(88,101,242,0.1); color: var(--accent); border: 1px solid rgba(88,101,242,0.25); }

/* ─── DRAG & DROP ─── */
.drag-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: grab;
  transition: all 0.2s;
  user-select: none;
}

.drag-item:active { cursor: grabbing; }
.drag-item.dragging { opacity: 0.4; border-style: dashed; }
.drag-item.drag-over { border-color: var(--accent); background: var(--accent-dim); }

.drag-handle {
  color: var(--muted);
  font-size: 16px;
  cursor: grab;
  flex-shrink: 0;
}

/* ─── EMBED PREVIEW ─── */
.embed-preview {
  border-left: 4px solid var(--accent);
  background: rgba(30,31,34,0.8);
  border-radius: 0 8px 8px 0;
  padding: 14px 16px;
  position: relative;
}

.ep-author { font-size: 12px; color: #b9beff; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.ep-author-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); }
.ep-title { font-weight: 700; font-size: 14px; color: #7289ff; margin-bottom: 6px; }
.ep-desc { font-size: 13px; color: #dcddde; line-height: 1.5; margin-bottom: 10px; }
.ep-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.ep-field { background: rgba(255,255,255,0.03); padding: 8px 10px; border-radius: 5px; }
.ep-field-name { font-size: 11px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.ep-field-val { font-size: 12px; color: var(--text2); }
.ep-footer { font-size: 11px; color: var(--muted); font-family: 'Share Tech Mono', monospace; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 8px; margin-top: 6px; }
.ep-img { width: 100%; border-radius: 6px; margin: 8px 0; max-height: 150px; object-fit: cover; }
.ep-thumb { width: 80px; height: 80px; border-radius: 8px; object-fit: cover; position: absolute; top: 14px; right: 14px; }

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open { display: flex; animation: fadeIn 0.2s ease; }

.modal {
  background: var(--panel);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 32px;
  max-width: 480px;
  width: 100%;
  position: relative;
  box-shadow: 0 24px 80px rgba(0,0,0,0.6);
}

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  transition: color 0.2s;
}

.modal-close:hover { color: var(--danger); }

/* ─── MISC ─── */
.text-muted { color: var(--text2); }
.text-accent { color: var(--accent); }
.text-success { color: var(--accent2); }
.text-danger { color: var(--danger); }
.mono { font-family: 'Share Tech Mono', monospace; }
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
