/* ============================================================
   Maze.Support — css/style.css  (forest theme)
   ============================================================ */

:root {
  --primary:       #5a9e3e;
  --primary-dark:  #3f7a28;
  --primary-light: #7cc453;
  --secondary:     #a8d878;
  --bg:            #040c03;
  --surface:       #0b160a;
  --surface2:      #111e0f;
  --text:          #c5deb5;
  --text-muted:    #4e7040;
  --border:        #1a3016;
  --gold:          #e8c84a;
  --crisis:        #e07070;
  --radius:        10px;
  --shadow:        0 2px 20px rgba(0,0,0,0.6);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── Scrollbar ── */
::-webkit-scrollbar       { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1e3a18; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #2a5020; }

/* ── Nav ── */
.ms-nav {
  background: #070f06;
  color: var(--text);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 16px rgba(0,0,0,0.6);
  z-index: 10;
}
.ms-nav-brand {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--primary-light);
  text-shadow: 0 0 20px rgba(124,196,83,0.4);
}
.ms-nav-actions  { display: flex; align-items: center; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.ms-nav-username { font-size: 13px; color: var(--text-muted); }
.ms-rank-badge   {
  font-size: 11px;
  background: rgba(90,158,62,0.2);
  color: var(--primary-light);
  padding: 3px 9px;
  border-radius: 12px;
  border: 1px solid rgba(90,158,62,0.35);
}

/* ── Main layout ── */
.ms-layout {
  display: grid;
  grid-template-columns: 190px 1fr 220px;
  flex: 1;
  overflow: hidden;
}

/* ── Sidebars ── */
.ms-sidebar, .ms-info-panel {
  background: var(--surface);
  padding: 14px;
  overflow-y: auto;
}
.ms-sidebar    { border-right: 1px solid var(--border); }
.ms-info-panel { border-left: 1px solid var(--border); }

.ms-sidebar h3, .ms-info-panel h3 {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.ms-divider-line { border: none; border-top: 1px solid var(--border); margin: 14px 0; }

/* ── Online users list ── */
.ms-users-list { list-style: none; }
.ms-users-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.ms-users-list li:last-child { border-bottom: none; }
.ms-user-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(90,158,62,0.2);
  color: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0;
  border: 1px solid rgba(90,158,62,0.3);
}
.ms-online-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--secondary);
  flex-shrink: 0;
  margin-left: auto;
  box-shadow: 0 0 8px rgba(168,216,120,0.7);
  animation: ms-firefly 3s ease-in-out infinite;
}
@keyframes ms-firefly {
  0%, 100% { opacity: 1; box-shadow: 0 0 8px rgba(168,216,120,0.7); }
  50%       { opacity: 0.6; box-shadow: 0 0 14px rgba(232,200,74,0.8); }
}

/* ── Chat area — forest background ── */
.ms-chat-area {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  background: var(--bg);
}

/* Canopy light rays bleeding in from top */
.ms-chat-area::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    /* Left canopy light shaft */
    radial-gradient(ellipse 28% 50% at 12%  0%, rgba(80,150,30,0.18) 0%, transparent 60%),
    /* Right canopy light shaft */
    radial-gradient(ellipse 22% 45% at 82%  0%, rgba(60,130,20,0.14) 0%, transparent 60%),
    /* Centre canopy glow */
    radial-gradient(ellipse 30% 35% at 50%  3%, rgba(120,190,50,0.10) 0%, transparent 55%),
    /* Far-left deep green */
    radial-gradient(ellipse 20% 60% at  2% 50%, rgba(20, 60,10,0.35) 0%, transparent 60%),
    /* Far-right deep green */
    radial-gradient(ellipse 20% 60% at 98% 50%, rgba(15, 50, 8,0.35) 0%, transparent 60%),
    /* Ground mist */
    radial-gradient(ellipse 140% 28% at 50% 102%, rgba(5,18,3,0.85) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}

/* Tree silhouettes along the bottom */
.ms-chat-area::after {
  content: '';
  position: absolute;
  bottom: 54px; /* sits just above the input bar */
  left: 0; right: 0;
  height: 160px;
  background:
    /* Left thick trunk / canopy */
    radial-gradient(ellipse 7%  55% at  4% 100%, #020803 48%, transparent 49%),
    radial-gradient(ellipse 14% 38% at  5% 52%,  #020803 48%, transparent 49%),
    /* Second left tree */
    radial-gradient(ellipse 5%  60% at 16% 100%, #020803 48%, transparent 49%),
    radial-gradient(ellipse 12% 35% at 16%  45%, #020803 48%, transparent 49%),
    /* Centre-left */
    radial-gradient(ellipse 5%  50% at 35% 100%, #020803 48%, transparent 49%),
    radial-gradient(ellipse 10% 30% at 35%  55%, #020803 48%, transparent 49%),
    /* Centre-right */
    radial-gradient(ellipse 5%  55% at 62% 100%, #020803 48%, transparent 49%),
    radial-gradient(ellipse 11% 32% at 62%  50%, #020803 48%, transparent 49%),
    /* Right tree */
    radial-gradient(ellipse 6%  58% at 82% 100%, #020803 48%, transparent 49%),
    radial-gradient(ellipse 13% 36% at 82%  48%, #020803 48%, transparent 49%),
    /* Far-right */
    radial-gradient(ellipse 7%  50% at 97% 100%, #020803 48%, transparent 49%),
    radial-gradient(ellipse 12% 30% at 97%  55%, #020803 48%, transparent 49%);
  pointer-events: none;
  z-index: 0;
}

.ms-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 1;
}

/* Firefly spots scattered in the message area */
.ms-messages::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle 2px at 22% 42%, rgba(220,240,80,0.55)  0%, transparent 3px),
    radial-gradient(circle 2px at 68% 28%, rgba(200,230,60,0.45)  0%, transparent 3px),
    radial-gradient(circle 1px at 44% 65%, rgba(240,255,100,0.50) 0%, transparent 2px),
    radial-gradient(circle 2px at 81% 58%, rgba(180,220,50,0.40)  0%, transparent 3px),
    radial-gradient(circle 1px at 12% 72%, rgba(210,240,70,0.45)  0%, transparent 2px),
    radial-gradient(circle 2px at 91% 20%, rgba(230,250,90,0.35)  0%, transparent 3px);
  pointer-events: none;
  z-index: 0;
  animation: ms-flicker 8s ease-in-out infinite alternate;
}
@keyframes ms-flicker {
  0%   { opacity: 0.5; }
  33%  { opacity: 1;   }
  66%  { opacity: 0.6; }
  100% { opacity: 0.9; }
}

.ms-input-area {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(7,15,6,0.95);
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 2;
  backdrop-filter: blur(4px);
}
.ms-input-area input {
  flex: 1;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 24px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  background: rgba(4,12,3,0.9);
  color: var(--text);
}
.ms-input-area input::placeholder { color: var(--text-muted); }
.ms-input-area input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(90,158,62,0.25);
}
.ms-input-area input:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Messages ── */
.ms-message {
  background: rgba(11,22,10,0.82);
  border-radius: var(--radius);
  padding: 11px 13px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 14px rgba(0,0,0,0.5);
  position: relative;
  z-index: 1;
  backdrop-filter: blur(3px);
}
.ms-message.ms-own {
  background: rgba(17,30,15,0.88);
  border-color: rgba(90,158,62,0.25);
}
.ms-message-header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}
.ms-message-name { font-weight: 600; font-size: 13px; color: var(--primary-light); }
.ms-message-rank {
  font-size: 10px;
  background: rgba(168,216,120,0.15);
  color: var(--secondary);
  padding: 1px 7px;
  border-radius: 10px;
  border: 1px solid rgba(168,216,120,0.25);
}
.ms-message-time { font-size: 11px; color: var(--text-muted); margin-left: auto; }
.ms-message-text { font-size: 14px; line-height: 1.55; word-break: break-word; color: var(--text); }

/* ── Action buttons per message ── */
.ms-message-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}
.ms-action-btn {
  padding: 3px 10px;
  font-size: 11px;
  border-radius: 14px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: opacity 0.18s, background-color 0.18s;
  font-weight: 500;
  line-height: 1.4;
}
.ms-action-btn:disabled { opacity: 0.4; cursor: default; }
.ms-reflect   { background: rgba(90,158,62,0.2);  color: #7cc453; border-color: rgba(90,158,62,0.3);  }
.ms-autonomy  { background: rgba(168,216,120,0.15); color: #a8d878; border-color: rgba(168,216,120,0.25); }
.ms-thanks    { background: rgba(232,200,74,0.15);  color: #e8c84a; border-color: rgba(232,200,74,0.25); }
.ms-unhelpful { background: rgba(224,112,112,0.12); color: #e07070; border-color: rgba(224,112,112,0.22); }
.ms-kick      { background: transparent; border-color: rgba(224,112,112,0.3); color: var(--crisis); }

/* ── Mute notice ── */
.ms-mute-notice {
  background: rgba(224,112,112,0.1);
  border-top: 2px solid var(--crisis);
  padding: 9px 16px;
  font-size: 13px;
  color: var(--crisis);
  text-align: center;
  position: relative;
  z-index: 2;
}

/* ── Stats ── */
.ms-stat       { margin-bottom: 11px; }
.ms-stat-label { font-size: 11px; color: var(--text-muted); }
.ms-stat-value { font-size: 15px; font-weight: 700; color: var(--primary-light); }
.ms-badge-chip {
  display: inline-block;
  background: rgba(90,158,62,0.18);
  color: var(--secondary);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  margin: 2px 2px 0 0;
  border: 1px solid rgba(90,158,62,0.28);
}
.ms-community-rules ul { list-style: none; margin-top: 8px; }
.ms-community-rules li { font-size: 12px; color: var(--text-muted); padding: 4px 0; }
.ms-loading { font-size: 12px; color: var(--text-muted); }

/* ── Global buttons ── */
.ms-btn-primary {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 24px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background-color 0.18s, box-shadow 0.18s;
  flex-shrink: 0;
}
.ms-btn-primary:hover    { background: var(--primary-dark); box-shadow: 0 0 14px rgba(90,158,62,0.4); }
.ms-btn-primary:disabled { opacity: 0.4; cursor: default; }

.ms-btn-ghost {
  background: transparent;
  border: 1px solid rgba(90,158,62,0.3);
  color: var(--text-muted);
  padding: 5px 11px;
  border-radius: 18px;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 0.18s, color 0.18s;
  white-space: nowrap;
}
.ms-btn-ghost:hover  { background: rgba(90,158,62,0.12); color: var(--text); }
.ms-btn-ghost.active { background: rgba(90,158,62,0.22); color: var(--primary-light); }

/* ── Crisis banner ── */
.ms-crisis-banner {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  background: linear-gradient(135deg, #1f0606, #2e0a0a);
  color: #fbb;
  border: 1px solid rgba(224,112,112,0.4);
  padding: 14px 20px;
  border-radius: 12px;
  text-align: center;
  z-index: 9000;
  box-shadow: 0 4px 24px rgba(224,112,112,0.2);
  animation: ms-slide-up 0.3s ease;
  font-size: 14px;
}
.ms-crisis-banner a      { color: #f4d03f; font-weight: bold; }
.ms-crisis-banner button {
  background: rgba(224,112,112,0.2);
  color: #e07070;
  border: 1px solid rgba(224,112,112,0.4);
  padding: 5px 14px;
  border-radius: 16px;
  margin-left: 12px;
  cursor: pointer;
  font-weight: 700;
  font-size: 12px;
}
@keyframes ms-slide-up {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ── Safe mode ── */
.ms-filtered {
  background: rgba(78,112,64,0.25);
  color: var(--text-muted);
  font-style: italic;
  padding: 1px 5px;
  border-radius: 4px;
  cursor: help;
}

/* ── Heart animation ── */
.ms-heart {
  position: absolute;
  font-size: 20px;
  pointer-events: none;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: ms-float-up 1s ease-out forwards;
}
@keyframes ms-float-up {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to   { opacity: 0; transform: translateX(-50%) translateY(-44px); }
}

/* ── Assessment modal ── */
.ms-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ms-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 30px;
  max-width: 500px;
  width: 94%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 8px 48px rgba(0,0,0,0.7), 0 0 40px rgba(90,158,62,0.08);
}
.ms-modal h2   { font-size: 17px; color: var(--primary-light); margin-bottom: 6px; }
.ms-modal > p  { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.ms-question   { margin-bottom: 18px; }
.ms-question p { font-weight: 600; font-size: 14px; margin-bottom: 8px; color: var(--text); }
.ms-scale { display: flex; flex-wrap: wrap; gap: 6px; }
.ms-scale label {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: 14px;
  font-size: 12px;
  cursor: pointer;
  color: var(--text);
  transition: background-color 0.14s, border-color 0.14s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.ms-scale label:hover { background: rgba(90,158,62,0.15); border-color: var(--primary); }
.ms-scale label:has(input:checked) {
  background: rgba(90,158,62,0.25);
  border-color: var(--primary-light);
  color: var(--primary-light);
}
.ms-result {
  background: rgba(90,158,62,0.12);
  border: 1px solid rgba(90,158,62,0.25);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

/* ── Login page — forest at dawn ── */
.ms-login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  background:
    /* Dawn sky glow at top */
    radial-gradient(ellipse 80% 40% at 50% 0%,  rgba(60,100,20,0.5) 0%, transparent 60%),
    /* Left and right canopy shadow */
    radial-gradient(ellipse 30% 100% at  0% 50%, rgba(3,10,2,0.7) 0%, transparent 55%),
    radial-gradient(ellipse 30% 100% at 100% 50%, rgba(3,10,2,0.7) 0%, transparent 55%),
    /* Ground */
    radial-gradient(ellipse 100% 40% at 50% 110%, rgba(2,8,1,0.9) 0%, transparent 55%),
    /* Base */
    linear-gradient(180deg, #0a1808 0%, #040c03 60%, #020703 100%);
}
.ms-login-card {
  background: rgba(11,22,10,0.92);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 34px 38px;
  width: 380px;
  box-shadow: 0 8px 48px rgba(0,0,0,0.7), 0 0 60px rgba(90,158,62,0.06);
  backdrop-filter: blur(6px);
}
.ms-login-card h1 { font-size: 22px; color: var(--primary-light); margin-bottom: 4px; text-shadow: 0 0 20px rgba(124,196,83,0.4); }
.ms-tagline       { color: var(--text-muted); font-size: 13px; margin-bottom: 22px; }
.ms-tabs {
  display: flex;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.ms-tab {
  flex: 1;
  padding: 8px;
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.18s;
}
.ms-tab.active { color: var(--primary-light); border-bottom: 2px solid var(--primary); margin-bottom: -1px; }
.ms-form-group { margin-bottom: 13px; }
.ms-form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
.ms-form-group input {
  width: 100%;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  background: rgba(4,12,3,0.9);
  color: var(--text);
  transition: border-color 0.18s, box-shadow 0.18s;
}
.ms-form-group input::placeholder { color: var(--text-muted); }
.ms-form-group input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(90,158,62,0.2);
}
.ms-error { color: var(--crisis); font-size: 12px; min-height: 16px; margin-top: 6px; }
.ms-or-divider {
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
  margin: 14px 0;
  position: relative;
}
.ms-or-divider::before, .ms-or-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 43%;
  height: 1px;
  background: var(--border);
}
.ms-or-divider::before { left: 0; }
.ms-or-divider::after  { right: 0; }
.ms-google-btn {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface2);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  transition: background-color 0.18s, border-color 0.18s;
  margin-bottom: 6px;
}
.ms-google-btn:hover { background: #162614; border-color: #2a5020; }
.ms-btn-full { width: 100%; padding: 11px; border-radius: 8px; font-size: 14px; font-weight: 600; }
.ms-footer-note { font-size: 11px; color: var(--text-muted); text-align: center; margin-top: 14px; line-height: 1.5; }
.ms-footer-note a { color: var(--primary-light); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .ms-layout { grid-template-columns: 1fr; }
  .ms-sidebar, .ms-info-panel { display: none; }
  .ms-nav-actions { gap: 6px; }
  .ms-login-card { width: 94%; padding: 24px 20px; }
}
