/* ═══════════════════════════════════════════════
   LYFE PLUGIN STORE — DESIGN SYSTEM
   Theme: Dark Cyberpunk-Minimal
   ═══════════════════════════════════════════════ */

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

:root {
  --bg:       #080808;
  --surface:  #0f0f0f;
  --surface2: #161616;
  --surface3: #1e1e1e;
  --border:   #232323;
  --border2:  #2d2d2d;
  --text:     #f0f0f0;
  --text2:    #888888;
  --text3:    #555555;
  --accent:   #ffffff;
  --green:    #22c55e;
  --red:      #ef4444;
  --yellow:   #eab308;
  --blue:     #3b82f6;

  --font-display: 'Syne', sans-serif;
  --font-mono:    'Space Mono', monospace;
  --font-body:    'DM Sans', sans-serif;

  --radius-sm:  4px;
  --radius:     8px;
  --radius-lg:  12px;
  --radius-xl:  16px;

  --transition: 160ms cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* ── Selection ─────────────────────────────────── */
::selection { background: #ffffff22; color: var(--text); }

/* ── Typography ────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }

p { color: var(--text2); line-height: 1.75; }

a {
  color: var(--text);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--accent); }

code, pre {
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

/* ── Layout ────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Navbar ────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(8,8,8,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  height: 56px;
  display: flex;
  align-items: center;
}

.navbar-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.0625rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  margin-right: 8px;
}

.navbar-logo svg { flex-shrink: 0; }

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.nav-link {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text2);
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: var(--surface3);
}

.navbar-end {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.navbar-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border2);
  cursor: pointer;
  transition: border-color var(--transition);
  object-fit: cover;
}
.navbar-avatar:hover { border-color: var(--text3); }

/* ── Buttons ────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  outline: none;
  transition: background var(--transition), color var(--transition),
              transform var(--transition), border-color var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--text);
  color: var(--bg);
  font-weight: 600;
}
.btn-primary:hover:not(:disabled) { background: #d4d4d4; }

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

.btn-danger {
  background: transparent;
  color: var(--red);
  border: 1px solid #ef444430;
}
.btn-danger:hover:not(:disabled) {
  background: #ef444415;
  border-color: #ef444460;
}

.btn-sm { padding: 5px 12px; font-size: 0.8125rem; gap: 5px; }
.btn-lg { padding: 12px 24px; font-size: 1rem; }
.btn-xl { padding: 15px 32px; font-size: 1.0625rem; font-weight: 600; }

/* Loading spinner inside button */
.btn-spinner {
  width: 14px; height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  flex-shrink: 0;
}

/* ── Cards ──────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
}
.card:hover {
  border-color: var(--border2);
  transform: translateY(-1px);
}

/* Radial glow on hover — added via JS mouse tracking */
.card::before {
  content: '';
  position: absolute;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.04) 0%, transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  transform: translate(-50%, -50%);
}
.card:hover::before { opacity: 1; }

/* ── Badges ──────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.badge-green  { background: #22c55e1a; color: var(--green); border: 1px solid #22c55e30; }
.badge-red    { background: #ef44441a; color: var(--red);   border: 1px solid #ef444430; }
.badge-gray   { background: var(--surface3); color: var(--text2); border: 1px solid var(--border); }
.badge-yellow { background: #eab3081a; color: var(--yellow); border: 1px solid #eab30830; }
.badge-blue   { background: #3b82f61a; color: var(--blue);  border: 1px solid #3b82f630; }

/* ── Forms ──────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.form-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.form-input, .form-textarea, .form-select {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  padding: 10px 14px;
  outline: none;
  transition: border-color var(--transition), background var(--transition);
  width: 100%;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--border2);
  background: var(--surface3);
}
.form-input::placeholder, .form-textarea::placeholder {
  color: var(--text3);
}
.form-textarea {
  resize: vertical;
  min-height: 80px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.7;
}
.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}
.form-select option { background: var(--surface2); }

/* Toggle switch */
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.toggle {
  position: relative;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: var(--transition);
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  left: 2px; top: 50%;
  transform: translateY(-50%);
  background: var(--text3);
  border-radius: 50%;
  transition: var(--transition);
}
.toggle input:checked + .toggle-slider {
  background: #22c55e20;
  border-color: var(--green);
}
.toggle input:checked + .toggle-slider::before {
  transform: translateX(18px) translateY(-50%);
  background: var(--green);
}

/* ── Skeleton loading ───────────────────────────── */
.skeleton {
  background: var(--surface2);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
  animation: shimmer 1.6s infinite;
}
@keyframes shimmer {
  100% { transform: translateX(100%); }
}

/* ── Page transitions ───────────────────────────── */
#page {
  padding-top: 56px;
  min-height: 100vh;
  animation: page-in 0.2s ease;
}
@keyframes page-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Toast notifications ─────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface3);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  animation: toast-in 0.25s ease;
  pointer-events: auto;
  max-width: 320px;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red);   }
.toast.warning { border-left: 3px solid var(--yellow); }
@keyframes toast-in {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Modal ───────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fade-in 0.15s ease;
}
.modal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xl);
  padding: 28px;
  max-width: 440px;
  width: calc(100% - 48px);
  animation: modal-in 0.2s ease;
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Landing page ────────────────────────────────── */
.landing-hero {
  min-height: calc(100vh - 56px);
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  padding: 80px 24px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-eyebrow::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--text3);
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6.5rem);
  line-height: 1.0;
  letter-spacing: -0.04em;
  font-weight: 800;
  max-width: 14ch;
}
.hero-title .accent-line {
  display: block;
  color: var(--text3);
  font-style: italic;
  font-size: 0.75em;
}

.hero-body {
  margin-top: 32px;
  max-width: 52ch;
  font-size: 1.0625rem;
  color: var(--text2);
  line-height: 1.7;
}

.hero-cta {
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-stats {
  margin-top: 80px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 600px;
}
.stat-item {
  background: var(--surface);
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 1;
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text3);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 80px 0;
}
.feature-card {
  background: var(--surface);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feature-icon {
  width: 36px; height: 36px;
  background: var(--surface3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
}
.feature-desc {
  font-size: 0.875rem;
  color: var(--text2);
  line-height: 1.65;
}

/* ── Plugin store page ───────────────────────────── */
.page-header {
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}

.plugin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  padding-bottom: 60px;
}

.plugin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
  text-decoration: none;
}
.plugin-card:hover {
  border-color: var(--border2);
  transform: translateY(-1px);
}

.plugin-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.plugin-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.plugin-name {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.plugin-author {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--text3);
}
.plugin-desc {
  font-size: 0.875rem;
  color: var(--text2);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.plugin-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.plugin-cdn {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--text3);
  background: var(--surface2);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.like-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  cursor: pointer;
  transition: all var(--transition);
}
.like-btn:hover { border-color: var(--red); color: var(--red); background: #ef444410; }
.like-btn.liked  { border-color: var(--red); color: var(--red); background: #ef444415; }

/* Store filters bar */
.store-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.filter-chip {
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  background: transparent;
  color: var(--text3);
  transition: all var(--transition);
}
.filter-chip:hover, .filter-chip.active {
  background: var(--surface3);
  border-color: var(--border2);
  color: var(--text);
}
.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 320px;
}
.search-input {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.875rem;
  padding: 8px 14px 8px 36px;
  outline: none;
  transition: border-color var(--transition);
}
.search-input:focus { border-color: var(--border2); }
.search-input::placeholder { color: var(--text3); }
.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

/* ── Dashboard ───────────────────────────────────── */
.dashboard-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 40px 0 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
}
.dashboard-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 1px solid var(--border2);
}
.dashboard-greeting {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.user-plugin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  padding-bottom: 60px;
}
.user-plugin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color var(--transition), transform var(--transition);
}
.user-plugin-card:hover {
  border-color: var(--border2);
  transform: translateY(-1px);
}
.user-plugin-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
}
.user-plugin-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.user-plugin-actions {
  display: flex;
  gap: 6px;
  margin-top: auto;
}
.cdn-copy {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  color: var(--text3);
  cursor: pointer;
  transition: all var(--transition);
  word-break: break-all;
  text-align: left;
  line-height: 1.4;
}
.cdn-copy:hover { border-color: var(--border2); color: var(--text2); background: var(--surface3); }

/* ── Plugin editor ───────────────────────────────── */
.editor-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 0;
  height: calc(100vh - 56px);
  overflow: hidden;
}
.editor-sidebar {
  border-right: 1px solid var(--border);
  background: var(--surface);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.editor-sidebar-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}
.editor-sidebar-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1;
}
.editor-sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.editor-main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg);
}
.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text3);
}
#cm-editor {
  flex: 1;
  overflow: hidden;
  font-size: 0.875rem;
}
/* CodeMirror 6 dark theme overrides */
.cm-editor {
  height: 100%;
  background: var(--bg) !important;
}
.cm-editor.cm-focused { outline: none !important; }
.cm-scroller { font-family: var(--font-mono) !important; font-size: 0.875rem !important; }
.cm-gutters { background: var(--surface) !important; border-right: 1px solid var(--border) !important; color: var(--text3) !important; }
.cm-activeLineGutter { background: var(--surface2) !important; }
.cm-activeLine { background: rgba(255,255,255,0.025) !important; }
.cm-cursor { border-left-color: var(--text) !important; }
.cm-selectionBackground { background: rgba(255,255,255,0.1) !important; }
.cm-content { caret-color: var(--text); }

.cooldown-bar-wrap {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  height: 4px;
  overflow: hidden;
}
.cooldown-bar {
  height: 100%;
  background: var(--yellow);
  border-radius: var(--radius-sm);
  transition: width 1s linear;
}
.cooldown-label {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  color: var(--yellow);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Docs page ───────────────────────────────────── */
.docs-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  padding: 40px 0 80px;
  max-width: 1000px;
  margin: 0 auto;
}
.docs-nav {
  position: sticky;
  top: 72px;
  height: fit-content;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.docs-nav-link {
  font-size: 0.875rem;
  color: var(--text2);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  transition: all var(--transition);
}
.docs-nav-link:hover, .docs-nav-link.active {
  color: var(--text);
  border-left-color: var(--text3);
  background: var(--surface2);
}
.docs-content {
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.docs-section h2 {
  font-size: 1.5rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.docs-section p, .docs-section li {
  font-size: 0.9375rem;
  color: var(--text2);
  line-height: 1.75;
}
.docs-section ul { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.code-block {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text2);
  overflow-x: auto;
  margin: 12px 0;
  line-height: 1.7;
}

/* ── Footer ──────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: auto;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.footer-brand {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text3);
}
.footer-links {
  display: flex;
  gap: 20px;
}
.footer-links a {
  font-size: 0.8125rem;
  color: var(--text3);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--text2); }

/* ── Empty state ─────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 80px 24px;
  text-align: center;
}
.empty-state-icon {
  color: var(--text3);
  margin-bottom: 8px;
}
.empty-state h3 { font-size: 1.125rem; color: var(--text2); }
.empty-state p  { font-size: 0.875rem; color: var(--text3); max-width: 36ch; }

/* ── Divider ─────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 0; border: none; }

/* ── Utility ─────────────────────────────────────── */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.text-mono { font-family: var(--font-mono); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--text2); }
.text-faint { color: var(--text3); }
.text-green { color: var(--green); }
.text-red   { color: var(--red); }
.text-yellow { color: var(--yellow); }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
  .editor-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    height: auto;
    overflow: visible;
  }
  .editor-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  #cm-editor { height: 60vh; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-nav { display: none; }
  .hero-stats { grid-template-columns: 1fr 1fr 1fr; }
  .stat-item { padding: 16px 18px; }
  .stat-value { font-size: 1.625rem; }
  .navbar-nav .nav-link { display: none; }
  .navbar-nav .nav-link.mobile-show { display: flex; }
}

@media (max-width: 480px) {
  .hero-stats { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .plugin-grid { grid-template-columns: 1fr; }
  .user-plugin-grid { grid-template-columns: 1fr; }
}
