/* highlight.js theme must be imported before any @layer rules (PostCSS requirement) */
@import 'highlight.js/styles/github.css';

@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  :root {
    /* Blue-accented light palette. Primary is GitHub-style indigo-blue so
       action buttons are clearly coloured, not a flat dark grey. */
    --background: 0 0% 100%;
    --foreground: 222 20% 18%;
    --card: 0 0% 100%;
    --card-foreground: 222 20% 18%;
    --popover: 0 0% 100%;
    --popover-foreground: 222 20% 18%;
    --primary: 212 88% 44%;
    --primary-foreground: 0 0% 100%;
    --secondary: 214 32% 95%;
    --secondary-foreground: 222 20% 18%;
    --muted: 214 32% 96%;
    --muted-foreground: 220 9% 46%;
    --accent: 214 88% 95%;
    --accent-foreground: 212 88% 35%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 98%;
    --border: 214 32% 88%;
    --input: 214 32% 88%;
    --ring: 212 88% 44%;
    --radius: 0.5rem;
  }

  .dark {
    /* Dimmed dark — comfortable grey with blue-tinted accents. */
    --background: 220 13% 13%;
    --foreground: 220 12% 84%;
    --card: 220 13% 16%;
    --card-foreground: 220 12% 84%;
    --popover: 220 13% 16%;
    --popover-foreground: 220 12% 84%;
    --primary: 213 88% 62%;
    --primary-foreground: 220 20% 10%;
    --secondary: 220 12% 22%;
    --secondary-foreground: 220 12% 84%;
    --muted: 220 12% 22%;
    --muted-foreground: 220 8% 55%;
    --accent: 220 20% 26%;
    --accent-foreground: 213 88% 72%;
    --destructive: 0 65% 50%;
    --destructive-foreground: 0 0% 98%;
    --border: 220 12% 28%;
    --input: 220 12% 28%;
    --ring: 213 88% 62%;
  }
}

@layer base {
  * {
    @apply border-border;
  }
  body {
    @apply bg-background text-foreground;
  }
}

/* ── Dark-mode overrides for highlight.js (imported above) ──────────────── */
.dark .hljs {
  background: hsl(220, 13%, 16%);
  color: hsl(220, 10%, 85%);
}
.dark .hljs-keyword,
.dark .hljs-selector-tag,
.dark .hljs-built_in { color: #ff7b72; }
.dark .hljs-string,
.dark .hljs-attr { color: #a5d6ff; }
.dark .hljs-comment { color: hsl(220, 8%, 50%); }
.dark .hljs-number,
.dark .hljs-literal { color: #79c0ff; }
.dark .hljs-title,
.dark .hljs-name { color: #d2a8ff; }
.dark .hljs-type { color: #ffa657; }
