/* ============================================
   MUFFIN.CSS — Shared styles for all pages
   ============================================ */

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

:root {
  --bg: #0d0d12;
  --surface: #13131a;
  --surface2: #1a1a24;
  --border: #2a2a3d;
  --border2: #3a3a50;
  --accent: #7c6aff;
  --accent-glow: rgba(124, 106, 255, 0.15);
  --green: #22d3a0;
  --orange: #fb923c;
  --text: #e8e8f4;
  --text2: #a0a0bc;
  --muted: #5a5a75;
  --success: #22d3a0;
  --error: #f43f6e;
  --font: 'Inter', 'Syne', sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;
}

html { scroll-behavior: smooth; }

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

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(124,106,255,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 100%, rgba(34,211,160,0.05) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

/* ---- NAV ---- */
#muffin-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: 60px;
  background: rgba(13,13,18,0.92);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.8rem;
  gap: 1rem;
}

.nav-logo {
  font-family: 'Syne', var(--font);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: nowrap;
  overflow-x: auto;
}
.nav-links::-webkit-scrollbar { display: none; }

.nav-links a {
  color: var(--text2);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.38rem 0.75rem;
  border-radius: 7px;
  transition: all 0.15s;
  white-space: nowrap;
  border: 1px solid transparent;
}
.nav-links a:hover { color: var(--text); background: var(--surface2); }
.nav-links a.active { color: var(--accent); background: var(--accent-glow); border-color: rgba(124,106,255,0.25); }
.nav-support {
  color: var(--accent) !important;
  border: 1px solid rgba(124,106,255,0.3) !important;
  background: var(--accent-glow) !important;
}
.nav-support:hover { background: rgba(124,106,255,0.25) !important; }

.nav-burger { display: none; background: none; border: 1px solid var(--border); color: var(--text2); font-size: 1rem; cursor: pointer; padding: 0.3rem 0.6rem; border-radius: 6px; }

@media (max-width: 860px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 60px; left: 0; right: 0;
    background: rgba(13,13,18,0.98);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    gap: 0.2rem;
    z-index: 199;
  }
  #muffin-nav.open .nav-links { display: flex; }
  .nav-links a { font-size: 0.85rem; padding: 0.5rem 0.8rem; width: 100%; }
  .nav-burger { display: block; }
}

/* ---- LAYOUT ---- */
.page-wrap {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 84px 2rem 1rem;
}

.breadcrumb {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 0.7rem;
  letter-spacing: 0.03em;
}

.page-title {
  font-family: 'Syne', var(--font);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
  line-height: 1.1;
  color: var(--text);
}
.page-title em { font-style: normal; color: var(--accent); }

.page-desc {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text2);
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 640px;
}

.sec-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

/* ---- PANEL / CARD ---- */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.panel-hdr {
  padding: 0.85rem 1.3rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--surface2);
}
.panel-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.panel-body { padding: 1.3rem; }

/* ---- FORM ELEMENTS ---- */
select, input[type=text] {
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.8rem;
  outline: none;
  cursor: pointer;
  width: 100%;
  transition: border-color 0.15s;
}
select:hover, input:hover { border-color: var(--border2); }
select:focus, input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,106,255,0.1); }

textarea {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.8rem;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.72rem;
  resize: vertical;
  outline: none;
  line-height: 1.6;
  transition: border-color 0.15s;
}
textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,106,255,0.1); }
textarea::placeholder { color: var(--muted); }

/* ---- DROP ZONE ---- */
.drop-zone {
  border: 1.5px dashed var(--border2);
  border-radius: 10px;
  padding: 2.2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--surface2);
}
.drop-zone:hover, .drop-zone.dz-over {
  border-color: var(--accent);
  background: var(--accent-glow);
}
.dz-icon { font-size: 2rem; margin-bottom: 0.6rem; }
.dz-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.3rem; color: var(--text); }
.dz-sub { font-family: var(--mono); font-size: 0.72rem; color: var(--text2); }
.dz-sub strong { color: var(--accent); }

/* ---- BUTTONS ---- */
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 0.65rem 1.5rem;
  border-radius: 9px;
  font-family: 'Syne', var(--font);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: -0.01em;
}
.btn-primary:hover { filter: brightness(1.15); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(124,106,255,0.35); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-secondary {
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text2);
  padding: 0.55rem 1rem;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

/* ---- STATUS MESSAGES ---- */
.status-msg {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  margin-top: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.status-ok { background: rgba(34,211,160,0.1); border: 1px solid rgba(34,211,160,0.25); color: var(--success); }
.status-err { background: rgba(244,63,110,0.1); border: 1px solid rgba(244,63,110,0.25); color: var(--error); }
.hidden { display: none !important; }

/* ---- SUPPORT BAR ---- */
.muffin-support-bar {
  position: relative;
  z-index: 1;
  padding: 1rem 2rem 2.5rem;
  max-width: 1100px;
  margin: 0 auto;
}
.msb-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem 2.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.msb-inner::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--green));
}
.msb-eyebrow {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.msb-title { font-family: 'Syne', var(--font); font-weight: 800; font-size: 1.05rem; letter-spacing: -0.02em; margin-bottom: 0.4rem; }
.msb-desc { font-family: var(--mono); font-size: 0.75rem; color: var(--text2); line-height: 1.6; }
.msb-people { display: flex; gap: 0.7rem; flex-wrap: wrap; }

.msb-person {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1.1rem;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 10px;
  text-decoration: none;
  transition: all 0.2s;
  min-width: 200px;
}
.msb-person:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(124,106,255,0.15); }
.msb-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.msb-name { font-size: 0.82rem; font-weight: 700; color: var(--text); }
.msb-li { font-family: var(--mono); font-size: 0.62rem; color: #0a66c2; margin-top: 0.15rem; }

/* ---- FOOTER ---- */
.muffin-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  max-width: 1100px;
  margin: 0 auto;
}
.footer-logo { font-weight: 800; font-family: 'Syne', var(--font); color: var(--text); text-decoration: none; font-size: 0.95rem; }
.footer-links { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.footer-links a { color: var(--muted); text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: var(--accent); }
