/* Klik Design System — Dark Mode Overrides & Glassmorphism Tokens */

html.dark {
  --color-bg: #090c14;
  --color-surface: #121826;
  --color-surface-alt: #1a2236;
  --color-surface-glass: rgba(18, 24, 38, 0.82);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-text: #f5f5f7;
  --color-text-muted: #98989f;
  color-scheme: dark;
}

html.dark body {
  background-color: #090c14;
  color: #f5f5f7;
}

html.dark .bg-background {
  background-color: #090c14 !important;
}

html.dark .bg-surface {
  background-color: #121826 !important;
}

html.dark .bg-surface-glass {
  background-color: rgba(18, 24, 38, 0.82) !important;
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
}

html.dark .bg-surface-alt,
html.dark .hover\:bg-surface-alt:hover {
  background-color: #1a2236 !important;
}

html.dark .bg-primary-light {
  background-color: rgba(0, 122, 255, 0.15) !important;
}

html.dark .border-border {
  border-color: rgba(255, 255, 255, 0.08) !important;
}

html.dark .text-on-surface {
  color: #f5f5f7 !important;
}

html.dark .text-muted {
  color: #98989f !important;
}

html.dark .bg-red-50 {
  background-color: rgba(255, 59, 48, 0.15) !important;
  color: #ff6961 !important;
}

html.dark .text-yellow-800 {
  color: #ffd60a !important;
}

html.dark .bg-yellow-50 {
  background-color: rgba(255, 214, 10, 0.12) !important;
}

html.dark ::placeholder {
  color: #636366;
}

/* Subtle Glow for active cards & inputs */
.klik-card {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.klik-card:hover {
  transform: translateY(-1px);
}

/* Klik Chat Bubble Styles with 3D Depth & Hover */
.msg-bubble-mine {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
  color: #ffffff;
  box-shadow: 0 4px 16px -2px var(--color-primary-glow), inset 0 1px 1px rgba(255, 255, 255, 0.3);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}
.msg-bubble-mine:hover {
  transform: translateY(-1.5px) scale(1.01);
  box-shadow: 0 6px 20px -2px var(--color-primary-glow), inset 0 1px 1px rgba(255, 255, 255, 0.45);
}

.msg-bubble-theirs {
  background: rgba(235, 238, 245, 0.95);
  color: #1c1c1e;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04), inset 0 1px 1px rgba(255, 255, 255, 0.6);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}
.msg-bubble-theirs:hover {
  transform: translateY(-1.5px) scale(1.01);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08), inset 0 1px 1px rgba(255, 255, 255, 0.8);
}
html.dark .msg-bubble-theirs {
  background: rgba(30, 38, 56, 0.85);
  color: #f5f5f7;
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.08);
}
html.dark .msg-bubble-theirs:hover {
  transform: translateY(-1.5px) scale(1.01);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.14);
}

/* Klik Reaction Pill */
.klik-tapback {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.klik-tapback:hover {
  transform: scale(1.15);
}
