@import "tailwindcss";

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

/* Disable tap highlight and overscroll for smoother gestures */
:root, body {
  -webkit-tap-highlight-color: transparent;
}

html, body {
  overscroll-behavior: none;
  touch-action: manipulation;
}

/* Root theme variables (merged from index.css) */
:root {
  font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;
  color-scheme: light dark;
  --bg: #0a0a0a;
  --text: #e5e5e5;
  --plot-bg: rgba(10,10,10,0.9);
  --plot-grid: rgba(255,255,255,0.06);
  --panel-bg: #0f0f0f;
  --panel-border: rgba(255,255,255,0.12);
  --control-bg: #141414;
  --control-border: rgba(255,255,255,0.2);
  --card-bg: rgba(255,255,255,0.04);
  --card-border: rgba(255,255,255,0.12);
  --hist-bar: rgba(255,255,255,0.2);
  --accent-bg: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-fg: #ffffff;
  --danger-bg: #dc2626;
  --danger-hover: #b91c1c;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root.light {
  --bg: #ffffff;
  --text: #0a0a0a;
  --plot-bg: #ffffff;
  --plot-grid: rgba(0,0,0,0.08);
  --panel-bg: #f7f7f7;
  --panel-border: rgba(0,0,0,0.12);
  --control-bg: #ffffff;
  --control-border: rgba(0,0,0,0.14);
  --card-bg: #f0f2f5;
  --card-border: rgba(0,0,0,0.12);
  --hist-bar: #c5cdd8;
  --accent-bg: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-fg: #ffffff;
  --danger-bg: #dc2626;
  --danger-hover: #b91c1c;
}

:root.dark {
  --bg: #0a0a0a;
  --text: #e5e5e5;
  --plot-bg: rgba(10,10,10,0.9);
  --plot-grid: rgba(255,255,255,0.06);
}

a {
  font-weight: 500;
  color: #646cff;
  text-decoration: inherit;
}
a:hover { color: #535bf2; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

/* Inputs/selects theme (buttons use component variants) */
input, select, .bg-neutral-900, .bg-neutral-800, .bg-neutral-700 {
  background-color: var(--control-bg);
  color: var(--text);
  border-color: var(--control-border);
}

.logo {
  height: 6em;
  padding: 1.5em;
  will-change: filter;
  transition: filter 300ms;
}
.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.react:hover {
  filter: drop-shadow(0 0 2em #61dafbaa);
}

@keyframes logo-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: no-preference) {
  a:nth-of-type(2) .logo {
    animation: logo-spin infinite 20s linear;
  }
}

/* legacy template styles removed */
