@import "tailwindcss";
@source "../../../../node_modules/streamdown/dist";
@source "../../../../node_modules/@streamdown/code/dist";

@custom-variant dark (&:is(.dark *));

@theme inline {
  /* ── Base ── */
  --color-background: #1A1A1A;
  --color-foreground: #EBEBEB;

  /* ── Surfaces ── */
  --color-card: #222222;
  --color-card-foreground: #EBEBEB;
  --color-popover: #252525;
  --color-popover-foreground: #EBEBEB;
  --color-muted: #272727;
  --color-muted-foreground: #999999;
  --color-secondary: #2A2A2A;
  --color-secondary-foreground: #EBEBEB;
  --color-accent: #2A2A2A;
  --color-accent-foreground: #EBEBEB;

  /* ── Primary ── */
  --color-primary: #0069FE;
  --color-primary-foreground: #ffffff;

  /* ── Danger ── */
  --color-destructive: #F04D68;
  --color-destructive-foreground: #ffffff;

  /* ── Borders & inputs ── */
  --color-border: #333333;
  --color-input: #333333;
  --color-ring: #0069FE;

  /* ── Charts ── */
  --color-chart-1: #0069FE;
  --color-chart-2: #F04D68;
  --color-chart-3: #F59E0B;
  --color-chart-4: #8B5CF6;
  --color-chart-5: #10B981;

  /* ── Code blocks (Streamdown uses bg-sidebar / bg-background) ── */
  --color-sidebar: #222222;
  --color-sidebar-foreground: #EBEBEB;
  --color-sidebar-primary: #0069FE;
  --color-sidebar-primary-foreground: #ffffff;
  --color-sidebar-accent: #2A2A2A;
  --color-sidebar-accent-foreground: #EBEBEB;
  --color-sidebar-border: #333333;
  --color-sidebar-ring: #0069FE;

  --radius: 0.75rem;
}

html {
  touch-action: manipulation;
  -ms-touch-action: manipulation;
}

body {
  background-color: var(--color-background);
  color: var(--color-foreground);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior: none;
}

::selection {
  background-color: rgba(0, 105, 254, 0.25);
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #333333; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #444444; }

.text-gradient {
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  background-image: linear-gradient(135deg, #0166FF, #009AFE, #4AEEFF);
}

.bg-gradient-brand {
  background-image: linear-gradient(135deg, #0166FF, #009AFE, #4AEEFF);
}

.glow-border {
  box-shadow: 0 0 0 1px rgba(0, 105, 254, 0.1),
              0 0 20px -5px rgba(0, 105, 254, 0.15);
}

.animated-border {
  position: relative;
  overflow: hidden;
}
.animated-border::before {
  content: '';
  position: absolute;
  inset: -150%;
  background: conic-gradient(
    from 0deg,
    #0166FF,
    #009AFE,
    #4AEEFF,
    #0166FF
  );
  animation: border-spin 3s linear infinite;
}
.animated-border > * {
  position: relative;
  z-index: 1;
}

.animated-border-slow::before {
  animation-duration: 5s;
}

.input-glow:focus {
  border-color: rgba(0, 105, 254, 0.4);
  box-shadow: 0 0 0 1px rgba(0, 105, 254, 0.15),
              0 0 20px -5px rgba(0, 105, 254, 0.25),
              0 0 4px -1px rgba(74, 238, 255, 0.1);
}

@keyframes border-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes mic-pulse-scale {
  0%, 100% { transform: scale(1.1) translateY(-6px); }
  50% { transform: scale(1.15) translateY(-8px); }
}
