/* ============================================
   MO2 Builder — Shared Styles
   Used by all pages: landing, login, register, calculator
   ============================================ */

:root {
  --bg: #0d0a07;
  --bg-grad-1: #1c160e;
  --bg-grad-2: #0a0805;
  --bg-card: #181410;
  --bg-elev: #221c14;
  --bg-elev-hover: #2a2218;
  --border: #3a2f1f;
  --border-strong: #5a4628;
  --text: #e3d9bf;
  --text-muted: #9a8e72;
  --text-dim: #6a5e48;
  --accent: #b8893d;
  --accent-bright: #d4a557;
  --accent-hover: #c89a48;
  --accent-deep: #6e4d1a;
  --blood: #8a2818;
  --blood-bright: #b03522;
  --wood: #a87646;
  --stone: #8a8472;
  --metal: #7d92a8;
  --gold: #d4a557;
  --prom: #c2613a;
  --health: #6b9655;
  --danger: #b03522;
  --success: #6b9655;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background:
    radial-gradient(ellipse at top, rgba(184, 137, 61, 0.06) 0%, transparent 60%),
    radial-gradient(ellipse at bottom, rgba(138, 40, 24, 0.04) 0%, transparent 70%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.35;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.12  0 0 0 0 0.10  0 0 0 0 0.06  0 0 0 0.45 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}


/* ============= HEADER (used on all pages) ============= */
.site-header {
  position: relative;
  z-index: 10000;
  background:
    linear-gradient(180deg, rgba(28, 22, 14, 0.85) 0%, rgba(10, 8, 5, 0.95) 100%),
    radial-gradient(ellipse 800px 200px at 50% 0%, rgba(184, 137, 61, 0.18), transparent 70%);
  border-bottom: 1px solid var(--accent-deep);
  box-shadow: 0 1px 0 rgba(184, 137, 61, 0.15) inset, 0 4px 24px rgba(0,0,0,0.5);
  padding: 18px 32px;
}
.site-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.site-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}
.site-sigil {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}
.site-sigil svg { width: 100%; height: 100%; }
.site-brand h1 {
  margin: 0;
  font-family: 'Cinzel', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-bright);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-shadow: 0 1px 0 #000, 0 0 12px rgba(184, 137, 61, 0.3);
  line-height: 1.15;
}
.site-brand .tagline {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
  font-style: italic;
  letter-spacing: 0.3px;
}

/* nav links */
.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-link {
  padding: 8px 14px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: all 0.15s;
  letter-spacing: 0.4px;
}
.nav-link:hover {
  color: var(--accent-bright);
  background: rgba(184, 137, 61, 0.08);
  border-color: rgba(184, 137, 61, 0.2);
}
.nav-link.active {
  color: var(--accent-bright);
  background: rgba(184, 137, 61, 0.12);
  border-color: rgba(184, 137, 61, 0.3);
}
/* PayPal donate button in header (PayPal blue) */
.nav-donate {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 15px; border-radius: 4px;
  font-family: 'Cinzel', Georgia, serif; font-size: 12px; font-weight: 600;
  letter-spacing: 0.4px; text-transform: uppercase; text-decoration: none;
  color: #fff; white-space: nowrap;
  background: linear-gradient(180deg, #009cde 0%, #003087 100%);
  border: 1px solid #0079c1;
  transition: all 0.15s;
}
.nav-donate:hover {
  background: linear-gradient(180deg, #00aeef 0%, #0047ab 100%);
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(0, 122, 193, 0.35);
}
.nav-donate .nav-donate-icon { font-size: 13px; }
.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  background: rgba(184, 137, 61, 0.08);
  border: 1px solid var(--accent-deep);
  border-radius: 4px;
  font-size: 13px;
  color: var(--accent-bright);
}
.nav-user .avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  color: #1a0f04;
}

/* ============= NAV DROPDOWN ============= */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  background: transparent;
  border: 1px solid transparent;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.nav-dropdown-toggle .chevron { font-size: 9px; transition: transform 0.2s; }
.nav-dropdown.open .nav-dropdown-toggle .chevron { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: fixed;
  min-width: 230px;
  max-height: 80vh;
  overflow-y: auto;
  background: #1a1510;
  border: 1px solid var(--accent-deep);
  border-radius: 6px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.9), 0 0 0 1px rgba(0,0,0,0.6);
  padding: 6px;
  display: none;
  z-index: 2147483647;
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  border-radius: 4px;
  transition: all 0.15s;
  white-space: nowrap;
}
.dropdown-item:hover { background: rgba(184, 137, 61, 0.15); color: var(--accent-bright); }
.dropdown-item.active { background: rgba(184, 137, 61, 0.12); color: var(--accent-bright); }
.dropdown-item .di-icon { font-size: 14px; width: 18px; text-align: center; }

/* ============= BUTTONS ============= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: 'Cinzel', Georgia, serif;
  border: 1px solid transparent;
}
.btn-primary {
  background: linear-gradient(180deg, #c89a48 0%, #8a6020 100%);
  color: #1a0f04;
  border-color: var(--accent-bright);
  box-shadow:
    0 1px 0 rgba(255, 220, 150, 0.4) inset,
    0 -1px 0 rgba(0, 0, 0, 0.3) inset,
    0 2px 8px rgba(184, 137, 61, 0.35);
  text-shadow: 0 1px 0 rgba(255, 220, 150, 0.4);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #d4a557 0%, #9a6f28 100%);
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 220, 150, 0.5) inset,
    0 -1px 0 rgba(0, 0, 0, 0.3) inset,
    0 4px 14px rgba(184, 137, 61, 0.5);
}
.btn-secondary {
  background: transparent;
  color: var(--accent-bright);
  border-color: var(--accent-deep);
}
.btn-secondary:hover {
  background: rgba(184, 137, 61, 0.1);
  border-color: var(--accent);
}
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: none;
  font-family: inherit;
  text-transform: none;
  letter-spacing: 0.3px;
  font-size: 13px;
  padding: 8px 14px;
}
.btn-ghost:hover {
  color: var(--accent-bright);
}
.btn-block { width: 100%; }
.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}
.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

/* ============= FORM ELEMENTS ============= */
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-bright);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 7px;
  font-family: 'Cinzel', Georgia, serif;
}
.form-input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(13, 10, 7, 0.5);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.15s;
}
.form-input:hover { border-color: var(--border-strong); }
.form-input:focus {
  border-color: var(--accent);
  background: rgba(13, 10, 7, 0.8);
  box-shadow: 0 0 0 3px rgba(184, 137, 61, 0.15);
}
.form-input.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(176, 53, 34, 0.15);
}
.form-error {
  color: var(--danger);
  font-size: 12px;
  margin-top: 6px;
  display: none;
}
.form-error.show { display: block; }
.form-hint {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 6px;
  font-style: italic;
}

/* ============= FOOTER ============= */
.site-footer {
  margin-top: 60px;
  padding: 24px 32px;
  background: linear-gradient(0deg, rgba(10,8,5,0.95) 0%, rgba(28,22,14,0.4) 100%);
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.3px;
}
.site-footer .footer-divider {
  width: 80px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-deep), transparent);
  margin: 0 auto 12px;
}
.site-footer a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s;
}
.site-footer a:hover { color: var(--accent-bright); text-decoration: underline; }
.site-footer .footer-note {
  color: var(--text-muted);
  margin-bottom: 8px;
  font-style: italic;
}

/* ============= TOAST NOTIFICATIONS ============= */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  color: var(--text);
  font-size: 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.5);
  z-index: 1000;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s;
  max-width: 360px;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }

/* ============= RESPONSIVE ============= */
@media (max-width: 980px) {
  .site-header { padding: 14px 18px; }
  .site-header-inner { gap: 12px; }
  .site-brand h1 { font-size: 17px; letter-spacing: 1px; }
  .site-brand .tagline { font-size: 10px; }
  .site-nav { gap: 2px; flex-wrap: wrap; }
  .nav-link { padding: 7px 9px; font-size: 12px; }
  .nav-user { padding: 6px 10px; font-size: 12px; }
  .nav-user .avatar { width: 22px; height: 22px; font-size: 10px; }
}
@media (max-width: 680px) {
  .site-header-inner { flex-direction: column; align-items: stretch; }
  .site-brand { justify-content: center; }
  .site-brand .tagline { display: none; }
  .site-nav { width: 100%; justify-content: center; flex-wrap: wrap; }
}

/* ============= SKILL MATCH HIGHLIGHTING ============= */
/* Applied to cards/rows when "Use my skills" is on */
.sm-have {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 1px rgba(184, 137, 61, 0.3) inset;
}
.sm-have::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent); border-radius: 4px 0 0 4px;
}
.sm-partial {
  border-color: var(--accent-deep) !important;
}
.sm-missing {
  opacity: 0.4;
  filter: grayscale(0.4);
}
/* status pill shown on cards */
.sm-pill {
  font-size: 9px; padding: 2px 8px; border-radius: 3px; text-transform: uppercase;
  letter-spacing: 0.4px; white-space: nowrap; flex-shrink: 0;
}
.sm-pill.have    { background: rgba(184,137,61,0.18); color: var(--accent-bright); border: 1px solid var(--accent); }
.sm-pill.partial { background: rgba(138,40,24,0.12); color: var(--blood-bright); border: 1px solid var(--blood); }
.sm-pill.missing { background: rgba(120,120,120,0.1); color: var(--text-dim); border: 1px solid var(--border); }

/* "Use my skills" toggle bar */
.skill-toggle-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 16px;
  background: rgba(184,137,61,0.06); border: 1px solid var(--accent-deep);
  border-radius: 6px; font-size: 13px;
}
.skill-toggle-bar .toggle-label { color: var(--text); font-weight: 500; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.skill-toggle-bar .toggle-hint { color: var(--text-dim); font-size: 11px; font-style: italic; }
.skill-toggle-bar .legend { display: flex; gap: 14px; margin-left: auto; flex-wrap: wrap; }
.skill-toggle-bar .legend span { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-muted); }
.skill-toggle-bar .legend .dot { width: 10px; height: 10px; border-radius: 2px; }
.skill-toggle-bar .legend .dot.have { background: var(--accent); }
.skill-toggle-bar .legend .dot.missing { background: var(--border-strong); }
.skill-toggle-bar .no-profile { color: var(--blood-bright); font-size: 11px; }

/* switch */
.switch { position: relative; display: inline-block; width: 38px; height: 20px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; cursor: pointer; inset: 0; background: var(--bg-elev);
  border: 1px solid var(--border-strong); border-radius: 20px; transition: 0.2s;
}
.switch .slider::before {
  content: ''; position: absolute; height: 14px; width: 14px; left: 2px; bottom: 2px;
  background: var(--text-muted); border-radius: 50%; transition: 0.2s;
}
.switch input:checked + .slider { background: rgba(184,137,61,0.3); border-color: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(18px); background: var(--accent); }
