/* ====================================
   ZEPHYR AI — Premium Design System
   Clean. Refined. Alive.
   ==================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ====================================
   Design Tokens
   ==================================== */
:root {
  --primary-50: #f5f3ff;
  --primary-100: #ede9fe;
  --primary-200: #ddd6fe;
  --primary-300: #c4b5fd;
  --primary-400: #a78bfa;
  --primary-500: #8b5cf6;
  --primary-600: #7c3aed;
  --primary-700: #6d28d9;
  --primary-800: #5b21b6;
  --primary-900: #4c1d95;

  --accent-50: #fffbeb;
  --accent-100: #fef3c7;
  --accent-200: #fde68a;
  --accent-300: #fcd34d;
  --accent-400: #fbbf24;
  --accent-500: #f59e0b;
  --accent-600: #d97706;
  --accent-700: #b45309;

  --neutral-50: #fafafa;
  --neutral-100: #f4f4f5;
  --neutral-200: #e4e4e7;
  --neutral-300: #d4d4d8;
  --neutral-400: #a1a1aa;
  --neutral-500: #71717a;
  --neutral-600: #52525b;
  --neutral-700: #3f3f46;
  --neutral-800: #27272a;
  --neutral-900: #18181b;
  --neutral-950: #09090b;

  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;

  --bg-primary: #08080c;
  --bg-secondary: #0e0e14;
  --bg-tertiary: #16161e;
  --bg-elevated: #1e1e28;
  --bg-glass: rgba(14, 14, 20, 0.75);
  --bg-glass-hover: rgba(22, 22, 30, 0.85);

  --text-primary: #f0f0f3;
  --text-secondary: #9898a6;
  --text-tertiary: #5c5c6e;

  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-default: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(139, 92, 246, 0.15);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Outfit', var(--font-sans);

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;

  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;
  --radius-full: 9999px;

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal-backdrop: 300;
  --z-modal: 400;
  --z-toast: 500;

  --sidebar-width: 280px;
  --header-height: 60px;
  --chat-max-width: 780px;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background: var(--bg-primary);
  min-height: 100vh;
  overflow: hidden;
}

a {
  color: var(--primary-400);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-300);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

::selection {
  background: color-mix(in srgb, var(--primary-500) 35%, transparent);
  color: white;
}

* {
  -webkit-tap-highlight-color: transparent;
}

*:focus-visible {
  outline: 2px solid var(--primary-500);
  outline-offset: 2px;
}

/* ====================================
   Ambient Background
   ==================================== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 20% 0%, rgba(139, 92, 246, 0.10), transparent 60%),
    radial-gradient(ellipse 50% 40% at 80% 100%, rgba(251, 191, 36, 0.05), transparent 50%);
  pointer-events: none;
  z-index: -1;
  animation: ambient-shift 20s ease-in-out infinite alternate;
}

@keyframes ambient-shift {
  0% {
    opacity: 0.8;
  }

  100% {
    opacity: 1;
    filter: hue-rotate(8deg);
  }
}

/* Subtle background elements */
.cyber-grid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(0, 0, 0, 0.3), transparent 70%);
}

.scan-lines {
  display: none;
}

.holo-orb {
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
}

.holo-orb-1 {
  width: 500px;
  height: 500px;
  top: -150px;
  left: -100px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.08), transparent 70%);
  filter: blur(80px);
  animation: orb-drift 25s ease-in-out infinite;
}

.holo-orb-2 {
  width: 400px;
  height: 400px;
  bottom: -100px;
  right: -80px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.05), transparent 70%);
  filter: blur(90px);
  animation: orb-drift 30s ease-in-out infinite reverse;
}

@keyframes orb-drift {

  0%,
  100% {
    transform: translate(0, 0);
  }

  33% {
    transform: translate(40px, 30px);
  }

  66% {
    transform: translate(-20px, -40px);
  }
}

/* ====================================
   Loading Screen
   ==================================== */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-content {
  text-align: center;
  animation: fade-up 0.6s ease;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.loader-logo {
  font-size: 3.5rem;
  margin-bottom: var(--space-4);
  filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.4));
  animation: loader-breath 2.5s ease-in-out infinite;
}

@keyframes loader-breath {

  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.4));
  }

  50% {
    transform: scale(1.06);
    filter: drop-shadow(0 0 35px rgba(139, 92, 246, 0.6));
  }
}

.loader-text {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-6);
  letter-spacing: -0.02em;
}

.loader-bar {
  width: 180px;
  height: 3px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  margin: 0 auto var(--space-4);
  overflow: hidden;
}

.loader-progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--primary-500), var(--primary-400));
  border-radius: var(--radius-full);
  animation: loader-fill 1.5s ease forwards;
}

@keyframes loader-fill {
  0% {
    width: 0%;
  }

  50% {
    width: 70%;
  }

  100% {
    width: 100%;
  }
}

.loader-tagline {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  letter-spacing: 2px;
  text-transform: uppercase;
  animation: fade-in 0.8s ease 0.5s both;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ====================================
   Layout
   ==================================== */
.app-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  background: var(--bg-glass);
  backdrop-filter: blur(24px) saturate(150%);
  border-right: 1px solid var(--border-subtle);
  z-index: var(--z-sticky);
  transition: transform var(--transition-slow);
  position: relative;
}

.sidebar-header {
  padding: var(--space-5) var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-lg);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
  transition: box-shadow var(--transition-base);
}

.logo-icon:hover {
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.35);
}

.logo-text {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.logo-badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  background: var(--accent-500);
  color: var(--neutral-900);
  border-radius: var(--radius-full);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-content {
  flex: 1;
  padding: var(--space-3);
  overflow-y: auto;
}

.sidebar-section {
  margin-bottom: var(--space-4);
}

.sidebar-section-title {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-tertiary);
  padding: var(--space-2) var(--space-3);
  margin-bottom: var(--space-1);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: var(--text-sm);
  transition: all var(--transition-base);
  border: 1px solid transparent;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.nav-item.active {
  background: color-mix(in srgb, var(--primary-500) 10%, transparent);
  color: var(--text-primary);
  border-color: color-mix(in srgb, var(--primary-500) 15%, transparent);
}

.nav-item-icon {
  width: 18px;
  height: 18px;
  opacity: 0.6;
  transition: opacity var(--transition-fast);
}

.nav-item:hover .nav-item-icon,
.nav-item.active .nav-item-icon {
  opacity: 1;
}

.btn-new-chat {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--primary-600);
  color: white;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: var(--text-sm);
  transition: all var(--transition-base);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.25);
}

.btn-new-chat:hover {
  background: var(--primary-500);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35);
  transform: translateY(-1px);
}

.btn-new-chat:active {
  transform: translateY(0);
}

.sidebar-footer {
  padding: var(--space-3);
  border-top: 1px solid var(--border-subtle);
}

/* Header */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.header {
  height: var(--header-height);
  padding: 0 var(--space-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-glass);
  backdrop-filter: blur(24px);
}

.header-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.btn-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-tertiary);
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.btn-icon svg {
  width: 18px;
  height: 18px;
}

/* Chat Area */
.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: view-enter 0.3s ease;
}

@keyframes view-enter {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-6);
  scroll-behavior: smooth;
}

.chat-messages-inner {
  max-width: var(--chat-max-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

/* ====================================
   Welcome Screen
   ==================================== */
.welcome-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-12);
  min-height: 60vh;
  animation: welcome-enter 0.8s ease;
}

@keyframes welcome-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.welcome-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: var(--primary-400);
  border-radius: 50%;
  opacity: 0;
  animation: particle-drift 5s ease-in-out infinite;
}

@keyframes particle-drift {
  0% {
    opacity: 0;
    transform: translateY(60px) scale(0);
  }

  30% {
    opacity: 0.6;
  }

  70% {
    opacity: 0.6;
  }

  100% {
    opacity: 0;
    transform: translateY(-60px) scale(1);
  }
}

.welcome-icon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
  border-radius: var(--radius-2xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: var(--space-6);
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.15), 0 8px 24px rgba(0, 0, 0, 0.3);
  animation: icon-float 5s ease-in-out infinite;
}

@keyframes icon-float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

.welcome-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 800;
  margin-bottom: var(--space-3);
  letter-spacing: -0.03em;
  line-height: var(--leading-tight);
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--primary-300));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Override corny glitch effect � clean shimmer instead */
.glitch {
  position: relative;
}

.glitch::before,
.glitch::after {
  display: none !important;
}

.welcome-subtitle {
  font-size: var(--text-base);
  color: var(--text-secondary);
  max-width: 480px;
  margin-bottom: var(--space-6);
  line-height: var(--leading-relaxed);
}

.ai-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
  margin-bottom: var(--space-8);
}

.capability-tag {
  padding: var(--space-2) var(--space-3);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: all var(--transition-base);
}

.capability-tag:hover {
  background: color-mix(in srgb, var(--primary-500) 8%, transparent);
  border-color: color-mix(in srgb, var(--primary-500) 20%, transparent);
  color: var(--primary-300);
  transform: translateY(-1px);
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-3);
  width: 100%;
  max-width: 600px;
}

.quick-action-card {
  padding: var(--space-5);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  text-align: left;
  transition: all var(--transition-base);
  position: relative;
}

.quick-action-card:hover {
  background: var(--bg-glass-hover);
  border-color: rgba(139, 92, 246, 0.15);
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(139, 92, 246, 0.08);
}

.quick-action-icon {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-3);
  display: inline-block;
}

.quick-action-card:hover .quick-action-icon {
  transform: scale(1.1);
}

.quick-action-title {
  font-weight: 600;
  font-family: var(--font-display);
  color: var(--text-primary);
  margin-bottom: var(--space-1);
  position: relative;
  z-index: 1;
}

.quick-action-desc {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  position: relative;
  z-index: 1;
}

.stagger-in>* {
  animation: stagger-up 0.5s ease both;
}

.stagger-in>*:nth-child(1) {
  animation-delay: 0s;
}

.stagger-in>*:nth-child(2) {
  animation-delay: 0.08s;
}

.stagger-in>*:nth-child(3) {
  animation-delay: 0.16s;
}

.stagger-in>*:nth-child(4) {
  animation-delay: 0.24s;
}

@keyframes stagger-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.keyboard-hints {
  margin-top: var(--space-8);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  opacity: 0.6;
}

.kbd {
  display: inline-block;
  padding: 2px 6px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: var(--text-xs);
  box-shadow: 0 1px 0 var(--bg-elevated);
}

.keyboard-hints .divider {
  margin: 0 var(--space-2);
  opacity: 0.4;
}

/* ====================================
   Messages
   ==================================== */
.message {
  display: flex;
  gap: var(--space-3);
  animation: msg-in 0.35s ease;
}

@keyframes msg-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: var(--text-base);
}

.message.user .message-avatar {
  background: linear-gradient(135deg, var(--accent-400), var(--accent-600));
}

.message.assistant .message-avatar {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.2);
}

.message-content {
  flex: 1;
  min-width: 0;
}

.message-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-1);
}

.message-author {
  font-weight: 600;
  font-size: var(--text-sm);
}

.message-time {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.message-body {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-4) var(--space-5);
  line-height: var(--leading-relaxed);
  transition: border-color var(--transition-fast);
}

.message-body:hover {
  border-color: var(--border-default);
}

.message.user .message-body {
  background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
  border-color: rgba(139, 92, 246, 0.25);
}

.message-body p {
  margin-bottom: var(--space-2);
}

.message-body p:last-child {
  margin-bottom: 0;
}

.message-body h2,
.message-body h3,
.message-body h4 {
  color: var(--primary-300, #a78bfa);
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
  font-weight: 700;
  line-height: 1.3;
}

.message-body h2 {
  font-size: 1.15em;
}

.message-body h3 {
  font-size: 1.05em;
}

.message-body h4 {
  font-size: 1em;
  color: var(--accent-400, #06b6d4);
}

.message-body h2:first-child,
.message-body h3:first-child,
.message-body h4:first-child {
  margin-top: 0;
}

.message-body ul,
.message-body ol {
  margin: var(--space-2) 0;
  padding-left: var(--space-5);
}

.message-body li {
  margin-bottom: var(--space-1);
  line-height: 1.6;
}

.message-body li:last-child {
  margin-bottom: 0;
}

.message-body code {
  background: var(--bg-tertiary);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
}

.message-body strong {
  color: var(--primary-300);
}

/* Typing */
.typing-indicator {
  display: flex;
  gap: 5px;
  padding: var(--space-3);
}

.typing-dot {
  width: 7px;
  height: 7px;
  background: var(--text-tertiary);
  border-radius: 50%;
  animation: typing-pulse 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typing-pulse {

  0%,
  80%,
  100% {
    transform: scale(0.7);
    opacity: 0.4;
  }

  40% {
    transform: scale(1.1);
    opacity: 1;
  }
}

/* Message Actions */
.message-actions {
  display: flex;
  gap: var(--space-1);
  margin-top: var(--space-2);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.message:hover .message-actions {
  opacity: 1;
}

.msg-action-btn {
  padding: var(--space-1) var(--space-2);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 4px;
}

.msg-action-btn:hover {
  background: var(--primary-600);
  border-color: var(--primary-500);
  color: white;
}

.msg-action-btn.copied {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

/* Gradient flow on assistant messages */
.message.assistant .message-body {
  position: relative;
  overflow: hidden;
}

.message.assistant .message-body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-500), transparent);
  opacity: 0.4;
}

/* Typewriter */
.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  background: var(--primary-400);
  margin-left: 1px;
  animation: blink 0.8s infinite;
  vertical-align: text-bottom;
}

@keyframes blink {

  0%,
  50% {
    opacity: 1;
  }

  51%,
  100% {
    opacity: 0;
  }
}

/* Smart Suggestions */
.smart-suggestions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-subtle);
}

.smart-suggestion {
  padding: var(--space-2) var(--space-3);
  background: rgba(139, 92, 246, 0.06);
  border: 1px solid rgba(139, 92, 246, 0.12);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--primary-300);
  cursor: pointer;
  transition: all var(--transition-base);
}

.smart-suggestion:hover {
  background: var(--primary-600);
  border-color: var(--primary-500);
  color: white;
  transform: translateY(-1px);
}

/* ====================================
   Chat Input
   ==================================== */
.chat-input-container {
  padding: var(--space-3) var(--space-6) var(--space-5);
  background: linear-gradient(to top, var(--bg-primary) 40%, transparent);
}

.chat-input-wrapper {
  max-width: var(--chat-max-width);
  margin: 0 auto;
}

.mood-chips {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: var(--space-3);
}

.mood-chip {
  padding: var(--space-2) var(--space-3);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  white-space: nowrap;
  transition: all var(--transition-base);
}

.mood-chip:hover {
  background: rgba(139, 92, 246, 0.1);
  border-color: rgba(139, 92, 246, 0.2);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.mood-chip.selected {
  background: var(--primary-600);
  border-color: transparent;
  color: white;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

.chat-input-box {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-2xl);
  padding: var(--space-2) var(--space-3);
  transition: all var(--transition-base);
  position: relative;
}

.chat-input-box:focus-within {
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.08), 0 8px 24px rgba(0, 0, 0, 0.15);
}

.chat-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: var(--text-base);
  padding: var(--space-2) var(--space-3);
  resize: none;
  max-height: 150px;
  line-height: var(--leading-normal);
}

.chat-input::placeholder {
  color: var(--text-tertiary);
}

.chat-input-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.btn-attach,
.btn-emoji,
.btn-voice {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-tertiary);
  transition: all var(--transition-fast);
  font-size: 1.1rem;
  position: relative;
}

.btn-attach:hover,
.btn-emoji:hover,
.btn-voice:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.btn-voice.listening {
  background: var(--error);
  color: white;
  animation: voice-pulse 1.2s ease-in-out infinite;
}

.btn-voice.listening svg {
  display: none;
}

.voice-wave {
  display: none;
  gap: 2px;
  height: 14px;
  align-items: center;
}

.btn-voice.listening .voice-wave {
  display: flex;
}

.voice-wave span {
  width: 2px;
  background: white;
  border-radius: 1px;
  animation: voice-bar 0.7s ease-in-out infinite;
}

.voice-wave span:nth-child(1) {
  animation-delay: 0s;
}

.voice-wave span:nth-child(2) {
  animation-delay: 0.1s;
}

.voice-wave span:nth-child(3) {
  animation-delay: 0.2s;
}

.voice-wave span:nth-child(4) {
  animation-delay: 0.3s;
}

.voice-wave span:nth-child(5) {
  animation-delay: 0.4s;
}

@keyframes voice-bar {

  0%,
  100% {
    height: 3px;
  }

  50% {
    height: 14px;
  }
}

@keyframes voice-pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.3);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
}

.btn-send {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-600);
  border-radius: var(--radius-lg);
  color: white;
  transition: all var(--transition-base);
}

.btn-send:hover:not(:disabled) {
  background: var(--primary-500);
  transform: scale(1.05);
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.4);
}

.btn-send:active:not(:disabled) {
  transform: scale(0.95);
}

.btn-send:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background: var(--bg-tertiary);
}

.emoji-container {
  position: relative;
}

.emoji-picker {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: var(--space-2);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--space-3);
  display: none;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 260px;
  box-shadow: var(--shadow-xl);
  z-index: 100;
  animation: picker-in 0.2s ease;
}

.emoji-picker.active {
  display: flex;
}

@keyframes picker-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.emoji-picker button {
  font-size: 1.3rem;
  padding: var(--space-1);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.emoji-picker button:hover {
  transform: scale(1.2);
  background: rgba(255, 255, 255, 0.05);
}

.chat-input-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-2);
  padding: 0 var(--space-2);
}

.footer-branding {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-logo-icon {
  font-size: 14px;
  filter: drop-shadow(0 0 4px rgba(139, 92, 246, 0.6));
  animation: footer-icon-glow 2s ease-in-out infinite alternate;
}

@keyframes footer-icon-glow {
  0% {
    filter: drop-shadow(0 0 3px rgba(139, 92, 246, 0.4));
  }

  100% {
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.8));
  }
}

.footer-brand-text {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  letter-spacing: 0.3px;
}

.footer-brand-text strong {
  background: linear-gradient(135deg, var(--primary-300), var(--primary-400));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 600;
}

.footer-divider {
  width: 1px;
  height: 12px;
  background: linear-gradient(to bottom, transparent, var(--primary-500), transparent);
  opacity: 0.4;
}

.footer-tagline {
  font-size: 11px;
  color: var(--text-tertiary);
  font-style: italic;
  opacity: 0.6;
  background: linear-gradient(90deg, var(--text-tertiary) 0%, rgba(139, 92, 246, 0.7) 50%, var(--text-tertiary) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: footer-shimmer 4s ease-in-out infinite;
}

@keyframes footer-shimmer {

  0%,
  100% {
    background-position: -200% 0;
  }

  50% {
    background-position: 200% 0;
  }
}

.char-counter {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  font-variant-numeric: tabular-nums;
}

.char-counter.warning {
  color: var(--warning);
}

.char-counter.error {
  color: var(--error);
}

/* ====================================
   Modals
   ==================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: var(--z-modal-backdrop);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-base);
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  background: var(--bg-glass);
  backdrop-filter: blur(30px) saturate(150%);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl), 0 0 40px rgba(0, 0, 0, 0.3);
  z-index: var(--z-modal);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.modal-large {
  max-width: 700px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
}

.modal-close {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.modal-body {
  padding: var(--space-6);
  overflow-y: auto;
  max-height: calc(90vh - 140px);
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border-subtle);
}

/* ====================================
   Forms
   ==================================== */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

.form-input,
.form-select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-input::placeholder {
  color: var(--text-tertiary);
}

.form-input-group {
  display: flex;
  gap: var(--space-3);
}

.form-input-group .form-input {
  flex: 1;
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-top: var(--space-1);
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
}

.form-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.form-checkbox:hover {
  border-color: rgba(139, 92, 246, 0.3);
}

.form-checkbox.selected {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.3);
}

.form-checkbox.selected .form-checkbox-label {
  color: var(--primary-300);
}

.form-checkbox input {
  display: none;
}

.form-checkbox-label {
  font-size: var(--text-sm);
  font-weight: 500;
}

.form-range {
  width: 100%;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  appearance: none;
  cursor: pointer;
}

.form-range::-webkit-slider-thumb {
  appearance: none;
  width: 16px;
  height: 16px;
  background: var(--primary-500);
  border-radius: 50%;
  cursor: pointer;
  transition: box-shadow var(--transition-fast);
}

.form-range::-webkit-slider-thumb:hover {
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.2);
}

/* ====================================
   Buttons
   ==================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}

.btn-primary {
  background: var(--primary-600);
  color: white;
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.25);
}

.btn-primary:hover {
  background: var(--primary-500);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.btn-ghost {
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent-500), var(--accent-600));
  color: var(--neutral-900);
}

.btn-accent:hover {
  box-shadow: 0 4px 16px rgba(251, 191, 36, 0.3);
}

/* ====================================
   Cards
   ==================================== */
.card {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  transition: all var(--transition-base);
}

.card:hover {
  border-color: var(--border-default);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.card-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
}

.card-body {
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* Upload Zone */
.upload-zone {
  border: 2px dashed var(--border-default);
  border-radius: var(--radius-xl);
  padding: var(--space-10);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--primary-500);
  background: rgba(139, 92, 246, 0.04);
}

.upload-zone-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-4);
  background: var(--bg-tertiary);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

.upload-zone-title {
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.upload-zone-subtitle {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

.upload-preview {
  margin-top: var(--space-5);
  position: relative;
}

.upload-preview img {
  max-width: 100%;
  max-height: 300px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
}

.upload-preview-remove {
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  width: 28px;
  height: 28px;
  background: var(--error);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.upload-preview-remove:hover {
  transform: scale(1.1);
}

/* Trends */
.trend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-4);
}

.trend-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-base);
}

.trend-card:hover {
  transform: translateY(-4px);
  border-color: rgba(139, 92, 246, 0.15);
  box-shadow: var(--shadow-xl);
}

.trend-card-image {
  width: 100%;
  height: 160px;
  background: var(--bg-tertiary);
  object-fit: cover;
  transition: transform 0.5s ease;
}

.trend-card:hover .trend-card-image {
  transform: scale(1.04);
}

.trend-card-content {
  padding: var(--space-4);
}

.trend-card-tag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--primary-600);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  margin-bottom: var(--space-2);
}

.trend-card-title {
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.trend-card-desc {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

/* Tabs */
.tabs {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-5);
}

.tab {
  flex: 1;
  padding: var(--space-2) var(--space-4);
  text-align: center;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-tertiary);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.tab:hover {
  color: var(--text-secondary);
}

.tab.active {
  background: var(--primary-600);
  color: white;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fade-in 0.2s ease;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  animation: toast-in 0.3s ease;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateX(100%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.toast-success .toast-icon {
  color: var(--success);
}

.toast-error .toast-icon {
  color: var(--error);
}

.toast-message {
  font-size: var(--text-sm);
}

.toast-close {
  width: 20px;
  height: 20px;
  margin-left: var(--space-3);
  color: var(--text-tertiary);
  cursor: pointer;
}

/* API / AI Status */
.api-status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.api-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-tertiary);
}

.api-status.connected .api-status-dot {
  background: var(--success);
  box-shadow: 0 0 6px var(--success);
}

.api-status.disconnected .api-status-dot {
  background: var(--error);
}

.ai-status {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 2px 8px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  font-size: 10px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.ai-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--success);
  animation: status-blink 2s ease-in-out infinite;
}

.ai-status.thinking .ai-status-dot {
  background: var(--accent-400);
}

.ai-status.error .ai-status-dot {
  background: var(--error);
  animation: none;
}

@keyframes status-blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

/* Daily Tip */
.daily-tip-card {
  padding: var(--space-4);
  background: rgba(139, 92, 246, 0.04);
  border: 1px solid rgba(139, 92, 246, 0.1);
  border-radius: var(--radius-xl);
  margin: 0 var(--space-3);
  transition: border-color var(--transition-base);
}

.daily-tip-card:hover {
  border-color: rgba(139, 92, 246, 0.2);
}

.tip-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.tip-icon {
  font-size: 1.1rem;
}

.tip-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary-300);
}

.tip-content {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: var(--space-3);
}

.tip-action {
  width: 100%;
  padding: var(--space-2);
  background: transparent;
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-md);
  color: var(--primary-400);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tip-action:hover {
  background: var(--primary-600);
  color: white;
  border-color: transparent;
}

/* Holo Card */
.holo-card {
  position: relative;
  overflow: hidden;
}

.holo-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.03) 50%, transparent 60%);
  background-size: 250% 100%;
  animation: holo-sweep 4s ease-in-out infinite;
}

@keyframes holo-sweep {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Neon text */
.neon-text {
  color: var(--primary-400);
  text-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
}

/* History Items */
.history-item {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.history-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.history-item.active {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.12);
}

.history-item-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  flex: 1;
}

.history-title {
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-date {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
}

.history-delete-btn {
  opacity: 0;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.history-item:hover .history-delete-btn {
  opacity: 1;
}

.history-delete-btn:hover {
  background: var(--error);
  color: white;
}

/* Skeleton */
.skeleton {
  background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-elevated) 50%, var(--bg-tertiary) 75%);
  background-size: 300% 100%;
  animation: shimmer 1.8s ease-in-out infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

.skeleton-text {
  height: 1em;
  margin-bottom: var(--space-2);
}

.skeleton-text:last-child {
  width: 70%;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--neutral-600);
}

/* Utilities */
.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.text-center {
  text-align: center;
}

.mt-4 {
  margin-top: var(--space-4);
}

.mb-4 {
  margin-bottom: var(--space-4);
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: var(--space-2);
}

.gap-4 {
  gap: var(--space-4);
}

.glass {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
}

.glow-text {
  text-shadow: 0 0 8px currentColor;
}

/* Menu toggle */
.menu-toggle {
  display: none;
}

/* ====================================
   Responsive
   ==================================== */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .header {
    padding: 0 var(--space-4);
  }

  .chat-messages {
    padding: var(--space-4);
  }

  .chat-input-container {
    padding: var(--space-3) var(--space-4) var(--space-4);
  }

  .welcome-screen {
    padding: var(--space-6);
  }

  .welcome-title {
    font-size: var(--text-2xl);
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .modal {
    width: 95%;
    max-height: 85vh;
  }

  .menu-toggle {
    display: flex;
  }

  .cyber-grid,
  .holo-orb {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ====================================
   VISUAL MAGIC LAYER
   Glowy, Animated, Premium, Alive
   ==================================== */

/* --- Richer Background --- */
body {
  background:
    radial-gradient(ellipse 80% 60% at 15% -10%, rgba(139, 92, 246, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 50% at 85% 110%, rgba(251, 191, 36, 0.06), transparent 50%),
    radial-gradient(ellipse 40% 30% at 50% 50%, rgba(59, 130, 246, 0.04), transparent 40%),
    var(--bg-primary);
  background-attachment: fixed;
}

body::after {
  content: '';
  position: fixed;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.12), transparent 70%);
  border-radius: 50%;
  top: 15%;
  right: 8%;
  pointer-events: none;
  z-index: -1;
  filter: blur(60px);
  animation: bg-orb-float 18s ease-in-out infinite;
}

@keyframes bg-orb-float {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.7;
  }

  33% {
    transform: translate(-40px, 30px) scale(1.1);
    opacity: 0.9;
  }

  66% {
    transform: translate(20px, -40px) scale(0.95);
    opacity: 0.6;
  }
}

/* --- Orbs Enhanced --- */
.holo-orb-1 {
  width: 500px;
  height: 500px;
  background: conic-gradient(from 0deg, rgba(139, 92, 246, 0.15), rgba(59, 130, 246, 0.1), rgba(236, 72, 153, 0.08), rgba(139, 92, 246, 0.15));
  filter: blur(100px);
  animation: orb-drift 22s ease-in-out infinite, orb-hue 15s linear infinite;
}

.holo-orb-2 {
  width: 400px;
  height: 400px;
  background: conic-gradient(from 180deg, rgba(16, 185, 129, 0.1), rgba(59, 130, 246, 0.12), rgba(139, 92, 246, 0.1), rgba(16, 185, 129, 0.1));
  filter: blur(110px);
  animation: orb-drift 28s ease-in-out infinite reverse, orb-hue 18s linear infinite reverse;
}

@keyframes orb-hue {

  0%,
  100% {
    filter: blur(100px) hue-rotate(0deg);
  }

  50% {
    filter: blur(100px) hue-rotate(20deg);
  }
}

/* --- Grid Subtle Pulse --- */
.cyber-grid {
  animation: grid-breathe 6s ease-in-out infinite;
}

@keyframes grid-breathe {

  0%,
  100% {
    opacity: 0.3;
  }

  50% {
    opacity: 0.5;
  }
}

/* --- Logo Breathing Glow --- */
.logo-icon {
  animation: logo-glow 3s ease-in-out infinite;
  transition: all var(--transition-base);
}

@keyframes logo-glow {

  0%,
  100% {
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.25);
  }

  50% {
    box-shadow: 0 0 35px rgba(139, 92, 246, 0.45), 0 0 60px rgba(139, 92, 246, 0.15);
  }
}

.logo-icon:hover {
  transform: scale(1.08) rotate(-3deg);
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.5);
}

/* --- Logo Text Gradient Shift --- */
.logo-text {
  background: linear-gradient(135deg, var(--text-primary), var(--primary-300), var(--accent-300));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: text-gradient 6s ease infinite;
}

@keyframes text-gradient {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

/* --- Badge Shine --- */
.logo-badge {
  position: relative;
  overflow: hidden;
}

.logo-badge::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: badge-shine 3s ease-in-out infinite;
}

@keyframes badge-shine {

  0%,
  70% {
    left: -100%;
  }

  100% {
    left: 100%;
  }
}

/* --- Sidebar Glow Edge --- */
.sidebar {
  position: relative;
}

.sidebar::after {
  content: '';
  position: absolute;
  top: 0;
  right: -1px;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent, rgba(139, 92, 246, 0.3), rgba(251, 191, 36, 0.15), rgba(139, 92, 246, 0.3), transparent);
  animation: sidebar-glow 4s ease-in-out infinite;
}

@keyframes sidebar-glow {

  0%,
  100% {
    opacity: 0.4;
  }

  50% {
    opacity: 0.8;
  }
}

/* --- Nav Items Enhanced Hover --- */
.nav-item {
  position: relative;
  overflow: hidden;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--primary-400), var(--accent-400));
  transform: scaleY(0);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: var(--radius-full);
}

.nav-item:hover {
  transform: translateX(4px);
  background: var(--bg-glass-hover);
}

.nav-item:hover::before {
  transform: scaleY(1);
}

.nav-item.active::before {
  transform: scaleY(1);
}

.nav-item.active {
  box-shadow: inset 0 0 16px rgba(139, 92, 246, 0.06);
}

/* --- New Chat Button Glow --- */
.btn-new-chat {
  position: relative;
  overflow: hidden;
}

.btn-new-chat::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.btn-new-chat:hover::after {
  transform: translateX(100%);
}

.btn-new-chat:hover {
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.4), 0 0 0 1px rgba(139, 92, 246, 0.3);
}

/* --- Header Glow Line --- */
.header {
  position: relative;
}

.header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 10%, rgba(139, 92, 246, 0.3) 50%, transparent 90%);
  animation: header-pulse 3s ease-in-out infinite;
}

@keyframes header-pulse {

  0%,
  100% {
    opacity: 0.3;
  }

  50% {
    opacity: 0.7;
  }
}

/* --- Welcome Icon Enhanced --- */
.welcome-icon {
  position: relative;
  animation: icon-float 5s ease-in-out infinite, icon-glow 3s ease-in-out infinite;
}

@keyframes icon-glow {

  0%,
  100% {
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.2), 0 8px 24px rgba(0, 0, 0, 0.3);
  }

  50% {
    box-shadow: 0 0 50px rgba(139, 92, 246, 0.35), 0 12px 32px rgba(0, 0, 0, 0.25);
  }
}

.welcome-icon::after {
  content: '';
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: inherit;
  animation: icon-ring-expand 3s ease-in-out infinite;
}

@keyframes icon-ring-expand {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.15);
    opacity: 0;
  }
}

/* --- Welcome Title Shimmer --- */
.welcome-title {
  background: linear-gradient(135deg, var(--text-primary) 20%, var(--primary-300) 50%, var(--accent-300) 80%, var(--text-primary) 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: title-shimmer 4s ease-in-out infinite;
}

@keyframes title-shimmer {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

/* --- Capability Tags Wave --- */
.capability-tag {
  animation: tag-wave 3.5s ease-in-out infinite;
}

.capability-tag:nth-child(1) {
  animation-delay: 0s;
}

.capability-tag:nth-child(2) {
  animation-delay: 0.15s;
}

.capability-tag:nth-child(3) {
  animation-delay: 0.3s;
}

.capability-tag:nth-child(4) {
  animation-delay: 0.45s;
}

@keyframes tag-wave {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}

.capability-tag:hover {
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.2);
  transform: translateY(-2px) scale(1.03);
}

/* --- Quick Action Cards Glow Hover --- */
.quick-action-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(139, 92, 246, 0.08), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: inherit;
}

.quick-action-card:hover::before {
  opacity: 1;
}

.quick-action-card:hover {
  border-color: rgba(139, 92, 246, 0.2);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(139, 92, 246, 0.08);
}

.quick-action-icon {
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quick-action-card:hover .quick-action-icon {
  transform: scale(1.15) rotate(5deg);
  filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.4));
}

/* --- Messages Hover & Glow --- */
.message-body {
  transition: all 0.3s ease;
}

.message.user .message-body:hover {
  box-shadow: 0 8px 28px rgba(139, 92, 246, 0.25);
  transform: translateY(-1px);
}

.message.assistant .message-body:hover {
  border-color: rgba(139, 92, 246, 0.15);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

/* --- AI Avatar in Messages --- */
.message.assistant .message-avatar {
  animation: avatar-breathe 3s ease-in-out infinite;
}

@keyframes avatar-breathe {

  0%,
  100% {
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.25);
  }

  50% {
    box-shadow: 0 0 22px rgba(139, 92, 246, 0.45);
  }
}

/* --- Message Entry Stagger --- */
.message {
  animation: msg-slide 0.45s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes msg-slide {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
    filter: blur(2px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* --- Typing Dots Color Shift --- */
.typing-dot {
  animation: typing-color 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(1) {
  animation-delay: 0s;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.15s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typing-color {

  0%,
  80%,
  100% {
    transform: scale(0.7);
    opacity: 0.4;
    background: var(--primary-500);
  }

  40% {
    transform: scale(1.2);
    opacity: 1;
    background: var(--accent-400);
  }
}

/* --- Chat Input Neon Focus --- */
.chat-input-box {
  position: relative;
}

.chat-input-box::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--primary-500), var(--accent-400), var(--primary-500));
  background-size: 300% 300%;
  border-radius: calc(var(--radius-2xl) + 2px);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
  animation: input-border-flow 3s ease infinite;
}

.chat-input-box:focus-within::before {
  opacity: 1;
}

@keyframes input-border-flow {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

.chat-input-box:focus-within {
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1), 0 8px 28px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

/* --- Send Button Power --- */
.btn-send {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-send:hover:not(:disabled) {
  transform: scale(1.12) rotate(-5deg);
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.5);
}

.btn-send:active:not(:disabled) {
  transform: scale(0.92);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.6);
}

/* --- Mood Chips Bouncy --- */
.mood-chip {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mood-chip:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.2);
}

.mood-chip:active {
  transform: translateY(0) scale(0.97);
}

/* --- Buttons Lift --- */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.btn-primary:hover::before {
  transform: translateX(100%);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35), 0 0 0 1px rgba(139, 92, 246, 0.2);
}

/* --- Cards Hover Lift --- */
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25), 0 0 30px rgba(139, 92, 246, 0.06);
  border-color: rgba(139, 92, 246, 0.12);
}

/* --- Trend Cards Zoom + Glow --- */
.trend-card {
  overflow: hidden;
}

.trend-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(139, 92, 246, 0.15);
}

.trend-card:hover .trend-card-image {
  transform: scale(1.08);
  filter: brightness(1.1);
}

.trend-card-image {
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

/* --- Modal Cinematic Entry --- */
.modal.active {
  animation: modal-enter 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-enter {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.92) translateY(12px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) translateY(0);
  }
}

.modal-backdrop.active {
  animation: backdrop-in 0.3s ease;
}

@keyframes backdrop-in {
  from {
    backdrop-filter: blur(0);
  }

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

/* --- Daily Tip Shine --- */
.daily-tip-card {
  position: relative;
  overflow: hidden;
}

.daily-tip-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 42%, rgba(255, 255, 255, 0.02) 50%, transparent 58%);
  animation: tip-shine 5s ease-in-out infinite;
}

@keyframes tip-shine {
  0% {
    transform: translateX(-100%) rotate(45deg);
  }

  100% {
    transform: translateX(100%) rotate(45deg);
  }
}

.tip-action:hover {
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
  transform: translateY(-1px);
}

/* --- Form Inputs Glow Focus --- */
.form-input:focus,
.form-select:focus {
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12), 0 0 16px rgba(139, 92, 246, 0.06);
  transform: translateY(-1px);
}

.form-checkbox {
  transition: all var(--transition-base);
}

.form-checkbox:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.form-checkbox.selected {
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.2);
}

/* --- History Items Slide --- */
.history-item {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.history-item:hover {
  transform: translateX(6px);
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.05), transparent 80%);
}

.history-delete-btn:hover {
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
  transform: scale(1.1);
}

/* --- Upload Zone Magnetic --- */
.upload-zone {
  transition: all 0.35s ease;
}

.upload-zone:hover {
  transform: scale(1.01);
  box-shadow: inset 0 0 24px rgba(139, 92, 246, 0.04), 0 0 24px rgba(139, 92, 246, 0.06);
}

.upload-zone.dragover {
  transform: scale(1.03);
  animation: drop-pulse 1s ease-in-out infinite;
}

@keyframes drop-pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.3);
  }

  50% {
    box-shadow: 0 0 0 12px rgba(139, 92, 246, 0);
  }
}

/* --- Tab Activate --- */
.tab {
  transition: all 0.25s ease;
}

.tab:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
}

.tab.active {
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
}

/* --- Toast Bounce In --- */
.toast {
  animation: toast-bounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes toast-bounce {
  from {
    opacity: 0;
    transform: translateX(100%) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* --- Scrollbar Glow --- */
::-webkit-scrollbar-thumb {
  transition: background 0.2s;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--primary-600), var(--primary-800));
}

/* --- Loader Enhanced --- */
.loader-logo {
  animation: loader-breathe 2s ease-in-out infinite;
}

@keyframes loader-breathe {

  0%,
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 20px rgba(139, 92, 246, 0.4));
  }

  25% {
    transform: scale(1.08) rotate(-3deg);
    filter: drop-shadow(0 0 40px rgba(139, 92, 246, 0.6));
  }

  75% {
    transform: scale(1.08) rotate(3deg);
    filter: drop-shadow(0 0 40px rgba(139, 92, 246, 0.6));
  }
}

.loader-progress {
  background: linear-gradient(90deg, var(--primary-500), var(--accent-400), var(--primary-400));
  background-size: 300% 100%;
  animation: loader-fill 1.5s ease forwards, loader-color 2s ease infinite;
}

@keyframes loader-color {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

/* --- Keyboard Hint Hover --- */
.kbd {
  padding: 2px 8px;
  background: var(--bg-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  font-family: monospace;
  font-size: var(--text-xs);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 -1px 0 rgba(255, 255, 255, 0.05) inset;
  transition: all 0.2s ease;
}

.kbd:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
  background: var(--bg-elevated);
}

/* --- Icon Button Micro-animation --- */
.btn-icon svg {
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-icon:hover svg {
  transform: rotate(12deg) scale(1.08);
}

.btn-icon:active svg {
  transform: rotate(-8deg) scale(0.95);
}

/* --- AI Status Breathing --- */
.ai-status-dot {
  animation: status-breathe 2s ease-in-out infinite;
}

@keyframes status-breathe {

  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 4px var(--success);
  }

  50% {
    opacity: 0.5;
    box-shadow: 0 0 8px var(--success);
  }
}

/* --- Message Actions Slide Up --- */
.message-actions {
  transform: translateY(4px);
  transition: all 0.2s ease;
}

.message:hover .message-actions {
  opacity: 1;
  transform: translateY(0);
}

.msg-action-btn {
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.msg-action-btn:hover {
  transform: translateY(-2px);
}

/* --- Smooth Everything --- */
a,
button,
.nav-item,
.quick-action-card,
.mood-chip,
.capability-tag,
.trend-card,
.form-checkbox,
.tab,
.card,
.history-item {
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

/* ====================================
   EXTRA SAUCE � Rich Visual Layer
   ==================================== */

/* --- Richer gradient on sidebar --- */
.sidebar {
  background:
    linear-gradient(180deg, rgba(139, 92, 246, 0.04) 0%, transparent 30%),
    var(--bg-glass);
}

/* --- Logo icon: animated gradient + glow --- */
.logo-icon {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9, #06b6d4);
  background-size: 200% 200%;
  animation: logo-icon-shift 4s ease infinite, logo-glow 3s ease-in-out infinite;
}

@keyframes logo-icon-shift {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

/* --- Welcome icon: richer glow --- */
.welcome-icon {
  background: linear-gradient(135deg, #7c3aed, #4c1d95, #6d28d9);
  background-size: 300% 300%;
  animation: icon-float 5s ease-in-out infinite, icon-bg-shift 6s ease infinite, icon-glow 3s ease-in-out infinite;
}

@keyframes icon-bg-shift {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

/* --- Welcome title: richer gradient --- */
.welcome-title {
  background: linear-gradient(135deg,
      #f0f0f3 0%, #c4b5fd 30%, #a78bfa 50%, #fcd34d 70%, #f0f0f3 100%);
  background-size: 400% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: title-shine 5s ease-in-out infinite;
}

@keyframes title-shine {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* --- Quick action cards: glow border on hover --- */
.quick-action-card {
  position: relative;
  overflow: hidden;
}

.quick-action-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), transparent 40%, transparent 60%, rgba(251, 191, 36, 0.08));
  opacity: 0;
  transition: opacity 0.4s ease;
}

.quick-action-card:hover::after {
  opacity: 1;
}

/* --- Message avatar in chat glow --- */
.message.assistant .message-avatar {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9, #7c3aed);
  background-size: 200% 200%;
  animation: avatar-shift 4s ease infinite, avatar-breathe 3s ease-in-out infinite;
}

@keyframes avatar-shift {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

@keyframes avatar-breathe {

  0%,
  100% {
    box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
  }

  50% {
    box-shadow: 0 0 24px rgba(139, 92, 246, 0.5);
  }
}

.message.user .message-avatar {
  background: linear-gradient(135deg, #fbbf24, #d97706, #f59e0b);
  background-size: 200% 200%;
  animation: avatar-shift 5s ease infinite;
}

/* --- User message glow hover --- */
.message.user .message-body {
  border: 1px solid rgba(139, 92, 246, 0.3);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.15);
  transition: all 0.3s ease;
}

.message.user .message-body:hover {
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.25), 0 0 0 1px rgba(139, 92, 246, 0.2);
}

/* --- AI message: gradient top line --- */
.message.assistant .message-body {
  position: relative;
  overflow: hidden;
}

.message.assistant .message-body::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-500), var(--accent-400), var(--primary-500));
  background-size: 200% 100%;
  animation: msg-line-flow 3s linear infinite;
}

@keyframes msg-line-flow {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 200% 50%;
  }
}

/* --- Send button enhanced --- */
.btn-send {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed, #6d28d9);
  background-size: 200% 200%;
  animation: btn-gradient 3s ease infinite;
}

@keyframes btn-gradient {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

/* --- New Chat button enhanced --- */
.btn-new-chat {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed, #6d28d9);
  background-size: 200% 200%;
  animation: btn-gradient 4s ease infinite;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}

/* --- Input box richer focus --- */
.chat-input-box:focus-within {
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow:
    0 0 0 4px rgba(139, 92, 246, 0.1),
    0 0 40px rgba(139, 92, 246, 0.06),
    0 12px 32px rgba(0, 0, 0, 0.15);
}

/* --- Capability tags: subtle glow --- */
.capability-tag:hover {
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.15), 0 4px 12px rgba(0, 0, 0, 0.15);
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.3);
}

/* --- Tip card: warm glow --- */
.daily-tip-card {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.05), rgba(139, 92, 246, 0.03));
  border-color: rgba(251, 191, 36, 0.12);
}

.daily-tip-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 0 16px rgba(251, 191, 36, 0.06);
  border-color: rgba(251, 191, 36, 0.25);
  transform: translateY(-2px);
}

/* --- Mood chip selected: richer --- */
.mood-chip.selected {
  background: linear-gradient(135deg, #8b5cf6, #7c3aed);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.35);
  border-color: rgba(255, 255, 255, 0.15);
}

/* --- Trend card: image overlay glow --- */
.trend-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(139, 92, 246, 0.06));
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 1;
}

.trend-card:hover::before {
  opacity: 1;
}

/* --- View transition --- */
@keyframes viewSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Loading screen richer --- */
.loading-screen {
  background:
    radial-gradient(circle at 40% 30%, rgba(139, 92, 246, 0.08), transparent 50%),
    radial-gradient(circle at 60% 70%, rgba(251, 191, 36, 0.04), transparent 40%),
    var(--bg-primary);
}

/* --- Scrollbar richer --- */
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.3), rgba(139, 92, 246, 0.15));
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(139, 92, 246, 0.5), rgba(139, 92, 246, 0.3));
}

/* --- Strong text in messages glow --- */
.message-body strong {
  color: var(--primary-300);
  text-shadow: 0 0 6px rgba(139, 92, 246, 0.2);
}

/* --- Welcome subtitle gentle fade --- */
.welcome-subtitle {
  animation: subtitle-breathe 5s ease-in-out infinite;
}

@keyframes subtitle-breathe {

  0%,
  100% {
    opacity: 0.75;
  }

  50% {
    opacity: 1;
  }
}

/* --- Full app entrance --- */
.app-container {
  animation: app-reveal 0.8s ease;
}

@keyframes app-reveal {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* ====================================
   SIDEBAR OVERHAUL � Alive & Glowing
   ==================================== */

/* --- Sidebar: glass + aurora lights --- */
.sidebar {
  background:
    linear-gradient(180deg,
      rgba(139, 92, 246, 0.06) 0%,
      rgba(15, 15, 22, 0.95) 25%,
      rgba(15, 15, 22, 0.97) 60%,
      rgba(139, 92, 246, 0.04) 100%);
  backdrop-filter: blur(30px) saturate(180%);
  border-right: 1px solid rgba(139, 92, 246, 0.08);
  overflow: hidden;
}

/* Aurora light at top of sidebar */
.sidebar::before {
  content: '';
  position: absolute;
  top: -60px;
  left: -30%;
  right: -30%;
  height: 200px;
  background: radial-gradient(ellipse 70% 100% at 50% 0%,
      rgba(139, 92, 246, 0.12) 0%,
      rgba(139, 92, 246, 0.05) 40%,
      transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: sidebar-aurora 6s ease-in-out infinite alternate;
}

@keyframes sidebar-aurora {
  0% {
    opacity: 0.6;
    transform: translateX(-10px);
  }

  100% {
    opacity: 1;
    transform: translateX(10px);
  }
}

/* Glowing right edge */
.sidebar::after {
  content: '';
  position: absolute;
  top: 0;
  right: -1px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg,
      rgba(139, 92, 246, 0.0) 0%,
      rgba(139, 92, 246, 0.25) 20%,
      rgba(167, 139, 250, 0.4) 50%,
      rgba(139, 92, 246, 0.25) 80%,
      rgba(139, 92, 246, 0.0) 100%);
  z-index: 10;
  animation: sidebar-edge-glow 3s ease-in-out infinite alternate;
}

@keyframes sidebar-edge-glow {
  0% {
    opacity: 0.5;
    filter: blur(0px);
  }

  100% {
    opacity: 1;
    filter: blur(1px);
  }
}

/* Ambient floating light blob inside sidebar */
.sidebar-content {
  position: relative;
}

.sidebar-content::before {
  content: '';
  position: absolute;
  top: 40%;
  left: 10%;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.06), transparent 70%);
  border-radius: 50%;
  filter: blur(40px);
  pointer-events: none;
  animation: sidebar-blob 8s ease-in-out infinite;
}

@keyframes sidebar-blob {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.5;
  }

  33% {
    transform: translate(30px, -20px) scale(1.2);
    opacity: 0.8;
  }

  66% {
    transform: translate(-10px, 30px) scale(0.9);
    opacity: 0.4;
  }
}

/* --- LOGO AREA: Layered Premium --- */
.sidebar-header {
  position: relative;
  z-index: 1;
  padding: var(--space-6) var(--space-5) var(--space-5);
  border-bottom: 1px solid rgba(139, 92, 246, 0.08);
}

/* Glow behind logo */
.sidebar-header::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 30px;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.2), transparent 65%);
  border-radius: 50%;
  filter: blur(20px);
  transform: translateY(-50%);
  animation: logo-area-pulse 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes logo-area-pulse {

  0%,
  100% {
    opacity: 0.6;
    transform: translateY(-50%) scale(1);
  }

  50% {
    opacity: 1;
    transform: translateY(-50%) scale(1.3);
  }
}

/* Logo icon: richer layers */
.logo-icon {
  background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 40%, #4c1d95 70%, #06b6d4 100%);
  background-size: 300% 300%;
  animation: logo-icon-shift 5s ease infinite, logo-glow 3s ease-in-out infinite;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 0 20px rgba(139, 92, 246, 0.3),
    0 4px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  position: relative;
  z-index: 1;
}

/* Reflection on logo icon */
.logo-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15), transparent);
  border-radius: inherit;
  pointer-events: none;
  border-radius: var(--radius-lg) var(--radius-lg) 50% 50%;
}

/* Logo text: richer gradient */
.logo-text {
  background: linear-gradient(135deg, #f0f0f3 0%, #c4b5fd 40%, #a78bfa 60%, #e9d5ff 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: logo-text-flow 5s ease infinite;
  font-weight: 700;
  letter-spacing: -0.025em;
}

@keyframes logo-text-flow {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

/* Badge: enhanced glow */
.logo-badge {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
  animation: badge-glow 3s ease-in-out infinite;
}

@keyframes badge-glow {

  0%,
  100% {
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.25), 0 2px 4px rgba(0, 0, 0, 0.2);
  }

  50% {
    box-shadow: 0 0 16px rgba(251, 191, 36, 0.45), 0 2px 4px rgba(0, 0, 0, 0.2);
  }
}

/* --- NEW CHAT BUTTON: Premium --- */
.btn-new-chat {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 50%, #6d28d9 100%);
  background-size: 200% 200%;
  animation: btn-gradient 4s ease infinite;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 4px 16px rgba(139, 92, 246, 0.3),
    0 1px 0 rgba(255, 255, 255, 0.08) inset;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* Glass reflection on button */
.btn-new-chat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent);
  pointer-events: none;
  border-radius: inherit;
}

.btn-new-chat:hover {
  box-shadow:
    0 8px 28px rgba(139, 92, 246, 0.45),
    0 0 0 1px rgba(139, 92, 246, 0.3),
    0 1px 0 rgba(255, 255, 255, 0.12) inset;
  transform: translateY(-2px);
}

/* --- NAV ITEMS: Glow indicators --- */
.nav-item {
  position: relative;
  z-index: 1;
  border: 1px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Left glow bar */
.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 3px;
  border-radius: var(--radius-full);
  background: linear-gradient(180deg, var(--primary-400), var(--accent-400));
  transform: scaleY(0);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
}

.nav-item:hover::before,
.nav-item.active::before {
  transform: scaleY(1);
}

.nav-item:hover {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.06), rgba(139, 92, 246, 0.02));
  border-color: rgba(139, 92, 246, 0.06);
  padding-left: calc(var(--space-3) + 4px);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.04));
  border-color: rgba(139, 92, 246, 0.12);
  padding-left: calc(var(--space-3) + 4px);
  box-shadow: inset 0 0 16px rgba(139, 92, 246, 0.04), 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-item.active .nav-item-icon {
  opacity: 1;
  filter: drop-shadow(0 0 4px rgba(139, 92, 246, 0.4));
}

/* --- SECTION TITLES: subtle glow --- */
.sidebar-section-title {
  background: linear-gradient(90deg, var(--text-tertiary), rgba(139, 92, 246, 0.4));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 100%;
  animation: section-title-shift 6s ease infinite;
}

@keyframes section-title-shift {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

/* --- DAILY TIP: warm aurora --- */
.daily-tip-card {
  background:
    linear-gradient(135deg, rgba(251, 191, 36, 0.06), rgba(139, 92, 246, 0.04), rgba(251, 191, 36, 0.03));
  border: 1px solid rgba(251, 191, 36, 0.12);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

/* Warm glow blob */
.daily-tip-card::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -20px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.08), transparent 65%);
  border-radius: 50%;
  filter: blur(20px);
  pointer-events: none;
  animation: tip-warmth 5s ease-in-out infinite;
}

@keyframes tip-warmth {

  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.3);
  }
}

/* Shine sweep */
.daily-tip-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent 44%, rgba(255, 255, 255, 0.03) 50%, transparent 56%);
  animation: tip-shine 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes tip-shine {

  0%,
  20% {
    transform: translateX(-100%) rotate(45deg);
  }

  80%,
  100% {
    transform: translateX(100%) rotate(45deg);
  }
}

.daily-tip-card:hover {
  border-color: rgba(251, 191, 36, 0.25);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15), 0 0 20px rgba(251, 191, 36, 0.06);
  transform: translateY(-2px);
}

.tip-action {
  border: 1px solid rgba(139, 92, 246, 0.2);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.tip-action::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
  pointer-events: none;
  border-radius: inherit;
}

.tip-action:hover {
  background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
  transform: translateY(-1px);
}

/* --- API STATUS: breathing dot glow --- */
.api-status {
  padding: var(--space-2) var(--space-3);
  background: rgba(15, 15, 22, 0.5);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  z-index: 1;
  position: relative;
}

.api-status-dot {
  position: relative;
}

.api-status.connected .api-status-dot {
  box-shadow: 0 0 6px var(--success), 0 0 12px var(--success);
  animation: dot-breathe 2s ease-in-out infinite;
}

@keyframes dot-breathe {

  0%,
  100% {
    box-shadow: 0 0 4px var(--success);
    transform: scale(1);
  }

  50% {
    box-shadow: 0 0 10px var(--success), 0 0 18px var(--success);
    transform: scale(1.2);
  }
}

/* --- SIDEBAR FOOTER: subtle separator glow --- */
.sidebar-footer {
  border-top: 1px solid rgba(139, 92, 246, 0.06);
  position: relative;
}

.sidebar-footer::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.2), transparent);
}

/* --- WELCOME ICON: richer depth --- */
.welcome-icon {
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
}

/* Glass reflection */
.welcome-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 45%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent);
  border-radius: inherit;
  pointer-events: none;
  border-radius: var(--radius-2xl) var(--radius-2xl) 50% 50%;
}

/* --- QUICK ACTION CARDS: inner light --- */
.quick-action-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-4);
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-xl);
  text-align: left;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Inner top-left highlight */
.quick-action-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 60%;
  height: 40%;
  background: radial-gradient(ellipse at 20% 20%, rgba(255, 255, 255, 0.03), transparent 70%);
  pointer-events: none;
  border-radius: inherit;
}

.quick-action-card:hover {
  border-color: rgba(139, 92, 246, 0.2);
  box-shadow:
    0 16px 40px rgba(0, 0, 0, 0.25),
    0 0 30px rgba(139, 92, 246, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ====================================
   WELCOME AREA � ALIVE & BREATHING
   ==================================== */

/* --- Welcome Screen: ambient depth --- */
.welcome-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-10);
  min-height: 60vh;
  position: relative;
  animation: welcome-fade-in 1s ease;
}

@keyframes welcome-fade-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Ambient glow behind welcome content */
.welcome-screen::before {
  content: '';
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 300px;
  background: radial-gradient(ellipse, rgba(139, 92, 246, 0.08), transparent 65%);
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
  animation: welcome-glow-breathe 5s ease-in-out infinite;
}

@keyframes welcome-glow-breathe {

  0%,
  100% {
    opacity: 0.5;
    transform: translateX(-50%) scale(1);
  }

  50% {
    opacity: 0.9;
    transform: translateX(-50%) scale(1.15);
  }
}

/* --- Welcome icon: 3D layers --- */
.welcome-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-2xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-6);
  background: linear-gradient(135deg, #7c3aed, #4c1d95, #6d28d9);
  background-size: 300% 300%;
  animation:
    icon-float 5s ease-in-out infinite,
    icon-bg-shift 6s ease infinite,
    icon-glow 3s ease-in-out infinite;
  font-size: 2.2rem;
  box-shadow:
    0 0 30px rgba(139, 92, 246, 0.25),
    0 16px 40px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -2px 4px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  z-index: 1;
  overflow: visible;
}

/* Outer pulsing ring */
.welcome-icon::after {
  content: '';
  position: absolute;
  inset: -10px;
  border: 1.5px solid rgba(139, 92, 246, 0.15);
  border-radius: inherit;
  animation: icon-ring-pulse 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes icon-ring-pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.5;
    border-color: rgba(139, 92, 246, 0.15);
  }

  50% {
    transform: scale(1.12);
    opacity: 0;
    border-color: rgba(139, 92, 246, 0.3);
  }
}

/* Second ring with delay */
.welcome-icon::before {
  content: '';
  position: absolute;
  inset: -18px;
  border: 1px solid rgba(139, 92, 246, 0.08);
  border-radius: inherit;
  animation: icon-ring-pulse 3s ease-in-out 0.5s infinite;
  pointer-events: none;
}

/* --- Welcome title: alive shimmer --- */
.welcome-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 800;
  margin-bottom: var(--space-3);
  letter-spacing: -0.03em;
  line-height: var(--leading-tight);
  background: linear-gradient(90deg,
      rgba(255, 255, 255, 0.9) 0%,
      #c4b5fd 20%,
      #a78bfa 35%,
      #fcd34d 50%,
      #a78bfa 65%,
      #c4b5fd 80%,
      rgba(255, 255, 255, 0.9) 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: title-alive-shimmer 4s ease-in-out infinite;
  text-shadow: none;
  position: relative;
  z-index: 1;
}

@keyframes title-alive-shimmer {
  0% {
    background-position: 100% 50%;
  }

  100% {
    background-position: -100% 50%;
  }
}

/* Subtle glow under title */
.welcome-title::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.3), rgba(251, 191, 36, 0.2), rgba(139, 92, 246, 0.3), transparent);
  animation: title-underline-breathe 3s ease-in-out infinite;
}

@keyframes title-underline-breathe {

  0%,
  100% {
    opacity: 0.3;
  }

  50% {
    opacity: 0.7;
  }
}

/* --- Welcome subtitle: stagger in --- */
.welcome-subtitle {
  font-size: var(--text-base);
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: var(--space-6);
  animation: subtitle-slide-in 0.8s ease 0.3s both;
  position: relative;
}

@keyframes subtitle-slide-in {
  from {
    opacity: 0;
    transform: translateY(10px);
    filter: blur(4px);
  }

  to {
    opacity: 0.75;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* --- AI Capabilities: staggered entrance + shine --- */
.ai-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: center;
  margin-bottom: var(--space-8);
  animation: caps-entrance 0.6s ease 0.5s both;
}

@keyframes caps-entrance {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.capability-tag {
  padding: var(--space-2) var(--space-3);
  background: var(--bg-glass);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  animation: tag-stagger-in 0.5s cubic-bezier(0.23, 1, 0.32, 1) both;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.capability-tag:nth-child(1) {
  animation-delay: 0.6s;
}

.capability-tag:nth-child(2) {
  animation-delay: 0.72s;
}

.capability-tag:nth-child(3) {
  animation-delay: 0.84s;
}

.capability-tag:nth-child(4) {
  animation-delay: 0.96s;
}

@keyframes tag-stagger-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Shine sweep on tags */
.capability-tag::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transition: left 0.5s ease;
}

.capability-tag:hover::after {
  left: 150%;
}

.capability-tag:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.2);
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.3);
}

/* --- Quick Actions: stagger + richer --- */
.quick-actions.stagger-in .quick-action-card {
  animation: card-stagger-in 0.5s cubic-bezier(0.23, 1, 0.32, 1) both;
}

.quick-actions.stagger-in .quick-action-card:nth-child(1) {
  animation-delay: 0.7s;
}

.quick-actions.stagger-in .quick-action-card:nth-child(2) {
  animation-delay: 0.82s;
}

.quick-actions.stagger-in .quick-action-card:nth-child(3) {
  animation-delay: 0.94s;
}

.quick-actions.stagger-in .quick-action-card:nth-child(4) {
  animation-delay: 1.06s;
}

@keyframes card-stagger-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Card inner glow on hover */
.quick-action-card:hover .quick-action-icon {
  transform: scale(1.2) rotate(8deg);
  filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.5));
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.quick-action-card:hover .quick-action-title {
  color: var(--primary-300);
  transition: color 0.3s ease;
}

/* --- Keyboard Hints: subtle entrance --- */
.keyboard-hints {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  animation: hints-fade 0.6s ease 1.2s both;
}

@keyframes hints-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.kbd {
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 -1px 0 rgba(255, 255, 255, 0.05) inset;
}

.kbd:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), 0 0 8px rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.2);
}

/* ====================================
   CHAT INPUT AREA � Premium & Alive
   ==================================== */

/* --- Mood Chips: staggered wave --- */
.mood-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  position: relative;
}

.mood-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 500;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Shine on hover */
.mood-chip::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.4s ease;
}

.mood-chip:hover::after {
  left: 150%;
}

.mood-chip:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.2);
  background: rgba(139, 92, 246, 0.08);
}

.mood-chip.selected {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.8), rgba(124, 58, 237, 0.9));
  color: white;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
  transform: translateY(-2px);
}

/* --- Input box: glass premium --- */
.chat-input-box {
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-2xl);
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px) saturate(150%);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

/* Animated border on focus */
.chat-input-box::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.5), rgba(251, 191, 36, 0.3), rgba(6, 182, 212, 0.3), rgba(139, 92, 246, 0.5));
  background-size: 300% 300%;
  border-radius: calc(var(--radius-2xl) + 2px);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
  animation: input-border-rotate 4s linear infinite;
}

@keyframes input-border-rotate {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.chat-input-box:focus-within::before {
  opacity: 1;
}

.chat-input-box:focus-within {
  border-color: transparent;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.08), 0 12px 32px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.04);
}

/* --- Attach/Emoji buttons: hover glow --- */
.btn-attach,
.btn-emoji {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: var(--radius-md);
}

.btn-attach:hover,
.btn-emoji:hover {
  background: rgba(139, 92, 246, 0.1);
  transform: scale(1.1) rotate(-5deg);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.15);
}

/* --- Send button: premium with pulse --- */
.btn-send {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  color: white;
  background: linear-gradient(135deg, #8b5cf6, #7c3aed, #6d28d9);
  background-size: 200% 200%;
  animation: btn-send-gradient 3.5s ease infinite;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 4px 12px rgba(139, 92, 246, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

@keyframes btn-send-gradient {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

/* Glass reflection */
.btn-send::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent);
  pointer-events: none;
  border-radius: inherit;
}

.btn-send:hover:not(:disabled) {
  transform: scale(1.12) rotate(-5deg);
  box-shadow:
    0 0 28px rgba(139, 92, 246, 0.5),
    0 8px 20px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.btn-send:active:not(:disabled) {
  transform: scale(0.95);
}

/* --- AI Status: alive --- */
.ai-status {
  transition: all 0.3s ease;
}

.ai-status:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* --- Emoji picker: glass card --- */
.emoji-picker {
  background: rgba(20, 20, 30, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(139, 92, 246, 0.15);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.emoji-picker button {
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: var(--radius-md);
}

.emoji-picker button:hover {
  transform: scale(1.25);
  background: rgba(139, 92, 246, 0.1);
}

/* ====================================
   HEADER � Refined Glow
   ==================================== */
.header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-6);
  background: rgba(15, 15, 22, 0.8);
  backdrop-filter: blur(24px) saturate(150%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  z-index: var(--z-header);
  position: relative;
}

/* Gradient glow line at bottom */
.header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
      transparent 5%,
      rgba(139, 92, 246, 0.2) 25%,
      rgba(139, 92, 246, 0.35) 50%,
      rgba(139, 92, 246, 0.2) 75%,
      transparent 95%);
  animation: header-line-breathe 4s ease-in-out infinite;
}

@keyframes header-line-breathe {

  0%,
  100% {
    opacity: 0.4;
  }

  50% {
    opacity: 0.8;
  }
}

.header-title {
  background: linear-gradient(90deg, var(--text-primary) 0%, var(--primary-300) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Settings icon hover */
.header-actions .btn-icon {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.header-actions .btn-icon:hover {
  transform: rotate(60deg) scale(1.1);
  color: var(--primary-400);
}

/* ====================================
   MESSAGES � Life in every bubble
   ==================================== */
.message {
  animation: msg-enter 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes msg-enter {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
    filter: blur(3px);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* Message hover: subtle lift */
.message.user .message-body {
  transition: all 0.3s ease;
}

.message.user .message-body:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(139, 92, 246, 0.15);
}

.message.assistant .message-body {
  transition: all 0.3s ease;
}

.message.assistant .message-body:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
  border-color: rgba(139, 92, 246, 0.12);
}

/* Avatar hover glow */
.message-avatar {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.message-avatar:hover {
  transform: scale(1.15) rotate(5deg);
  box-shadow: 0 0 24px rgba(139, 92, 246, 0.4);
}

/* Code blocks in messages: stylish */
.message-body code {
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: var(--radius-sm);
  padding: 1px 6px;
  font-size: 0.9em;
}

.message-body pre {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  overflow-x: auto;
  position: relative;
}

.message-body pre::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-500), var(--accent-400));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Links in messages */
.message-body a {
  color: var(--primary-400);
  text-decoration: none;
  border-bottom: 1px solid rgba(139, 92, 246, 0.3);
  transition: all 0.2s ease;
}

.message-body a:hover {
  color: var(--primary-300);
  border-bottom-color: var(--primary-300);
  text-shadow: 0 0 8px rgba(139, 92, 246, 0.3);
}

/* Lists in messages */
.message-body li {
  position: relative;
  padding-left: var(--space-1);
}

.message-body li::marker {
  color: var(--primary-400);
}

/* ============================================
   BUG FIXES
   ============================================ */

/* FIX: Toast icons rendering at full SVG size */
.toast {
  display: flex !important;
  align-items: center !important;
  gap: var(--space-3);
}

.toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-icon svg {
  width: 20px !important;
  height: 20px !important;
  flex-shrink: 0;
}

.toast-message {
  flex: 1;
  font-size: var(--text-sm);
  line-height: 1.4;
}

.toast-close {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-tertiary);
  transition: all var(--transition-fast);
  background: none;
  border: none;
  cursor: pointer;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

.toast-close svg {
  width: 14px !important;
  height: 14px !important;
}

.toast-success .toast-icon {
  color: var(--success);
}

.toast-error .toast-icon {
  color: var(--error);
}

.toast-warning .toast-icon {
  color: var(--warning);
}

.toast-info .toast-icon {
  color: var(--primary-400);
}

/* ============================================
   PREMIUM LOADING SCREEN
   ============================================ */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  background-image: radial-gradient(ellipse at 50% 30%, rgba(139, 92, 246, 0.12), transparent 60%);
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), filter 0.6s ease;
}

.loading-screen.hidden {
  pointer-events: none;
}

.loader-particles {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.loader-particle {
  position: absolute;
  border-radius: 50%;
  box-shadow: 0 0 6px currentColor;
}

@keyframes loader-particle-rise {
  0% {
    transform: translateY(0) scale(0);
    opacity: 0;
  }

  20% {
    opacity: 1;
    transform: translateY(-15vh) scale(1);
  }

  80% {
    opacity: 0.5;
  }

  100% {
    transform: translateY(-105vh) scale(0.3);
    opacity: 0;
  }
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
}

.loader-icon-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  margin-bottom: var(--space-6);
}

.loader-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
}

.loader-ring-1 {
  border-top-color: rgba(139, 92, 246, 0.6);
  border-right-color: rgba(139, 92, 246, 0.2);
  animation: ring-spin 1.8s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

.loader-ring-2 {
  inset: 6px;
  border-bottom-color: rgba(167, 139, 250, 0.5);
  border-left-color: rgba(167, 139, 250, 0.15);
  animation: ring-spin 2.4s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite reverse;
}

.loader-ring-3 {
  inset: 12px;
  border-top-color: rgba(251, 191, 36, 0.4);
  border-right-color: rgba(251, 191, 36, 0.1);
  animation: ring-spin 3s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

@keyframes ring-spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.loader-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
  animation: loader-logo-pulse 2s ease-in-out infinite;
}

@keyframes loader-logo-pulse {

  0%,
  100% {
    box-shadow: 0 0 30px rgba(139, 92, 246, 0.4), 0 8px 24px rgba(0, 0, 0, 0.3);
  }

  50% {
    box-shadow: 0 0 50px rgba(139, 92, 246, 0.6), 0 12px 32px rgba(0, 0, 0, 0.4);
  }
}

.loader-text {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-4);
  background: linear-gradient(135deg, var(--text-primary) 30%, var(--primary-300));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: loader-text-in 0.8s ease 0.3s both;
}

@keyframes loader-text-in {
  from {
    opacity: 0;
    transform: translateY(10px);
    filter: blur(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.loader-bar {
  width: 200px;
  height: 3px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: var(--space-4);
  animation: loader-bar-in 0.6s ease 0.6s both;
}

@keyframes loader-bar-in {
  from {
    opacity: 0;
    width: 0;
  }

  to {
    opacity: 1;
    width: 200px;
  }
}

.loader-progress {
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, #8b5cf6, #a78bfa, #fcd34d, #8b5cf6);
  background-size: 300% 100%;
  animation: loader-fill 3s cubic-bezier(0.4, 0, 0.2, 1) 0.8s both, loader-gradient-shift 2s linear infinite;
}

@keyframes loader-fill {
  0% {
    width: 0%;
  }

  30% {
    width: 35%;
  }

  60% {
    width: 65%;
  }

  85% {
    width: 85%;
  }

  100% {
    width: 100%;
  }
}

@keyframes loader-gradient-shift {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 300% 50%;
  }
}

.loader-status {
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  margin-bottom: var(--space-3);
  transition: opacity 0.2s ease, transform 0.2s ease;
  animation: loader-text-in 0.6s ease 1s both;
  font-family: monospace;
  letter-spacing: 0.05em;
}

.loader-tagline {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-style: italic;
  opacity: 0.6;
  animation: loader-text-in 0.8s ease 1.2s both;
}

.loader-version {
  position: absolute;
  bottom: -40px;
  font-size: var(--text-xs);
  color: var(--text-tertiary);
  opacity: 0.3;
  font-family: monospace;
  animation: loader-text-in 0.6s ease 1.5s both;
}

/* ============================================
   ENHANCED CHATBOT VISUALS
   ============================================ */

/* Message entrance animation */
.message {
  animation: message-slide-in 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes message-slide-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* User message gradient shimmer */
.message.user .message-body {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 40%, #5b21b6 100%);
  background-size: 200% 200%;
  animation: user-msg-shimmer 8s ease infinite;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

@keyframes user-msg-shimmer {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

/* Assistant message glass depth */
.message.assistant .message-body {
  background: rgba(255, 255, 255, 0.025);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* Avatar breathing glow */
.message-avatar {
  animation: avatar-breathe 4s ease-in-out infinite;
}

@keyframes avatar-breathe {

  0%,
  100% {
    box-shadow: 0 0 0 rgba(139, 92, 246, 0);
  }

  50% {
    box-shadow: 0 0 14px rgba(139, 92, 246, 0.15);
  }
}

/* Typing indicator upgrade */
.typing-indicator .typing-dot {
  animation: typing-bounce 1.4s ease-in-out infinite;
}

.typing-indicator .typing-dot:nth-child(1) {
  animation-delay: 0s;
}

.typing-indicator .typing-dot:nth-child(2) {
  animation-delay: 0.16s;
}

.typing-indicator .typing-dot:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes typing-bounce {

  0%,
  60%,
  100% {
    transform: translateY(0) scale(1);
    opacity: 0.4;
  }

  30% {
    transform: translateY(-8px) scale(1.2);
    opacity: 1;
  }
}

/* Chat input glow when active */
.chat-input:focus~.chat-input-glow,
.chat-input-box:focus-within {
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.08), 0 12px 32px rgba(0, 0, 0, 0.15);
}

/* Selection styling inside messages */
.message-body ::selection {
  background: rgba(139, 92, 246, 0.3);
  color: white;
}

/* Code blocks in messages */
.message-body pre {
  position: relative;
  border-radius: var(--radius-lg);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.message-body pre::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #8b5cf6, #06b6d4, #fcd34d);
}

.message-body code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.85em;
}

/* Quick action cards smoother hover */
.quick-action-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25), 0 0 30px rgba(139, 92, 246, 0.08);
}

/* Sidebar nav active indicator */
.nav-item.active {
  background: rgba(139, 92, 246, 0.08);
  color: var(--primary-300);
  border: 1px solid rgba(139, 92, 246, 0.12);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 25%;
  bottom: 25%;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, #8b5cf6, #a78bfa);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
}

/* ====================================
   PRODUCT LINKS — Premium Chat Links
   ==================================== */

/* Links inside AI message bodies */
.message .message-body a {
  color: var(--primary-300, #a78bfa);
  text-decoration: none;
  border-bottom: 1px solid rgba(167, 139, 250, 0.25);
  padding-bottom: 1px;
  transition: all 0.25s ease;
  font-weight: 500;
}

.message .message-body a:hover {
  color: var(--primary-200, #c4b5fd);
  border-bottom-color: var(--primary-400, #8b5cf6);
  text-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
}

/* Store links — display as inline pills */
.message .message-body a[href*="myntra"],
.message .message-body a[href*="ajio"],
.message .message-body a[href*="amazon"],
.message .message-body a[href*="flipkart"],
.message .message-body a[href*="tatacliq"],
.message .message-body a[href*="meesho"],
.message .message-body a[href*="asos"],
.message .message-body a[href*="zara"],
.message .message-body a[href*="nordstrom"],
.message .message-body a[href*="zalando"],
.message .message-body a[href*="theiconic"],
.message .message-body a[href*="hm.com"],
.message .message-body a[href*="uniqlo"],
.message .message-body a[href*="macys"] {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(139, 92, 246, 0.12);
  padding: 3px 10px;
  border-radius: 6px;
  border-bottom: none;
  margin: 2px 4px 2px 0;
  font-size: 0.9em;
  line-height: 1.5;
  vertical-align: baseline;
}

.message .message-body a[href*="myntra"]::after,
.message .message-body a[href*="ajio"]::after,
.message .message-body a[href*="amazon"]::after,
.message .message-body a[href*="flipkart"]::after,
.message .message-body a[href*="tatacliq"]::after,
.message .message-body a[href*="meesho"]::after,
.message .message-body a[href*="asos"]::after,
.message .message-body a[href*="zara"]::after,
.message .message-body a[href*="nordstrom"]::after,
.message .message-body a[href*="zalando"]::after,
.message .message-body a[href*="theiconic"]::after,
.message .message-body a[href*="hm.com"]::after,
.message .message-body a[href*="uniqlo"]::after,
.message .message-body a[href*="macys"]::after {
  content: '\2197';
  font-size: 0.8em;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.message .message-body a[href*="myntra"]:hover,
.message .message-body a[href*="ajio"]:hover,
.message .message-body a[href*="amazon"]:hover,
.message .message-body a[href*="flipkart"]:hover,
.message .message-body a[href*="tatacliq"]:hover,
.message .message-body a[href*="meesho"]:hover,
.message .message-body a[href*="asos"]:hover,
.message .message-body a[href*="zara"]:hover,
.message .message-body a[href*="nordstrom"]:hover,
.message .message-body a[href*="zalando"]:hover,
.message .message-body a[href*="theiconic"]:hover,
.message .message-body a[href*="hm.com"]:hover,
.message .message-body a[href*="uniqlo"]:hover,
.message .message-body a[href*="macys"]:hover {
  background: rgba(139, 92, 246, 0.22);
  box-shadow: 0 2px 8px rgba(139, 92, 246, 0.15);
}

.message .message-body a[href*="myntra"]:hover::after,
.message .message-body a[href*="ajio"]:hover::after,
.message .message-body a[href*="amazon"]:hover::after,
.message .message-body a[href*="flipkart"]:hover::after,
.message .message-body a[href*="tatacliq"]:hover::after,
.message .message-body a[href*="meesho"]:hover::after,
.message .message-body a[href*="asos"]:hover::after,
.message .message-body a[href*="zara"]:hover::after,
.message .message-body a[href*="nordstrom"]:hover::after,
.message .message-body a[href*="zalando"]:hover::after,
.message .message-body a[href*="theiconic"]:hover::after,
.message .message-body a[href*="hm.com"]:hover::after,
.message .message-body a[href*="uniqlo"]:hover::after,
.message .message-body a[href*="macys"]:hover::after {
  opacity: 1;
}

/* Non-store links get a subtle arrow */
.message .message-body a:not([href*="myntra"]):not([href*="ajio"]):not([href*="amazon"]):not([href*="flipkart"]):not([href*="tatacliq"]):not([href*="meesho"]):not([href*="asos"]):not([href*="zara"]):not([href*="nordstrom"]):not([href*="zalando"]):not([href*="theiconic"]):not([href*="hm.com"]):not([href*="uniqlo"]):not([href*="macys"])::after {
  content: ' \2197';
  font-size: 0.75em;
  opacity: 0.5;
}

/* ====================================
   Memory Controls
   ==================================== */
.memory-panel {
  display: grid;
  gap: var(--space-4);
}

.memory-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid rgba(139, 92, 246, 0.16);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(6, 182, 212, 0.06));
}

.memory-title {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-1);
}

.memory-subtitle {
  color: var(--text-tertiary);
  font-size: var(--text-sm);
  margin: 0;
}

.memory-pill {
  flex: 0 0 auto;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--primary-200);
  padding: 6px 10px;
  border-radius: var(--radius-full);
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(139, 92, 246, 0.22);
}

.memory-textarea {
  min-height: 86px;
  resize: vertical;
}

.memory-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.memory-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.btn-demo-mode {
  width: 100%;
  margin-top: var(--space-3);
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  color: var(--accent-200);
  background: rgba(251, 191, 36, 0.08);
  border: 1px solid rgba(251, 191, 36, 0.18);
  font-size: var(--text-sm);
  font-weight: 800;
  transition: all var(--transition-base);
}

.btn-demo-mode:hover {
  background: rgba(251, 191, 36, 0.14);
  transform: translateY(-1px);
}

.intent-panel {
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(139, 92, 246, 0.15);
}

.intent-header {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.intent-label {
  color: var(--text-primary);
  font-weight: 700;
}

.intent-note {
  color: var(--primary-300);
  font-size: var(--text-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.intent-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.intent-chip {
  padding: 8px 12px;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: var(--text-sm);
  font-weight: 700;
  transition: all var(--transition-fast);
}

.intent-chip:hover,
.intent-chip.selected {
  color: var(--primary-100);
  border-color: rgba(139, 92, 246, 0.32);
  background: rgba(139, 92, 246, 0.16);
}

.wardrobe-panel {
  display: grid;
  gap: var(--space-4);
}

.wardrobe-form {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 140px auto;
  gap: var(--space-3);
}

.wardrobe-list {
  display: grid;
  gap: var(--space-3);
}

.wardrobe-empty {
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  color: var(--text-tertiary);
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(255, 255, 255, 0.12);
}

.wardrobe-item {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.wardrobe-item strong {
  display: block;
  color: var(--text-primary);
  margin: 4px 0;
}

.wardrobe-item p {
  color: var(--text-tertiary);
  font-size: var(--text-sm);
  margin: 0;
}

.wardrobe-type {
  display: inline-flex;
  color: var(--accent-200);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.wardrobe-delete {
  align-self: center;
  color: var(--text-tertiary);
  padding: 7px 10px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.wardrobe-delete:hover {
  color: var(--error);
  border-color: rgba(239, 68, 68, 0.28);
}

/* ====================================
   Style DNA
   ==================================== */
.style-dna-view {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
}

.dna-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-5);
  align-items: center;
  padding: var(--space-6);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(6, 182, 212, 0.2);
  background:
    radial-gradient(circle at 16% 18%, rgba(6, 182, 212, 0.18), transparent 28%),
    radial-gradient(circle at 82% 22%, rgba(139, 92, 246, 0.18), transparent 24%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(15, 23, 42, 0.74));
  margin-bottom: var(--space-5);
}

.dna-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.dna-card {
  min-height: 170px;
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.035);
}

.dna-card.core {
  grid-column: span 2;
  background:
    linear-gradient(135deg, rgba(139, 92, 246, 0.16), rgba(6, 182, 212, 0.08)),
    rgba(255, 255, 255, 0.035);
}

.dna-label {
  display: block;
  color: var(--text-tertiary);
  font-size: var(--text-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-2);
}

.dna-card strong {
  display: block;
  color: var(--text-primary);
  font-size: var(--text-xl);
  line-height: 1.2;
  margin-bottom: var(--space-2);
}

.dna-card p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.dna-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.dna-tag {
  padding: 7px 10px;
  border-radius: var(--radius-full);
  color: var(--primary-100);
  background: rgba(139, 92, 246, 0.14);
  border: 1px solid rgba(139, 92, 246, 0.2);
  font-size: var(--text-sm);
  font-weight: 700;
}

.decision-preview {
  margin-top: var(--space-5);
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(251, 191, 36, 0.16);
  background: rgba(0, 0, 0, 0.18);
}

.decision-header {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.decision-header h3 {
  color: var(--text-primary);
  font-size: var(--text-lg);
  margin: 0;
}

.decision-header span {
  color: var(--text-tertiary);
  font-size: var(--text-sm);
}

.decision-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
}

.decision-card {
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.decision-card span {
  display: block;
  color: var(--primary-200);
  font-size: var(--text-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-2);
}

.decision-card.winner {
  border-color: rgba(52, 211, 153, 0.26);
}

.decision-card.avoid {
  border-color: rgba(251, 113, 133, 0.24);
}

.decision-card p {
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

/* ====================================
   Fun Zone
   ==================================== */
.fun-zone {
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
}

.fun-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-5);
  align-items: center;
  padding: var(--space-6);
  border: 1px solid rgba(139, 92, 246, 0.18);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 12% 18%, rgba(6, 182, 212, 0.2), transparent 28%),
    radial-gradient(circle at 78% 12%, rgba(251, 191, 36, 0.16), transparent 24%),
    linear-gradient(135deg, rgba(139, 92, 246, 0.14), rgba(15, 23, 42, 0.72));
  margin-bottom: var(--space-5);
}

.fun-kicker {
  display: inline-flex;
  color: var(--primary-200);
  font-size: var(--text-xs);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-2);
}

.fun-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

.fun-copy {
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0;
  line-height: 1.7;
}

.fun-score-card {
  min-width: 150px;
  padding: var(--space-4);
  border-radius: var(--radius-xl);
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.fun-score-label {
  display: block;
  color: var(--text-tertiary);
  font-size: var(--text-xs);
  margin-bottom: var(--space-1);
}

.fun-score-card strong {
  font-size: 2.4rem;
  color: var(--accent-300);
  line-height: 1;
}

.fun-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.fun-card {
  min-height: 260px;
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(14px);
  transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.fun-card:hover {
  transform: translateY(-3px);
  border-color: rgba(139, 92, 246, 0.28);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.2);
}

.fun-card.wide {
  grid-column: 1 / -1;
  min-height: 170px;
}

.fun-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.fun-card-header h3 {
  font-size: var(--text-lg);
  color: var(--text-primary);
  margin: 0;
}

.fun-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-full);
  color: var(--primary-100);
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid rgba(139, 92, 246, 0.24);
  font-size: var(--text-xs);
  font-weight: 800;
}

.fun-card-copy,
.trivia-text,
.mood-result {
  color: var(--text-secondary);
  line-height: 1.7;
}

.breath-card {
  display: grid;
  justify-items: center;
}

.breath-card .fun-card-header,
.breath-card .fun-card-copy {
  justify-self: stretch;
}

.breath-orb {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  font-weight: 900;
  letter-spacing: 0.04em;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.42), transparent 18%),
    radial-gradient(circle at 58% 65%, rgba(6, 182, 212, 0.3), transparent 28%),
    linear-gradient(135deg, #8b5cf6, #ec4899);
  box-shadow: 0 0 0 12px rgba(139, 92, 246, 0.08), 0 22px 55px rgba(139, 92, 246, 0.25);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.breath-orb:hover {
  transform: scale(1.04);
}

.breath-orb.breathing {
  animation: breathPulse 3.6s ease-in-out infinite;
}

@keyframes breathPulse {
  0%, 100% {
    transform: scale(0.92);
    box-shadow: 0 0 0 8px rgba(139, 92, 246, 0.08), 0 18px 42px rgba(139, 92, 246, 0.18);
  }
  50% {
    transform: scale(1.12);
    box-shadow: 0 0 0 24px rgba(6, 182, 212, 0.08), 0 28px 70px rgba(236, 72, 153, 0.26);
  }
}

.pop-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.pop-tile {
  aspect-ratio: 1;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.18s ease, opacity 0.18s ease, filter 0.18s ease;
}

.pop-tile:hover {
  transform: translateY(-2px);
  filter: brightness(1.2);
}

.pop-tile.popped {
  opacity: 0.18;
  transform: scale(0.82);
}

.pop-tile.violet { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.pop-tile.cyan { background: linear-gradient(135deg, #06b6d4, #2563eb); }
.pop-tile.gold { background: linear-gradient(135deg, #facc15, #f97316); }
.pop-tile.rose { background: linear-gradient(135deg, #fb7185, #db2777); }
.pop-tile.mint { background: linear-gradient(135deg, #34d399, #0f766e); }

.mood-result {
  margin-top: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 760px) {
  .memory-grid,
  .memory-actions,
  .wardrobe-form,
  .dna-hero,
  .dna-grid,
  .decision-columns,
  .fun-hero,
  .fun-grid {
    grid-template-columns: 1fr;
  }

  .dna-card.core {
    grid-column: auto;
  }

  .fun-card.wide {
    grid-column: auto;
  }
}

/* ====================================
   Outfit Scan Animation
   ==================================== */
.upload-preview {
  position: relative;
}

.scan-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.scan-overlay.active {
  opacity: 1;
}

/* Animated sweeping scan line */
.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(139, 92, 246, 0.3) 20%,
      rgba(139, 92, 246, 1) 50%,
      rgba(236, 72, 153, 0.8) 80%,
      transparent 100%);
  box-shadow: 0 0 12px 4px rgba(139, 92, 246, 0.5), 0 0 30px 6px rgba(139, 92, 246, 0.2);
  animation: scanSweep 2s ease-in-out infinite;
  top: 0;
}

@keyframes scanSweep {
  0% {
    top: 0%;
    opacity: 0;
  }

  5% {
    opacity: 1;
  }

  95% {
    opacity: 1;
  }

  100% {
    top: 100%;
    opacity: 0;
  }
}

/* Holographic grid overlay */
.scan-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(139, 92, 246, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.06) 1px, transparent 1px);
  background-size: 24px 24px;
  animation: gridPulse 2s ease-in-out infinite;
}

@keyframes gridPulse {

  0%,
  100% {
    opacity: 0.4;
  }

  50% {
    opacity: 1;
  }
}

/* Corner targeting brackets */
.scan-corner {
  position: absolute;
  width: 22px;
  height: 22px;
}

.scan-corner::before,
.scan-corner::after {
  content: '';
  position: absolute;
  background: rgba(139, 92, 246, 1);
  box-shadow: 0 0 8px rgba(139, 92, 246, 0.8);
}

.scan-corner::before {
  width: 100%;
  height: 2px;
  top: 0;
  left: 0;
}

.scan-corner::after {
  height: 100%;
  width: 2px;
  top: 0;
  left: 0;
}

.scan-corner.tl {
  top: 8px;
  left: 8px;
}

.scan-corner.tr {
  top: 8px;
  right: 8px;
  transform: scaleX(-1);
}

.scan-corner.bl {
  bottom: 8px;
  left: 8px;
  transform: scaleY(-1);
}

.scan-corner.br {
  bottom: 8px;
  right: 8px;
  transform: scale(-1);
}

/* Animated detection dots */
.scan-dots {
  position: absolute;
  inset: 0;
}

.scan-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%);
  animation: dotPulse 1.5s ease-in-out infinite;
}

.scan-dot::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1.5px solid rgba(236, 72, 153, 0.9);
  border-radius: 50%;
  animation: dotRing 1.5s ease-out infinite;
}

.scan-dot::after {
  content: '';
  position: absolute;
  inset: 3px;
  background: rgba(236, 72, 153, 0.9);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(236, 72, 153, 0.8);
}

.scan-dot:nth-child(2) {
  animation-delay: 0.5s;
}

.scan-dot:nth-child(3) {
  animation-delay: 1s;
}

@keyframes dotPulse {

  0%,
  100% {
    opacity: 0.3;
    transform: translate(-50%, -50%) scale(0.8);
  }

  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

@keyframes dotRing {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

/* Cycling status text */
.scan-status {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(139, 92, 246, 0.5);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: rgba(139, 92, 246, 1);
  text-shadow: 0 0 8px rgba(139, 92, 246, 0.8);
  white-space: nowrap;
  animation: statusGlow 1.5s ease-in-out infinite alternate;
  backdrop-filter: blur(6px);
}

@keyframes statusGlow {
  0% {
    box-shadow: 0 0 6px rgba(139, 92, 246, 0.3);
  }

  100% {
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.7), 0 0 30px rgba(139, 92, 246, 0.2);
  }
}

/* ====================================
   Premium Analyze Button
   ==================================== */
.btn-analyze-outfit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 14px var(--space-5);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: var(--radius-xl);
  color: white;
  background: linear-gradient(135deg, #7c3aed 0%, #9333ea 50%, #c026d3 100%);
  background-size: 200% 200%;
  border: 1px solid rgba(139, 92, 246, 0.4);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  overflow: hidden;
  transition: all 0.3s ease;
  animation: btnGradientShift 3s ease infinite;
}

@keyframes btnGradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.btn-analyze-outfit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5), 0 0 0 1px rgba(139, 92, 246, 0.3);
}

.btn-analyze-outfit:active {
  transform: translateY(0);
}

.btn-analyze-outfit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Shimmer sweep on button */
.analyze-btn-glow {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transform: skewX(-20deg);
  animation: btnShimmer 2.5s ease-in-out infinite;
}

@keyframes btnShimmer {
  0% {
    left: -100%;
  }

  50%,
  100% {
    left: 160%;
  }
}

.analyze-btn-icon {
  display: flex;
  align-items: center;
  animation: iconSpin 3s linear infinite paused;
}

.btn-analyze-outfit:hover .analyze-btn-icon {
  animation-play-state: running;
}

@keyframes iconSpin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.analyze-btn-text {
  position: relative;
  z-index: 1;
}

/* ====================================
   Welcome Text Glow Effects
   ==================================== */
.welcome-subtitle {
  background: linear-gradient(135deg, rgba(196, 181, 253, 0.95), rgba(167, 139, 250, 0.85), rgba(196, 181, 253, 0.95));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: subtitleGlow 4s ease-in-out infinite alternate;
  filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.3));
}

@keyframes subtitleGlow {
  0% {
    filter: drop-shadow(0 0 6px rgba(139, 92, 246, 0.2));
  }

  50% {
    filter: drop-shadow(0 0 16px rgba(139, 92, 246, 0.5)) drop-shadow(0 0 30px rgba(236, 72, 153, 0.15));
  }

  100% {
    filter: drop-shadow(0 0 6px rgba(139, 92, 246, 0.2));
  }
}

.capability-tag {
  text-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
  animation: tagGlow 3s ease-in-out infinite alternate;
}

.capability-tag:nth-child(1) {
  animation-delay: 0s;
}

.capability-tag:nth-child(2) {
  animation-delay: 0.5s;
}

.capability-tag:nth-child(3) {
  animation-delay: 1s;
}

.capability-tag:nth-child(4) {
  animation-delay: 1.5s;
}

@keyframes tagGlow {
  0% {
    text-shadow: 0 0 6px rgba(139, 92, 246, 0.3);
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.1);
  }

  100% {
    text-shadow: 0 0 14px rgba(139, 92, 246, 0.7), 0 0 25px rgba(236, 72, 153, 0.3);
    box-shadow: 0 0 18px rgba(139, 92, 246, 0.25), 0 0 30px rgba(139, 92, 246, 0.08);
  }
}

.keyboard-hints {
  text-shadow: 0 0 10px rgba(139, 92, 246, 0.25);
}

.kbd {
  text-shadow: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3), 0 0 6px rgba(139, 92, 246, 0.15);
}

/* ====================================
   Ambient Music Player Widget
   ==================================== */

/* -- Floating Toggle Button -- */
#music-toggle {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 52px;
  height: 52px;
  z-index: 9998;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#music-toggle:hover {
  transform: scale(1.12);
}

#music-toggle.active {
  transform: scale(0.9);
  opacity: 0.7;
}

.music-toggle-inner {
  position: relative;
  width: 100%;
  height: 100%;
}

/* Vinyl disc */
.music-vinyl {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%,
      #1a1a2e 0%, #1a1a2e 28%,
      #2d1b4e 30%, #1a1a2e 32%,
      #1a1a2e 55%,
      #2d1b4e 57%, #1a1a2e 59%,
      #0f0f1a 100%);
  border: 2px solid rgba(139, 92, 246, 0.5);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3), inset 0 0 10px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.vinyl-groove,
.vinyl-groove.v2 {
  position: absolute;
  border-radius: 50%;
  border: 0.5px solid rgba(139, 92, 246, 0.15);
}

.vinyl-groove {
  width: 70%;
  height: 70%;
}

.vinyl-groove.v2 {
  width: 85%;
  height: 85%;
}

.vinyl-label {
  font-size: 18px;
  z-index: 1;
  filter: drop-shadow(0 0 4px rgba(139, 92, 246, 0.8));
}

/* Spinning animation when playing */
#music-toggle.playing .music-vinyl {
  animation: vinylSpin 3s linear infinite;
  border-color: rgba(139, 92, 246, 0.8);
  box-shadow: 0 4px 30px rgba(139, 92, 246, 0.5), 0 0 15px rgba(236, 72, 153, 0.3);
}

@keyframes vinylSpin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Pulse rings around toggle */
.music-pulse-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px solid rgba(139, 92, 246, 0.3);
  opacity: 0;
  pointer-events: none;
}

#music-toggle.playing .music-pulse-ring {
  animation: togglePulse 2s ease-out infinite;
}

#music-toggle.playing .music-pulse-ring.r2 {
  animation-delay: 1s;
}

@keyframes togglePulse {
  0% {
    transform: scale(1);
    opacity: 0.6;
  }

  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* -- Panel -- */
#music-panel {
  --mp-accent: #8b5cf6;
  position: fixed;
  bottom: 84px;
  left: 24px;
  width: 300px;
  z-index: 9997;
  background: rgba(10, 6, 22, 0.92);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: 20px;
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.6), 0 0 40px rgba(139, 92, 246, 0.1);
  overflow: hidden;
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0.35s;
  padding: 0;
}

#music-panel.music-panel-closed {
  opacity: 0;
  transform: translateY(20px) scale(0.92);
  visibility: hidden;
  pointer-events: none;
}

#music-panel.music-panel-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
  pointer-events: all;
}

/* Loading state */
#music-panel.loading {
  pointer-events: none;
}

#music-panel.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 6, 22, 0.4);
  z-index: 50;
  animation: loadFlash 1s ease-in-out infinite;
}

@keyframes loadFlash {

  0%,
  100% {
    opacity: 0;
  }

  50% {
    opacity: 1;
  }
}

/* Header */
.mp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 8px;
}

.mp-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mp-logo {
  font-size: 18px;
  filter: drop-shadow(0 0 4px rgba(139, 92, 246, 0.6));
}

.mp-title {
  font-size: 14px;
  font-weight: 700;
  background: linear-gradient(90deg, #a78bfa, #ec4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.5px;
}

.mp-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.mp-close:hover {
  color: white;
  background: rgba(139, 92, 246, 0.2);
}

/* Visualizer */
.mp-visualizer {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  height: 50px;
  padding: 0 16px;
  margin-bottom: 8px;
}

.mp-bar {
  width: 6px;
  min-height: 3px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--mp-accent), rgba(236, 72, 153, 0.7));
  transition: height 0.08s ease;
  box-shadow: 0 0 4px var(--mp-accent);
  opacity: 0.85;
}

.mp-bar:nth-child(odd) {
  opacity: 1;
}

/* Track info */
.mp-track-info {
  text-align: center;
  padding: 0 16px 6px;
}

.mp-track-name {
  font-size: 15px;
  font-weight: 700;
  color: white;
  text-shadow: 0 0 10px rgba(139, 92, 246, 0.4);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-track-artist {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.5px;
}

/* Progress bar */
.mp-progress-wrap {
  padding: 4px 16px 0;
  cursor: pointer;
}

.mp-progress-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  position: relative;
  overflow: visible;
}

.mp-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--mp-accent), #ec4899);
  border-radius: 4px;
  transition: width 0.15s linear;
}

.mp-progress-glow {
  position: absolute;
  top: -3px;
  left: 0%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--mp-accent);
  box-shadow: 0 0 8px var(--mp-accent), 0 0 16px rgba(139, 92, 246, 0.5);
  transform: translateX(-50%);
  opacity: 0;
  transition: left 0.15s linear, opacity 0.3s ease;
}

.mp-progress-wrap:hover .mp-progress-glow {
  opacity: 1;
}

.mp-progress-times {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 3px;
  padding: 0 2px;
}

/* Controls */
.mp-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 10px 0;
}

.mp-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.mp-btn:hover {
  color: white;
  transform: scale(1.15);
}

.mp-btn-secondary {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
}

.mp-btn-secondary:hover {
  background: rgba(139, 92, 246, 0.2);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
}

.mp-btn-play {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #9333ea, #c026d3);
  background-size: 200% 200%;
  color: white;
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
  animation: playBtnGradient 3s ease infinite;
  position: relative;
  overflow: hidden;
}

@keyframes playBtnGradient {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.mp-btn-play:hover {
  box-shadow: 0 6px 30px rgba(139, 92, 246, 0.6), 0 0 0 3px rgba(139, 92, 246, 0.2);
  transform: scale(1.1);
}

.mp-btn-play.playing {
  box-shadow: 0 4px 25px rgba(139, 92, 246, 0.5), 0 0 0 2px rgba(139, 92, 246, 0.15);
  animation: playBtnGradient 3s ease infinite, playingPulse 2s ease-in-out infinite;
}

@keyframes playingPulse {

  0%,
  100% {
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4);
  }

  50% {
    box-shadow: 0 4px 30px rgba(139, 92, 246, 0.6), 0 0 15px rgba(236, 72, 153, 0.3);
  }
}

/* Volume */
.mp-volume-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 16px 10px;
}

.mp-vol-icon {
  color: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

.mp-volume-slider {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

.mp-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--mp-accent);
  box-shadow: 0 0 6px var(--mp-accent);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mp-volume-slider::-webkit-slider-thumb:hover {
  transform: scale(1.3);
  box-shadow: 0 0 12px var(--mp-accent);
}

.mp-vol-pct {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
  width: 28px;
  text-align: right;
}

/* Playlist toggle */
.mp-playlist-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  border-top: 1px solid rgba(139, 92, 246, 0.1);
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.2s ease;
}

.mp-playlist-toggle:hover {
  color: rgba(255, 255, 255, 0.7);
  background: rgba(139, 92, 246, 0.06);
}

.mp-playlist-toggle svg {
  transition: transform 0.3s ease;
}

.mp-playlist-toggle.open svg {
  transform: rotate(180deg);
}

/* Playlist items */
.mp-playlist {
  max-height: 200px;
  overflow-y: auto;
  padding: 0 8px 8px;
}

.mp-playlist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 10px;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.mp-playlist-item:hover {
  background: rgba(139, 92, 246, 0.1);
  color: white;
  transform: translateX(4px);
}

.mp-playlist-item.active {
  background: rgba(139, 92, 246, 0.15);
  color: white;
  box-shadow: inset 0 0 15px rgba(139, 92, 246, 0.08);
}

.mp-pl-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px currentColor;
}

.mp-playlist-item.active .mp-pl-dot {
  animation: dotBeat 1s ease-in-out infinite;
}

@keyframes dotBeat {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.4);
  }
}

.mp-pl-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.mp-pl-name {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mp-pl-artist {
  font-size: 10px;
  opacity: 0.5;
}

.mp-pl-genre {
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(139, 92, 246, 0.12);
  color: rgba(255, 255, 255, 0.4);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ====================================
   Music Widget — Stimulating Effects
   ==================================== */

/* Panel neon border glow animation */
#music-panel.music-panel-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
  pointer-events: all;
  border: 1px solid rgba(139, 92, 246, 0.35);
  animation: panelBorderGlow 4s ease-in-out infinite alternate;
}

@keyframes panelBorderGlow {
  0% {
    border-color: rgba(139, 92, 246, 0.25);
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.6), 0 0 20px rgba(139, 92, 246, 0.08);
  }

  33% {
    border-color: rgba(236, 72, 153, 0.3);
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.6), 0 0 25px rgba(236, 72, 153, 0.12);
  }

  66% {
    border-color: rgba(6, 182, 212, 0.3);
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.6), 0 0 25px rgba(6, 182, 212, 0.1);
  }

  100% {
    border-color: rgba(139, 92, 246, 0.35);
    box-shadow: 0 12px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(139, 92, 246, 0.15);
  }
}

/* Header shimmer sweep */
.mp-header::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.06), rgba(236, 72, 153, 0.04), transparent);
  animation: headerShimmer 5s ease-in-out infinite;
  pointer-events: none;
}

.mp-header {
  position: relative;
  overflow: hidden;
}

@keyframes headerShimmer {
  0% {
    left: -100%;
  }

  50% {
    left: 120%;
  }

  100% {
    left: 120%;
  }
}

/* Track name breathing glow */
.mp-track-name {
  animation: trackNameGlow 3s ease-in-out infinite alternate;
}

@keyframes trackNameGlow {
  0% {
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.3);
  }

  50% {
    text-shadow: 0 0 16px rgba(139, 92, 246, 0.6), 0 0 30px rgba(236, 72, 153, 0.2);
  }

  100% {
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.3);
  }
}

/* Visualizer bar neon bleed */
.mp-visualizer {
  position: relative;
}

.mp-visualizer::before {
  content: '';
  position: absolute;
  inset: -8px -4px;
  background: radial-gradient(ellipse at center bottom, rgba(139, 92, 246, 0.12), transparent 70%);
  filter: blur(8px);
  pointer-events: none;
  z-index: -1;
}

.mp-bar {
  filter: drop-shadow(0 0 3px var(--mp-accent));
}

/* Control buttons — reactive hover with glow burst */
.mp-btn-secondary:active {
  transform: scale(0.9);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.5);
}

.mp-btn-play:active {
  transform: scale(0.92);
  box-shadow: 0 0 35px rgba(139, 92, 246, 0.7), 0 0 60px rgba(236, 72, 153, 0.3) !important;
}

/* Play button inner shimmer */
.mp-btn-play::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent, rgba(255, 255, 255, 0.1), transparent, rgba(255, 255, 255, 0.05), transparent);
  animation: playBtnShimmer 4s linear infinite;
  pointer-events: none;
}

@keyframes playBtnShimmer {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Progress bar reactive glow on hover */
.mp-progress-wrap:hover .mp-progress-fill {
  box-shadow: 0 0 8px var(--mp-accent), 0 0 16px rgba(236, 72, 153, 0.3);
}

.mp-progress-wrap:hover .mp-progress-bar {
  height: 6px;
  transition: height 0.2s ease;
}

/* Volume slider thumb glow */
.mp-volume-slider:active::-webkit-slider-thumb {
  box-shadow: 0 0 14px var(--mp-accent), 0 0 24px rgba(139, 92, 246, 0.4);
  transform: scale(1.4);
}

/* Playlist items — slide-in glow on hover */
.mp-playlist-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, var(--mp-accent), #ec4899);
  border-radius: 3px;
  opacity: 0;
  transform: scaleY(0);
  transition: all 0.25s ease;
}

.mp-playlist-item {
  position: relative;
}

.mp-playlist-item:hover::before {
  opacity: 1;
  transform: scaleY(1);
}

.mp-playlist-item.active::before {
  opacity: 1;
  transform: scaleY(1);
  box-shadow: 0 0 8px var(--mp-accent);
}

/* Vinyl toggle — rainbow border rotation when playing */
#music-toggle.playing .music-vinyl {
  border-image: linear-gradient(var(--vinyl-angle, 0deg), #8b5cf6, #ec4899, #06b6d4, #8b5cf6) 1;
  border-width: 2px;
  border-style: solid;
  border-radius: 50%;
}

#music-toggle.playing {
  filter: drop-shadow(0 0 12px rgba(139, 92, 246, 0.5));
}

/* Playlist toggle — glow when open */
.mp-playlist-toggle.open {
  color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 0 6px rgba(139, 92, 246, 0.4);
  background: rgba(139, 92, 246, 0.08);
}

/* Genre tag glow */
.mp-playlist-item.active .mp-pl-genre {
  background: rgba(139, 92, 246, 0.25);
  color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 6px rgba(139, 92, 246, 0.2);
}

/* Volume icon pulse when high volume */
.mp-vol-icon {
  transition: all 0.3s ease;
}

/* Panel entrance particle burst effect */
#music-panel.music-panel-open::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.15), transparent 70%);
  animation: panelOpenBurst 0.6s ease-out forwards;
  pointer-events: none;
  z-index: -1;
}

@keyframes panelOpenBurst {
  0% {
    width: 0;
    height: 0;
    top: 50%;
    left: 50%;
    opacity: 1;
  }

  100% {
    width: 400px;
    height: 400px;
    top: calc(50% - 200px);
    left: calc(50% - 200px);
    opacity: 0;
  }
}

/* Panel particle canvas */
.mp-particle-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  border-radius: inherit;
}

/* Notes container */
.mp-notes-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
  border-radius: inherit;
}

.mp-floating-note {
  position: absolute;
  bottom: -20px;
  opacity: 0;
  animation: floatNote 3.5s ease-out forwards;
  pointer-events: none;
  filter: drop-shadow(0 0 4px rgba(139, 92, 246, 0.5));
}

@keyframes floatNote {
  0% {
    opacity: 0;
    transform: translateY(0) rotate(0deg) scale(0.5);
  }

  15% {
    opacity: 0.8;
    transform: translateY(-30px) rotate(10deg) scale(1);
  }

  85% {
    opacity: 0.6;
    transform: translateY(-220px) rotate(-15deg) scale(0.9);
  }

  100% {
    opacity: 0;
    transform: translateY(-280px) rotate(-25deg) scale(0.4);
  }
}

/* Button ripple */
.mp-btn {
  position: relative;
  overflow: hidden;
}

.mp-ripple {
  position: absolute;
  border-radius: 50%;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.4);
  transform: translate(-50%, -50%) scale(0);
  animation: mpRipple 0.6s ease-out forwards;
  pointer-events: none;
}

@keyframes mpRipple {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.6;
  }

  100% {
    transform: translate(-50%, -50%) scale(25);
    opacity: 0;
  }
}

/* Shuffle & Repeat mini buttons */
.mp-btn-mini {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.mp-btn-mini:hover {
  background: rgba(139, 92, 246, 0.12);
  color: rgba(255, 255, 255, 0.7);
  border-color: rgba(139, 92, 246, 0.3);
}

.mp-btn-mini.active {
  background: rgba(139, 92, 246, 0.2);
  color: #a78bfa;
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.25);
}

/* Play orbit ring */
.mp-play-orbit {
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid transparent;
  pointer-events: none;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 0;
}

.mp-play-orbit.active {
  border-image: conic-gradient(from 0deg, #8b5cf6, #ec4899, #06b6d4, #f59e0b, #8b5cf6) 1;
  border-width: 2px;
  border-style: solid;
  border-radius: 50%;
  animation: orbitSpin 3s linear infinite;
  filter: drop-shadow(0 0 6px rgba(139, 92, 246, 0.4));
}

@keyframes orbitSpin {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.mp-controls {
  position: relative;
}

/* ====================================
   Fashion Image Gallery in Messages
   ==================================== */
.msg-image-gallery {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(139, 92, 246, 0.12);
}

.msg-gallery-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(167, 139, 250, 0.8);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.msg-gallery-icon {
  font-size: 14px;
}

.msg-gallery-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 92, 246, 0.3) transparent;
}

.msg-gallery-row::-webkit-scrollbar {
  height: 4px;
}

.msg-gallery-row::-webkit-scrollbar-track {
  background: transparent;
}

.msg-gallery-row::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.25);
  border-radius: 4px;
}

.msg-image-card {
  flex-shrink: 0;
  width: 180px;
  border-radius: 12px;
  background: rgba(15, 10, 30, 0.6);
  border: 1px solid rgba(139, 92, 246, 0.12);
  overflow: hidden;
  scroll-snap-align: start;
  transition: all 0.3s ease;
}

.msg-image-card:hover {
  border-color: rgba(139, 92, 246, 0.35);
  box-shadow: 0 4px 20px rgba(139, 92, 246, 0.15);
  transform: translateY(-2px);
}

.msg-image-wrap {
  position: relative;
  width: 100%;
  height: 120px;
  overflow: hidden;
  cursor: pointer;
  background: var(--card-bg, #1a1a2e);
}

.msg-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.msg-image-card:hover .msg-image-wrap img {
  transform: scale(1.08);
}

.msg-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 6, 22, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.msg-image-card:hover .msg-image-overlay {
  opacity: 1;
}

.msg-image-zoom {
  font-size: 20px;
  filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.6));
}

.msg-image-caption {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.msg-image-alt {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: capitalize;
}

.msg-image-credit {
  font-size: 9px;
  color: rgba(167, 139, 250, 0.5);
  text-decoration: none;
  transition: color 0.2s ease;
}

.msg-image-credit:hover {
  color: rgba(167, 139, 250, 0.9);
}

/* Lightbox */
.zephyr-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.zephyr-lightbox.open {
  opacity: 1;
}

.zephyr-lightbox.closing {
  opacity: 0;
}

.lightbox-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.lightbox-content {
  position: relative;
  max-width: 85vw;
  max-height: 85vh;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.2);
  animation: lightboxIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes lightboxIn {
  0% {
    transform: scale(0.85);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.lightbox-content img {
  display: block;
  max-width: 85vw;
  max-height: 75vh;
  object-fit: contain;
}

.lightbox-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(10, 6, 22, 0.95);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.lightbox-info a {
  color: rgba(167, 139, 250, 0.7);
  text-decoration: none;
  transition: color 0.2s ease;
}

.lightbox-info a:hover {
  color: #a78bfa;
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.lightbox-close:hover {
  background: rgba(139, 92, 246, 0.4);
  transform: scale(1.1);
}

/* Responsive gallery */
@media (max-width: 768px) {
  .msg-image-card {
    width: 150px;
  }

  .msg-image-wrap {
    height: 100px;
  }

  .lightbox-content {
    max-width: 95vw;
    max-height: 90vh;
  }

  .lightbox-content img {
    max-width: 95vw;
    max-height: 80vh;
  }
}

/* Hidden utility */
.hidden {
  display: none !important;
}

/* ====================================
   Color Search — Explore Trends
   ==================================== */
.color-search-section {
  margin-top: var(--space-5);
  margin-bottom: var(--space-5);
  padding: var(--space-5);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  position: relative;
  overflow: hidden;
}

.color-search-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.04), rgba(236, 72, 153, 0.03), transparent 60%);
  pointer-events: none;
}

.color-search-header {
  text-align: center;
  margin-bottom: var(--space-5);
  position: relative;
}

.color-search-icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: var(--space-2);
  filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.3));
  animation: icon-float 4s ease-in-out infinite;
}

.color-search-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-1);
}

.color-search-subtitle {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  margin: 0;
}

/* Color Palette Grid */
.color-palette-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: var(--space-3);
  position: relative;
}

.color-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-2);
  border-radius: var(--radius-lg);
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.color-swatch:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-default);
  transform: translateY(-3px);
}

.color-swatch:active {
  transform: translateY(-1px) scale(0.97);
}

.color-swatch.active {
  background: rgba(139, 92, 246, 0.08);
  border-color: var(--primary-500);
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.15);
}

.color-swatch.active .swatch-circle {
  transform: scale(1.15);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3), 0 4px 16px rgba(0, 0, 0, 0.3);
}

.swatch-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3), inset 0 1px 2px rgba(255, 255, 255, 0.15);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.swatch-circle::after {
  content: '';
  position: absolute;
  top: 4px;
  left: 8px;
  width: 14px;
  height: 8px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  filter: blur(3px);
}

.color-swatch:hover .swatch-circle {
  transform: scale(1.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.15);
}

.swatch-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-tertiary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.color-swatch:hover .swatch-label,
.color-swatch.active .swatch-label {
  color: var(--text-primary);
}

/* Color Image Results */
.color-image-results {
  margin-top: var(--space-5);
  margin-bottom: var(--space-5);
  padding: var(--space-5);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  animation: color-results-in 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes color-results-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.color-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
}

.color-results-title-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.color-results-swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.color-results-title {
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.color-results-close {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-size: var(--text-sm);
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
}

.color-results-close:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
  color: var(--error);
}

/* Image Grid */
.color-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-4);
}

.color-img-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  animation: color-card-in 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  cursor: pointer;
  position: relative;
}

.color-img-card:nth-child(1) { animation-delay: 0.05s; }
.color-img-card:nth-child(2) { animation-delay: 0.12s; }
.color-img-card:nth-child(3) { animation-delay: 0.19s; }
.color-img-card:nth-child(4) { animation-delay: 0.26s; }
.color-img-card:nth-child(5) { animation-delay: 0.33s; }
.color-img-card:nth-child(6) { animation-delay: 0.40s; }
.color-img-card:nth-child(7) { animation-delay: 0.47s; }
.color-img-card:nth-child(8) { animation-delay: 0.54s; }
.color-img-card:nth-child(9) { animation-delay: 0.61s; }

@keyframes color-card-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.color-img-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--primary-500);
  box-shadow: 0 8px 32px rgba(139, 92, 246, 0.15), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.color-img-wrap {
  width: 100%;
  height: 180px;
  overflow: hidden;
  position: relative;
}

.color-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.color-img-card:hover .color-img-wrap img {
  transform: scale(1.08);
}

.color-img-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.7));
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: var(--space-4);
}

.color-img-card:hover .color-img-overlay {
  opacity: 1;
}

.color-img-view-btn {
  padding: var(--space-2) var(--space-4);
  background: rgba(139, 92, 246, 0.8);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
  color: white;
  font-size: var(--text-xs);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  transform: translateY(6px);
}

.color-img-card:hover .color-img-view-btn {
  transform: translateY(0);
}

.color-img-view-btn:hover {
  background: rgba(139, 92, 246, 1);
}

.color-img-info {
  padding: var(--space-3);
}

.color-img-alt {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
  display: block;
  margin-bottom: var(--space-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.color-img-credit {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: var(--space-1);
  text-decoration: none;
  transition: color 0.2s ease;
}

.color-img-credit:hover {
  color: var(--primary-400);
}

/* Loading Shimmer */
.color-results-loading {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-4);
}

.color-loading-shimmer {
  height: 230px;
  border-radius: var(--radius-lg);
  background: linear-gradient(110deg, 
    var(--bg-tertiary) 30%, 
    rgba(139, 92, 246, 0.06) 50%, 
    var(--bg-tertiary) 70%);
  background-size: 250% 100%;
  animation: shimmer-wave 1.8s ease-in-out infinite;
  border: 1px solid var(--border-subtle);
}

@keyframes shimmer-wave {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* No results state */
.color-no-results {
  text-align: center;
  padding: var(--space-8);
  color: var(--text-tertiary);
}

.color-no-results-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: var(--space-3);
  opacity: 0.5;
}

.color-no-results-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
  .color-palette-grid {
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: var(--space-2);
  }

  .swatch-circle {
    width: 32px;
    height: 32px;
  }

  .swatch-label {
    font-size: 0.55rem;
  }

  .color-image-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--space-3);
  }

  .color-img-wrap {
    height: 140px;
  }

  .color-search-section {
    padding: var(--space-3);
  }
}

/* ====================================
   Theme Widget — Toggle Button
   ==================================== */
.zt-toggle {
  position: fixed;
  bottom: 90px;
  left: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-600), var(--primary-800));
  border: 2px solid rgba(255,255,255,0.12);
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 600;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 20px var(--primary-500);
  transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1);
  animation: ztTogglePulse 3s ease-in-out infinite;
}
.zt-toggle:hover {
  transform: scale(1.12) rotate(15deg);
  box-shadow: 0 6px 30px rgba(0,0,0,0.5), 0 0 35px var(--primary-400);
}
.zt-toggle.active {
  transform: scale(1.05) rotate(180deg);
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  animation: none;
}
@keyframes ztTogglePulse {
  0%,100% { box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 15px var(--primary-500); }
  50% { box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 35px var(--primary-400), 0 0 60px var(--primary-500); }
}

/* Theme Panel */
.zt-panel {
  position: fixed;
  bottom: 90px;
  left: 84px;
  width: 380px;
  max-height: 520px;
  background: var(--bg-glass);
  backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  z-index: 601;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.92);
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 40px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.06);
}
.zt-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: all;
}
.zt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.zt-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.zt-header-icon {
  font-size: 1.5rem;
  filter: drop-shadow(0 0 8px var(--primary-400));
}
.zt-header-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.zt-header-sub {
  font-size: 0.72rem;
  color: var(--text-tertiary);
}
.zt-close {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: none;
  color: var(--text-tertiary);
  font-size: 0.8rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
}
.zt-close:hover {
  background: rgba(255,255,255,0.12);
  color: var(--text-primary);
}
.zt-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 16px 20px;
  max-height: 380px;
  overflow-y: auto;
}
.zt-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  position: relative;
}
.zt-card:hover {
  transform: translateY(-3px) scale(1.03);
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}
.zt-card.active {
  border-color: var(--primary-400);
  box-shadow: 0 0 20px rgba(var(--primary-500),0.2), 0 4px 15px rgba(0,0,0,0.3);
}
.zt-card.active::after {
  content: '✓';
  position: absolute;
  top: 8px; right: 8px;
  width: 20px; height: 20px;
  background: var(--primary-500);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.6rem;
  color: white;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.zt-card-preview {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.zt-card-icon {
  font-size: 1.6rem;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}
.zt-card-dots {
  position: absolute;
  bottom: 6px;
  display: flex; gap: 4px;
}
.zt-card-dots span {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.3);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.zt-card-info {
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.zt-card-name {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-primary);
}
.zt-card-badge {
  font-size: 0.55rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 20px;
  background: rgba(255,255,255,0.06);
  color: var(--text-tertiary);
  letter-spacing: 0.5px;
}
.zt-card.active .zt-card-badge {
  background: var(--primary-500);
  color: white;
}
.zt-footer {
  padding: 10px 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  text-align: center;
}
.zt-footer-text {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  opacity: 0.7;
}

@media (max-width: 500px) {
  .zt-panel {
    left: 12px; right: 12px;
    width: auto; bottom: 80px;
  }
  .zt-toggle {
    bottom: 20px; left: 16px;
    width: 46px; height: 46px;
    font-size: 1.2rem;
  }
}

/* ====================================
   Chat Mode Picker
   ==================================== */
.mode-container { position: relative; }
.btn-mode {
  width: 38px; height: 38px;
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--primary-500) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary-500) 20%, transparent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.btn-mode:hover {
  background: color-mix(in srgb, var(--primary-500) 20%, transparent);
  transform: scale(1.08);
  box-shadow: 0 0 15px color-mix(in srgb, var(--primary-500) 25%, transparent);
}
.mode-picker {
  position: absolute; bottom: calc(100% + 10px); left: 0;
  width: 280px;
  background: var(--bg-glass);
  backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 6px;
  z-index: 500;
  opacity: 0; transform: translateY(10px) scale(0.95);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  box-shadow: 0 16px 48px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.06);
}
.mode-picker.active {
  opacity: 1; transform: translateY(0) scale(1);
  pointer-events: all;
}
.mode-picker-header {
  padding: 10px 14px 6px;
  font-size: 0.65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-tertiary);
}
.mode-option {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 14px;
  border-radius: 12px; border: none;
  background: transparent; cursor: pointer;
  transition: all 0.2s ease; color: var(--text-secondary);
}
.mode-option:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}
.mode-option.active {
  background: color-mix(in srgb, var(--primary-500) 12%, transparent);
  color: var(--text-primary);
}
.mode-opt-icon { font-size: 1.3rem; width: 32px; text-align: center; }
.mode-opt-info { flex: 1; text-align: left; }
.mode-opt-name { display: block; font-size: 0.82rem; font-weight: 600; }
.mode-opt-desc { display: block; font-size: 0.68rem; color: var(--text-tertiary); margin-top: 1px; }
.mode-check {
  font-size: 0.7rem; color: var(--primary-400);
  opacity: 0; transition: opacity 0.2s ease;
  background: color-mix(in srgb, var(--primary-500) 15%, transparent);
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.mode-option.active .mode-check { opacity: 1; }

/* ====================================
   Settings Tabs & Controls
   ==================================== */
.settings-tabs {
  display: flex; gap: 4px;
  background: rgba(255,255,255,0.04);
  border-radius: 12px; padding: 4px;
  margin-bottom: 20px;
}
.settings-tab {
  flex: 1; padding: 10px 16px;
  border: none; border-radius: 10px;
  background: transparent; color: var(--text-tertiary);
  font-size: 0.8rem; font-weight: 600;
  cursor: pointer; transition: all 0.25s ease;
}
.settings-tab:hover { color: var(--text-secondary); background: rgba(255,255,255,0.04); }
.settings-tab.active {
  background: color-mix(in srgb, var(--primary-500) 15%, transparent);
  color: var(--text-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.settings-panel { display: none; }
.settings-panel.active { display: block; }
.setting-row {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.setting-row:last-child { border-bottom: none; }
.setting-info { flex: 1; }
.setting-label {
  display: block; font-size: 0.85rem;
  font-weight: 600; color: var(--text-primary);
}
.setting-desc {
  display: block; font-size: 0.7rem;
  color: var(--text-tertiary); margin-top: 2px;
}
.form-select-mini {
  padding: 6px 10px; border-radius: 8px;
  background: var(--bg-tertiary); color: var(--text-primary);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 0.78rem; cursor: pointer;
}
.btn-mini {
  padding: 6px 14px; border-radius: 8px;
  background: color-mix(in srgb, var(--primary-500) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary-500) 25%, transparent);
  color: var(--primary-300); font-size: 0.75rem;
  font-weight: 600; cursor: pointer;
  transition: all 0.2s ease;
}
.btn-mini:hover {
  background: color-mix(in srgb, var(--primary-500) 25%, transparent);
}
.btn-mini.btn-danger {
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.25);
  color: #f87171;
}
.btn-mini.btn-danger:hover { background: rgba(239,68,68,0.2); }

/* Toggle Switch */
.toggle-switch {
  position: relative;
  width: 44px; height: 24px;
  display: inline-block;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.1);
  border-radius: 24px; cursor: pointer;
  transition: all 0.3s ease;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; bottom: 3px;
  background: var(--text-tertiary);
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.toggle-switch input:checked + .toggle-slider {
  background: var(--primary-500);
}
.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
  background: white;
}

/* ====================================
   Fun Zone — New Games CSS
   ==================================== */
.bubble-arena {
  position: relative; height: 140px;
  border-radius: 12px; overflow: hidden;
  background: rgba(0,0,0,0.2);
}
.bubble {
  position: absolute; bottom: -50px;
  border-radius: 50%; cursor: pointer;
  animation: bubbleRise 4s ease-in forwards;
  transition: transform 0.15s ease;
  box-shadow: inset 0 -4px 8px rgba(255,255,255,0.3), 0 2px 8px rgba(0,0,0,0.2);
}
.bubble:hover { transform: scale(1.15); }
.bubble.popped {
  transform: scale(1.8); opacity: 0;
  transition: all 0.3s ease;
}
@keyframes bubbleRise {
  0% { bottom: -50px; opacity: 0; }
  10% { opacity: 1; }
  100% { bottom: 130px; opacity: 0.6; }
}

/* Fidget Spinner */
.spinner-container {
  display: flex; flex-direction: column;
  align-items: center; gap: 8px; padding: 10px 0;
}
.spinner-wheel {
  font-size: 3.5rem; cursor: grab;
  user-select: none; transition: none;
  filter: drop-shadow(0 0 10px var(--primary-400));
}
.spinner-wheel:active { cursor: grabbing; }
.spinner-speed {
  font-size: 0.75rem; font-weight: 700;
  color: var(--primary-300);
  font-family: var(--font-mono, monospace);
}

/* Stress Ball */
.stress-ball-wrap {
  display: flex; flex-direction: column;
  align-items: center; gap: 8px; padding: 10px 0;
}
.stress-ball {
  width: 80px; height: 80px;
  border-radius: 50%; font-size: 2rem;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 35%, var(--primary-200), var(--primary-600));
  cursor: pointer; user-select: none;
  transition: transform 0.15s cubic-bezier(0.34,1.56,0.64,1), border-radius 0.15s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3), inset 0 -3px 8px rgba(0,0,0,0.2);
}
.stress-ball:hover { transform: scale(1.05); }
.stress-ball.squeezed {
  transform: scale(0.75) scaleX(1.3);
  border-radius: 45%;
}
.stress-counter {
  font-size: 0.7rem; color: var(--text-tertiary);
  font-weight: 600;
}

/* Memory Match */
.memory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px; padding: 6px 0;
}
.mem-card {
  aspect-ratio: 1; border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  cursor: pointer; position: relative;
  font-size: 1.2rem; overflow: hidden;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.mem-card:hover { transform: scale(1.05); border-color: var(--primary-400); }
.mem-front, .mem-back {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  backface-visibility: hidden;
  transition: opacity 0.3s ease;
}
.mem-front {
  color: var(--text-tertiary); font-weight: 700;
  font-size: 1rem;
}
.mem-back { opacity: 0; font-size: 1.4rem; }
.mem-card.flipped .mem-front { opacity: 0; }
.mem-card.flipped .mem-back { opacity: 1; }
.mem-card.matched {
  background: color-mix(in srgb, var(--primary-500) 15%, transparent);
  border-color: var(--primary-400);
  box-shadow: 0 0 12px color-mix(in srgb, var(--primary-500) 20%, transparent);
}
.mem-card.matched .mem-front { opacity: 0; }
.mem-card.matched .mem-back { opacity: 1; }

/* Zen Tap Pads */
.zentap-pads {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px; padding: 8px 0;
}
.zentap-pad {
  aspect-ratio: 1; border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  font-size: 1.4rem; cursor: pointer;
  transition: all 0.15s cubic-bezier(0.34,1.56,0.64,1);
  display: flex; align-items: center; justify-content: center;
}
.zentap-pad:hover {
  background: color-mix(in srgb, var(--primary-500) 10%, transparent);
  transform: scale(1.05);
}
.zentap-pad.active {
  transform: scale(0.9);
  background: color-mix(in srgb, var(--primary-500) 25%, transparent);
  border-color: var(--primary-400);
  box-shadow: 0 0 20px color-mix(in srgb, var(--primary-500) 30%, transparent);
}

/* Voice button on AI messages */
.voice-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer; font-size: 0.75rem;
  transition: all 0.2s ease; margin-left: 6px;
  vertical-align: middle;
}
.voice-btn:hover {
  background: color-mix(in srgb, var(--primary-500) 15%, transparent);
  border-color: var(--primary-400);
}
.voice-btn.speaking {
  background: var(--primary-500);
  color: white;
  animation: voicePulse 1s ease-in-out infinite;
}
@keyframes voicePulse {
  0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary-500) 40%, transparent); }
  50% { box-shadow: 0 0 0 6px transparent; }
}

/* ====================================
   Game Card Grid (Launcher)
   ==================================== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px; padding: 0 4px;
}
@media (max-width: 768px) { .games-grid { grid-template-columns: repeat(2, 1fr); } }

.game-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px; padding: 24px 16px;
  text-align: center; cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.game-card:hover {
  transform: translateY(-4px) scale(1.02);
  background: color-mix(in srgb, var(--primary-500) 8%, transparent);
  border-color: color-mix(in srgb, var(--primary-500) 25%, transparent);
  box-shadow: 0 8px 30px rgba(0,0,0,0.25), 0 0 20px color-mix(in srgb, var(--primary-500) 10%, transparent);
}
.game-card:active { transform: scale(0.97); }
.game-card-icon {
  font-size: 2.4rem;
  margin-bottom: 10px;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.3));
}
.game-card-name {
  font-size: 0.9rem; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.game-card-desc {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  line-height: 1.4;
}

/* ====================================
   Game Arena (Fullscreen Play)
   ==================================== */
#games-arena {
  flex-direction: column;
  height: 100%;
  background: rgba(15,12,20,0.95);
  border-radius: 16px;
  overflow: hidden;
}
.games-topbar {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(0,0,0,0.3);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.games-back-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-secondary);
  padding: 6px 14px; border-radius: 8px;
  font-size: 0.78rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s ease;
}
.games-back-btn:hover {
  background: color-mix(in srgb, var(--primary-500) 15%, transparent);
  color: var(--text-primary);
}
.games-active-name {
  font-size: 0.9rem; font-weight: 700;
  color: var(--text-primary);
}
.games-score-display {
  font-size: 0.78rem; font-weight: 600;
  color: var(--primary-300);
  font-family: var(--font-mono, monospace);
}
#games-canvas {
  flex: 1; width: 100%;
  display: block;
  background: rgba(15,12,20,1);
  border-radius: 0 0 16px 16px;
}

/* Piano Keys */
.games-piano-keys {
  display: flex; gap: 3px;
  padding: 8px; justify-content: center;
  background: rgba(0,0,0,0.3);
}
.piano-key {
  padding: 14px 8px; border-radius: 0 0 8px 8px;
  min-width: 36px; text-align: center;
  font-size: 0.65rem; font-weight: 700;
  cursor: pointer; transition: all 0.15s ease;
  color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
}
.piano-key:hover {
  background: color-mix(in srgb, var(--key-color, var(--primary-500)) 20%, transparent);
}
.piano-key.pressed {
  transform: scaleY(0.95);
  background: var(--key-color, var(--primary-500));
  color: white;
  box-shadow: 0 0 15px var(--key-color, var(--primary-500));
}

@keyframes gamesFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ====================================
   Level Up — Guide Cards
   ==================================== */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px; padding: 0 4px;
}
.guide-card {
  position: relative;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 18px; padding: 24px 20px 18px;
  text-align: center;
  transition: all 0.35s cubic-bezier(0.34,1.56,0.64,1);
  overflow: hidden;
}
.guide-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary-500), var(--primary-300));
  opacity: 0; transition: opacity 0.3s ease;
}
.guide-card:hover {
  transform: translateY(-6px);
  background: color-mix(in srgb, var(--primary-500) 6%, transparent);
  border-color: color-mix(in srgb, var(--primary-500) 20%, transparent);
  box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 0 30px color-mix(in srgb, var(--primary-500) 8%, transparent);
}
.guide-card:hover::before { opacity: 1; }
.guide-badge {
  position: absolute; top: 12px; right: 12px;
  padding: 3px 8px; border-radius: 6px;
  font-size: 0.6rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.5px;
  background: color-mix(in srgb, var(--primary-500) 15%, transparent);
  color: var(--primary-300);
  border: 1px solid color-mix(in srgb, var(--primary-500) 20%, transparent);
}
.guide-badge.hot {
  background: rgba(239,68,68,0.12);
  border-color: rgba(239,68,68,0.25);
  color: #f87171;
}
.guide-badge.pro {
  background: rgba(245,158,11,0.12);
  border-color: rgba(245,158,11,0.25);
  color: #fbbf24;
}
.guide-icon {
  font-size: 2.6rem;
  margin: 8px 0 12px;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}
.guide-title {
  font-size: 1rem; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.guide-desc {
  font-size: 0.72rem; line-height: 1.5;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}
.guide-meta {
  display: flex; justify-content: center; gap: 12px;
  margin-bottom: 14px;
}
.guide-meta span {
  font-size: 0.65rem; font-weight: 600;
  color: var(--text-tertiary);
  background: rgba(255,255,255,0.04);
  padding: 3px 8px; border-radius: 6px;
}
.guide-download {
  display: inline-block; padding: 8px 20px;
  border-radius: 10px; font-size: 0.78rem; font-weight: 700;
  text-decoration: none;
  background: linear-gradient(135deg, var(--primary-500), var(--primary-400));
  color: white;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px color-mix(in srgb, var(--primary-500) 25%, transparent);
}
.guide-download:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--primary-500) 35%, transparent);
}

/* ====================================
   Intro Video Splash
   ==================================== */
.intro-splash {
  position: fixed; inset: 0;
  z-index: 100000;
  background: #000;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.intro-splash.fade-out {
  opacity: 0;
  pointer-events: none;
}
.intro-splash.hidden { display: none; }
.intro-splash video {
  width: 100%; height: 100%;
  object-fit: cover;
}
.intro-skip {
  position: absolute;
  bottom: 32px; right: 32px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.7);
  padding: 8px 20px; border-radius: 24px;
  font-size: 0.78rem; font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  z-index: 100001;
}
.intro-skip:hover {
  background: rgba(255,255,255,0.15);
  color: #fff;
  transform: translateX(3px);
}

/* ====================================
   Command Palette (Ctrl+K)
   ==================================== */
.cmd-overlay {
  position: fixed; inset: 0;
  z-index: 90000;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 15vh;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
}
.cmd-overlay.active { opacity: 1; pointer-events: all; }
.cmd-dialog {
  width: 560px; max-width: 92vw;
  background: rgba(18, 14, 28, 0.95);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  box-shadow: 0 25px 80px rgba(0,0,0,0.5), 0 0 40px color-mix(in srgb, var(--primary-500) 8%, transparent);
  overflow: hidden;
  transform: scale(0.96) translateY(-8px);
  transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.cmd-overlay.active .cmd-dialog { transform: scale(1) translateY(0); }
.cmd-search-wrap {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cmd-search-icon { font-size: 1.1rem; color: var(--primary-400); }
.cmd-search {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text-primary);
  font-size: 0.95rem; font-weight: 500; font-family: inherit;
}
.cmd-search::placeholder { color: var(--text-tertiary); }
.cmd-esc {
  font-size: 0.6rem; padding: 3px 6px; border-radius: 4px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-tertiary); font-family: inherit;
}
.cmd-results {
  max-height: 340px; overflow-y: auto; padding: 6px 0;
}
.cmd-results::-webkit-scrollbar { width: 4px; }
.cmd-results::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }
.cmd-group-label {
  padding: 8px 18px 4px;
  font-size: 0.6rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  color: var(--text-tertiary);
}
.cmd-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 18px; cursor: pointer;
  transition: background 0.12s ease;
  border-left: 2px solid transparent;
}
.cmd-item:hover, .cmd-item.active {
  background: color-mix(in srgb, var(--primary-500) 10%, transparent);
  border-left-color: var(--primary-400);
}
.cmd-item-icon { font-size: 1.1rem; width: 24px; text-align: center; }
.cmd-item-label {
  flex: 1; font-size: 0.82rem; font-weight: 500; color: var(--text-primary);
}
.cmd-item-category {
  font-size: 0.6rem; font-weight: 600; color: var(--text-tertiary);
  background: rgba(255,255,255,0.04); padding: 2px 6px; border-radius: 4px;
}
.cmd-empty {
  padding: 24px; text-align: center;
  color: var(--text-tertiary); font-size: 0.82rem;
}
.cmd-footer {
  display: flex; gap: 16px; justify-content: center;
  padding: 10px 18px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.6rem; color: var(--text-tertiary);
}
.cmd-footer kbd {
  font-size: 0.58rem; padding: 1px 5px; border-radius: 3px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  font-family: inherit; margin-right: 3px;
}

/* ====================================
   Outro Trigger Button
   ==================================== */
.outro-trigger {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 20px;
  background: linear-gradient(135deg, rgba(124,58,237,0.2), rgba(236,72,153,0.2));
  border: 1px solid rgba(124,58,237,0.3);
  color: var(--primary-300);
  font-size: 0.72rem; font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
  position: relative; overflow: hidden;
  font-family: inherit;
}
.outro-trigger::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--primary-500), #ec4899);
  opacity: 0; transition: opacity 0.3s ease;
  border-radius: 20px;
}
.outro-trigger:hover {
  transform: scale(1.05);
  border-color: var(--primary-400);
  box-shadow: 0 4px 20px color-mix(in srgb, var(--primary-500) 25%, transparent);
}
.outro-trigger:hover::before { opacity: 0.15; }
.outro-trigger-icon { font-size: 0.9rem; position: relative; z-index: 1; }
.outro-trigger-text { position: relative; z-index: 1; letter-spacing: 0.5px; }

@keyframes outroPulse {
  0%,100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary-500) 30%, transparent); }
  50% { box-shadow: 0 0 0 6px transparent; }
}

/* ====================================
   Outro Video Overlay
   ==================================== */
.outro-splash {
  position: fixed; inset: 0;
  z-index: 100000;
  background: #000;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.outro-splash.hidden { display: none; }
.outro-splash.fade-out { opacity: 0; pointer-events: none; }
.outro-splash video {
  width: 100%; height: 100%;
  object-fit: cover;
  position: absolute; inset: 0;
}
.outro-text-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 2;
  background: rgba(0,0,0,0.3);
  opacity: 0;
  animation: outroTextFade 8s ease forwards;
}
.outro-tagline {
  font-size: 1rem; font-weight: 500;
  color: rgba(255,255,255,0.6);
  letter-spacing: 3px; text-transform: uppercase;
  margin-bottom: 12px;
  opacity: 0;
  animation: outroSlideUp 1s ease 2s forwards;
}
.outro-brand {
  font-size: 3rem; font-weight: 800;
  color: #fff; letter-spacing: 8px;
  text-shadow: 0 0 40px rgba(124,58,237,0.5), 0 0 80px rgba(124,58,237,0.2);
  opacity: 0;
  animation: outroSlideUp 1s ease 3s forwards;
}
.outro-sub {
  font-size: 1.1rem; font-weight: 400;
  color: rgba(167,139,250,0.8);
  letter-spacing: 2px; font-style: italic;
  margin-top: 8px;
  opacity: 0;
  animation: outroSlideUp 1s ease 4s forwards;
}

@keyframes outroTextFade {
  0% { opacity: 0; }
  20% { opacity: 1; }
  100% { opacity: 1; }
}
@keyframes outroSlideUp {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ====================================
   Avatar Window
   ==================================== */
.avatar-window {
  display: flex; flex-direction: column;
  height: 100%; overflow: hidden;
}
.avatar-selector {
  display: flex; gap: 6px; padding: 12px 16px;
  overflow-x: auto; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.avatar-option {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-tertiary); cursor: pointer;
  font-size: 0.72rem; font-weight: 600;
  white-space: nowrap; transition: all 0.25s ease;
  font-family: inherit;
}
.avatar-option:hover {
  background: color-mix(in srgb, var(--primary-500) 8%, transparent);
  color: var(--text-secondary);
}
.avatar-option.active {
  background: color-mix(in srgb, var(--primary-500) 15%, transparent);
  border-color: var(--primary-400);
  color: var(--primary-300);
  box-shadow: 0 0 15px color-mix(in srgb, var(--primary-500) 15%, transparent);
}
.avatar-opt-icon { font-size: 1rem; }
.avatar-opt-name { font-size: 0.7rem; }
.avatar-stage {
  flex: 1; position: relative;
  min-height: 400px;
  background: rgba(12, 10, 22, 0.96);
  backdrop-filter: blur(24px);
  border-radius: 16px;
  margin: 0 12px;
  overflow: hidden;
  border: 1px solid rgba(139,92,246,0.15);
  box-shadow:
    0 20px 60px rgba(0,0,0,0.5),
    0 0 80px rgba(139,92,246,0.08),
    inset 0 1px 0 rgba(255,255,255,0.05);
}
.avatar-stage::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 25% 15%, rgba(139,92,246,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 75% 85%, rgba(59,130,246,0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(124,58,237,0.08) 0%, transparent 40%);
  pointer-events: none; z-index: 0;
  animation: avatarAmbientPulse 4s ease-in-out infinite;
}
@keyframes avatarAmbientPulse {
  0%,100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.02); }
}
.avatar-stage canvas { width: 100%; height: 100%; display: block; }
.avatar-status-bar {
  position: absolute; top: 12px; left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: 12px;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.06);
  font-size: 0.65rem; color: var(--text-tertiary);
}
.avatar-status-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #10b981;
  animation: avatarPulse 2s ease infinite;
}
@keyframes avatarPulse {
  0%,100% { opacity: 1; } 50% { opacity: 0.3; }
}
.avatar-response-area {
  padding: 14px 20px;
  min-height: 40px; max-height: 100px;
  overflow-y: auto;
  background: rgba(12,10,22,0.5);
  margin: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(139,92,246,0.06);
}
.avatar-response-text {
  font-size: 0.82rem; line-height: 1.6;
  color: var(--text-secondary);
  font-style: italic; margin: 0;
  transition: opacity 0.5s ease;
}
.avatar-modes {
  display: flex; gap: 6px; padding: 10px 16px 4px;
  overflow-x: auto; justify-content: center;
  scrollbar-width: none;
}
.avatar-modes::-webkit-scrollbar { display: none; }
.avatar-mode-btn {
  padding: 6px 14px; border-radius: 20px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-tertiary);
  font-size: 0.68rem; font-weight: 600;
  white-space: nowrap; cursor: pointer;
  transition: all 0.25s ease; font-family: inherit;
}
.avatar-mode-btn:hover {
  color: var(--text-secondary);
  background: rgba(139,92,246,0.06);
}
.avatar-mode-btn.active {
  background: linear-gradient(135deg, rgba(139,92,246,0.15), rgba(59,130,246,0.08));
  border-color: rgba(139,92,246,0.25);
  color: var(--primary-300);
  box-shadow: 0 0 12px rgba(139,92,246,0.08);
}
.avatar-prompts {
  display: flex; gap: 6px; padding: 4px 16px 8px;
  overflow-x: auto; justify-content: center;
  scrollbar-width: none;
}
.avatar-prompts::-webkit-scrollbar { display: none; }
.avatar-prompt {
  padding: 5px 12px; border-radius: 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.04);
  color: var(--text-tertiary);
  font-size: 0.62rem; font-weight: 500;
  white-space: nowrap; cursor: pointer;
  transition: all 0.25s ease; font-family: inherit;
}
.avatar-prompt:hover {
  background: rgba(139,92,246,0.08);
  border-color: rgba(139,92,246,0.15);
  color: var(--text-secondary);
}
.avatar-input-area {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid rgba(139,92,246,0.08);
  background: rgba(15,12,25,0.4);
  position: relative;
}
.avatar-input-area::before {
  content: '';
  position: absolute; top: -1px;
  left: 20%; right: 20%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,92,246,0.25), transparent);
  animation: avatarInputGlow 3s ease-in-out infinite;
}
@keyframes avatarInputGlow {
  0%,100% { opacity: 0.4; left: 20%; right: 20%; }
  50% { opacity: 1; left: 10%; right: 10%; }
}
.avatar-mic-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(139,92,246,0.12);
  font-size: 1rem; cursor: pointer;
  transition: all 0.25s ease; color: var(--text-tertiary);
  flex-shrink: 0;
}
.avatar-mic-btn:hover {
  background: rgba(139,92,246,0.12);
  color: var(--primary-300);
  border-color: rgba(139,92,246,0.25);
}
.avatar-mic-btn.listening {
  background: rgba(239,68,68,0.15);
  border-color: rgba(239,68,68,0.3);
  animation: micPulse 1s ease infinite;
}
@keyframes micPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.3); }
  50% { box-shadow: 0 0 0 8px transparent; }
}
.avatar-input {
  flex: 1; padding: 10px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(139,92,246,0.1);
  border-radius: 14px; color: var(--text-primary);
  font-size: 0.82rem; outline: none;
  font-family: inherit;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.avatar-input::placeholder { color: rgba(255,255,255,0.2); }
.avatar-input:focus {
  border-color: rgba(139,92,246,0.3);
  box-shadow: 0 0 16px rgba(139,92,246,0.06), inset 0 0 20px rgba(139,92,246,0.02);
  background: rgba(255,255,255,0.06);
}
.avatar-speak-btn {
  padding: 10px 20px; border-radius: 14px;
  background: linear-gradient(135deg, var(--primary-500), #3b82f6);
  border: none; color: white;
  font-size: 0.78rem; font-weight: 700;
  cursor: pointer; white-space: nowrap;
  transition: all 0.25s ease; font-family: inherit;
  box-shadow: 0 4px 18px rgba(139,92,246,0.25);
  flex-shrink: 0;
}
.avatar-speak-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 6px 24px rgba(139,92,246,0.35);
}

/* ─── Personality Info Widget ─── */
.avatar-personality-widget {
  position: relative;
  padding: 0 16px 6px;
  display: flex; justify-content: flex-end;
}
.avatar-info-toggle {
  display: flex; align-items: center; gap: 5px;
  padding: 5px 14px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(139,92,246,0.12), rgba(236,72,153,0.08));
  border: 1px solid rgba(139,92,246,0.2);
  color: var(--primary-300); font-size: 0.68rem; font-weight: 700;
  cursor: pointer; transition: all 0.25s ease; font-family: inherit;
}
.avatar-info-toggle:hover {
  background: linear-gradient(135deg, rgba(139,92,246,0.2), rgba(236,72,153,0.15));
  transform: scale(1.03);
}
.avatar-info-panel {
  position: absolute; top: 100%; right: 16px;
  width: 300px; z-index: 50;
  background: rgba(12,10,22,0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(139,92,246,0.15);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 20px rgba(139,92,246,0.06);
  overflow: hidden;
  animation: avatarInfoSlide 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.avatar-info-panel.hidden { display: none; }
@keyframes avatarInfoSlide {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.avatar-info-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 0.82rem; font-weight: 700; color: var(--text-primary);
}
.avatar-info-close {
  background: none; border: none; color: var(--text-tertiary);
  cursor: pointer; font-size: 0.8rem; padding: 2px 6px;
  border-radius: 4px; transition: color 0.2s;
}
.avatar-info-close:hover { color: var(--text-primary); }
.avatar-info-body { padding: 10px 16px 14px; }
.avatar-info-row {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
}
.avatar-info-row:last-child { border-bottom: none; }
.avatar-info-label {
  font-size: 0.58rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.8px; color: var(--primary-400);
}
.avatar-info-row span:last-child {
  font-size: 0.75rem; color: var(--text-secondary); line-height: 1.4;
}
