/* =============================================================
   YUHEX CLEAN THEME v4
   Strategy: Override ONLY color variables + DaisyUI tokens.
   Do NOT touch font-size, text-transform, spacing, layout.
   Let Tailwind handle structure. We only change COLORS.
   ============================================================= */

/* ── Kill DaisyUI theme at the root ─────────────────────────── */
:root, .dark, [data-theme="discord"], [data-theme] {
  --background: 0 0% 3.9%;
  --foreground: 0 0% 67%;
  --card: 0 0% 5.5%;
  --card-foreground: 0 0% 67%;
  --popover: 0 0% 5.5%;
  --popover-foreground: 0 0% 67%;
  --primary: 190 100% 50%;
  --primary-foreground: 0 0% 3.9%;
  --secondary: 0 0% 7%;
  --secondary-foreground: 0 0% 67%;
  --muted: 0 0% 7%;
  --muted-foreground: 0 0% 40%;
  --accent: 190 100% 50%;
  --accent-foreground: 0 0% 3.9%;
  --destructive: 0 72% 51%;
  --destructive-foreground: 0 0% 91%;
  --border: 0 0% 12%;
  --input: 0 0% 12%;
  --ring: 190 100% 50%;
  --radius: 0;
  --chart-1: 190 100% 50%;
  --chart-2: 190 80% 40%;
  --chart-3: 0 0% 50%;
  --chart-4: 0 0% 40%;
  --chart-5: 0 0% 30%;
  --sidebar-background: 0 0% 3.1%;
  --sidebar-foreground: 0 0% 67%;
  --sidebar-primary: 190 100% 50%;
  --sidebar-primary-foreground: 0 0% 3.9%;
  --sidebar-accent: 0 0% 6%;
  --sidebar-accent-foreground: 0 0% 67%;
  --sidebar-border: 0 0% 12%;
  --sidebar-ring: 190 100% 50%;
  --p: 190 100% 50%;
  --pf: 190 100% 42%;
  --pc: 0 0% 3.9%;
  --s: 0 0% 10%;
  --sf: 0 0% 8%;
  --sc: 0 0% 67%;
  --a: 190 100% 50%;
  --af: 190 100% 42%;
  --ac: 0 0% 3.9%;
  --n: 0 0% 5.5%;
  --nf: 0 0% 3.9%;
  --nc: 0 0% 67%;
  --b1: 0 0% 3.9%;
  --b2: 0 0% 5.5%;
  --b3: 0 0% 3.1%;
  --bc: 0 0% 67%;
  --in: 190 100% 50%;
  --inc: 0 0% 3.9%;
  --su: 190 100% 50%;
  --suc: 0 0% 3.9%;
  --wa: 45 80% 60%;
  --wac: 0 0% 3.9%;
  --er: 0 72% 51%;
  --erc: 0 0% 91%;
  --rounded-box: 0;
  --rounded-btn: 0;
  --rounded-badge: 0;
  --tab-radius: 0;
}

/* ── Zero border-radius ─────────────────────────────────────── */
*, *::before, *::after {
  border-radius: 0 !important;
}

/* ── Font ───────────────────────────────────────────────────── */
body {
  font-family: 'JetBrains Mono', monospace !important;
  background: #0a0a0a !important;
  color: #aaaaaa !important;
  -webkit-font-smoothing: antialiased;
}

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: #1e1e1e; border: none; }
::-webkit-scrollbar-thumb:hover { background: #00d4ff; }

/* ── Selection ──────────────────────────────────────────────── */
::selection { background: #00d4ff; color: #000; }

/* =============================================================
   DISCORD → YUHEX COLOR MAP
   ============================================================= */

.bg-discord-dark-100 { background-color: #0e0e0e !important; }
.bg-discord-dark-200 { background-color: #0a0a0a !important; }
.bg-discord-dark-300 { background-color: #050505 !important; }
.bg-discord-dark-400 { background-color: #121212 !important; }
.bg-discord-dark-500 { background-color: #161616 !important; }
.bg-discord-dark-600 { background-color: #0e0e0e !important; }

.hover\:bg-discord-dark-200:hover { background-color: #0e0e0e !important; }
.hover\:bg-discord-dark-300:hover { background-color: #121212 !important; }
.hover\:bg-discord-dark-500:hover { background-color: #121212 !important; }
.hover\:bg-discord-message-hover:hover { background-color: #0e0e0e !important; }

.text-discord-text-normal { color: #aaaaaa !important; }
.text-discord-text-muted { color: #666666 !important; }
.text-discord-text-link { color: #00d4ff !important; }
.text-discord-channels-default { color: #666666 !important; }
.text-discord-channels-active { color: #00d4ff !important; }

.border-discord-dark-200 { border-color: #1e1e1e !important; }
.border-discord-dark-300 { border-color: #1e1e1e !important; }
.border-discord-dark-400 { border-color: #1e1e1e !important; }

.bg-discord-primary { background-color: #00d4ff !important; }
.bg-discord-green { background-color: #00d4ff !important; }
.bg-discord-yellow { background-color: #e8e8e8 !important; }
.bg-discord-red { background-color: #f44747 !important; }
.text-discord-primary { color: #00d4ff !important; }

.hover\:bg-discord-green:hover { background-color: #00b8d9 !important; }
.hover\:bg-discord-primary:hover { background-color: #00b8d9 !important; }

.bg-discord-button-success-default { background-color: #00d4ff !important; }
.bg-discord-button-secondary-default { background-color: #1a1a1a !important; }

.bg-\[\#5865F2\] { background-color: #00d4ff !important; }
.text-\[\#5865F2\] { color: #00d4ff !important; }
.border-\[\#5865F2\] { border-color: #00d4ff !important; }

/* ── Borders ────────────────────────────────────────────────── */
.border-discord-dark-400,
[class*="border-b"][class*="border-discord"],
[class*="border-t"][class*="border-discord"],
[class*="border-l"][class*="border-discord"],
[class*="border-r"][class*="border-discord"] {
  border-color: #1e1e1e !important;
}

.shadow-sm { box-shadow: none !important; }
.shadow-lg { box-shadow: 0 0 0 1px #1e1e1e !important; }
.shadow-xl { box-shadow: 0 0 0 1px #1e1e1e !important; }

a { color: #00d4ff; }
a:hover { color: #e8e8e8; }

input:focus, textarea:focus, select:focus {
  outline: none !important;
  border-color: #00d4ff !important;
  box-shadow: 0 0 6px rgba(0, 212, 255, 0.2) !important;
}

textarea, input { caret-color: #00d4ff !important; }

/* ── Breathing glow (chat input) ────────────────────────────── */
@keyframes yx-input-breathe {
  0%, 100% { border-color: #1e1e1e; }
  50% { border-color: rgba(0, 212, 255, 0.15); }
}

.bg-discord-dark-100 {
  animation: yx-input-breathe 4s ease-in-out infinite;
}

.bg-discord-dark-100:focus-within {
  border-color: #00d4ff !important;
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.15) !important;
  animation: none;
}

/* ── Server cards ────────────────────────────────────────────── */
@keyframes yx-card-breathe {
  0%, 100% { box-shadow: 0 0 6px rgba(0, 212, 255, 0.08); }
  50% { box-shadow: 0 0 14px rgba(0, 212, 255, 0.18); }
}

[class*="cursor-pointer"][class*="border"][class*="bg-discord-dark"] {
  border: 1px solid #242424 !important;
  animation: yx-card-breathe 4s ease-in-out infinite;
  transition: all 0.15s ease !important;
}

[class*="cursor-pointer"][class*="border"][class*="bg-discord-dark"]:hover {
  border-color: #00d4ff !important;
  box-shadow: 3px 3px 0px #003344, 0 0 16px rgba(0, 212, 255, 0.2) !important;
  transform: translate(-1px, -1px);
  animation: none;
}

/* =============================================================
   v4 — Component-Level Color Enhancements
   ============================================================= */

/* ── Sidebar / ServerList ────────────────────────────────── */
[data-testid="server-list"] {
  background-color: #050505 !important;
}

[data-testid="server-list"] .bg-discord-primary {
  border-left: 2px solid #00d4ff !important;
}

/* ── Channel section headers ─────────────────────────────── */
.uppercase.text-xs.font-semibold {
  color: #444 !important;
}

/* ── Code blocks ─────────────────────────────────────────── */
pre, code {
  background: #050505 !important;
  border: 1px solid #1e1e1e !important;
  color: #00d4ff !important;
}

/* ── Unread indicators ───────────────────────────────────── */
.bg-discord-primary.rounded-full {
  background: #00d4ff !important;
}

/* ── Context menus ───────────────────────────────────────── */
[role="menu"] {
  background: #0e0e0e !important;
  border: 1px solid #1e1e1e !important;
}

[role="menuitem"]:hover {
  background: #1a1a1a !important;
  color: #00d4ff !important;
}

/* ── Tooltips ────────────────────────────────────────────── */
[role="tooltip"] {
  background: #050505 !important;
  border: 1px solid #1e1e1e !important;
  color: #aaa !important;
}

/* ── Separator lines ─────────────────────────────────────── */
hr { border-color: #1e1e1e !important; }

/* ── Buttons (flat dark + cyan accent) ───────────────────── */
button[class*="bg-discord-primary"],
button[class*="bg-discord-green"],
button[class*="bg-discord-button-success"] {
  background: #1a1a1a !important;
  color: #00d4ff !important;
  border: 1px solid #00d4ff !important;
}

button[class*="bg-discord-primary"]:hover,
button[class*="bg-discord-green"]:hover,
button[class*="bg-discord-button-success"]:hover {
  background: #00d4ff !important;
  color: #0a0a0a !important;
}

/* ── Modals ───────────────────────────────────────────────── */
[class*="fixed"][class*="bg-discord-dark-200"] {
  border: 1px solid #00d4ff !important;
}
