:root {
  --text-primary: #000;
  --text-secondary: #555;
  --text-tertiary: #888;
  --text-muted: #999;
  --bg-primary: #fefefe;
  --border-subtle: rgba(0, 0, 0, 0.08);
  --user-content-filter: none;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text-primary: rgba(255, 255, 255, 0.92);
    --text-secondary: rgba(255, 255, 255, 0.75);
    --text-tertiary: rgba(255, 255, 255, 0.55);
    --text-muted: rgba(255, 255, 255, 0.45);
    --bg-primary: #1b1a19;
    --border-subtle: rgba(255, 255, 255, 0.12);
    --user-content-filter: invert(93%) hue-rotate(180deg);
  }
}

* {
  box-sizing: border-box;
}

/* ========== TOUCH DEVICE FIXES ========== */

a,
button,
[role="button"],
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

a,
button,
[role="button"] {
  touch-action: manipulation;
}

*:focus-visible {
  outline-color: var(--accent-color, #5f8ec4);
  outline-offset: 2px;
}

body {
  margin: 0;
  padding: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell",
    "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

/* ========== SHIMMER / SKELETON LOADING STYLES ========== */

@keyframes shimmer {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

.skeleton {
  background: rgba(0, 0, 0, 0.05);
  animation: shimmer 2s ease-in-out infinite;
  border-radius: 4px;
}

@media (prefers-color-scheme: dark) {
  .skeleton {
    background: rgba(255, 255, 255, 0.05);
  }
}
