/* PLANK - Kali Linux Terminal & Offensive Security Interface Theme */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-tertiary: #0b0f14;   /* Left-most rail & deep backdrop */
  --bg-secondary: #111720;  /* Channels & sidebar */
  --bg-primary: #151d27;    /* Main console chat */
  --bg-secondary-alt: #0e141c;
  --channeltextarea-background: #1a2330;
  
  --accent-cyan: #1793d1;
  --accent-cyan-hover: #0ea5e9;
  --accent-green: #10b981;
  --accent-yellow: #f59e0b;
  --accent-red: #ef4444;
  --accent-grey: #64748b;
  
  --text-normal: #e2e8f0;
  --text-muted: #94a3b8;
  --text-link: #38bdf8;
  --text-interactive-hover: #ffffff;
  --interactive-active: #ffffff;
  --interactive-normal: #94a3b8;
  --interactive-muted: #475569;
  
  --border-subtle: rgba(56, 189, 248, 0.12);
  --border-active: rgba(56, 189, 248, 0.35);
}

/* ================= THEMES (Kali & Security Profiles) ================= */

/* 1. Kali Pure Dark */
body.theme-amoled {
  --bg-tertiary: #05070a;
  --bg-secondary: #0a0e14;
  --bg-primary: #080c12;
  --bg-secondary-alt: #05070a;
  --channeltextarea-background: #0f151e;
  --border-subtle: rgba(23, 147, 209, 0.15);
}

/* 2. Cyber Matrix */
body.theme-neon {
  --bg-tertiary: #050b08;
  --bg-secondary: #0a140f;
  --bg-primary: #0c1813;
  --bg-secondary-alt: #060e0a;
  --channeltextarea-background: #10221a;
  --accent-cyan: #10b981;
  --accent-cyan-hover: #059669;
  --text-link: #34d399;
  --border-subtle: rgba(16, 185, 129, 0.2);
}

/* 3. Tactical Slate */
body.theme-minimal {
  --bg-tertiary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-primary: #1e293b;
  --bg-secondary-alt: #0f172a;
  --channeltextarea-background: #334155;
  --border-subtle: rgba(255, 255, 255, 0.08);
}

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

body {
  font-family: 'JetBrains Mono', 'Inter', -apple-system, monospace;
  background-color: var(--bg-tertiary);
  color: var(--text-normal);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

/* Allow text selection everywhere on messages, markdown, code, and logs */
.markdown-body, .message-row, .message-content, code, pre, input, textarea, .selectable, #chat-messages-container {
  user-select: text !important;
  -webkit-user-select: text !important;
}

/* Terminal Custom Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary-alt);
}
::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-cyan);
}

/* Button & interactive states */
.btn-kali {
  background-color: #1793d1;
  color: #ffffff;
  transition: all 0.15s ease;
  font-family: 'JetBrains Mono', monospace;
  border: 1px solid rgba(56, 189, 248, 0.3);
}
.btn-kali:hover {
  background-color: #0284c7;
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.4);
}

.btn-danger {
  background-color: #dc2626;
  color: #ffffff;
  transition: all 0.15s ease;
  font-family: 'JetBrains Mono', monospace;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
  background-color: #b91c1c;
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid #0b0f14;
}
.status-online { background-color: #10b981; box-shadow: 0 0 6px #10b981; }
.status-idle { background-color: #f59e0b; }
.status-dnd { background-color: #ef4444; }
.status-offline { background-color: #64748b; }

.message-row {
  transition: background-color 0.1s ease;
  font-family: 'JetBrains Mono', monospace;
}
.message-row:hover {
  background-color: rgba(30, 41, 59, 0.6);
}

.markdown-body {
  word-break: break-word;
  line-height: 1.5;
}
.markdown-body code {
  font-family: 'JetBrains Mono', monospace;
}

.fade-in {
  animation: fadeIn 0.12s ease-out;
}
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.modal-backdrop {
  backdrop-filter: blur(4px);
}
