/* ============================================================
   Design tokens:Blood Iron theme
   ============================================================ */
:root {
  /* Backgrounds */
  --color-bg:         #0a0a0f;
  --color-surface:    #131320;
  --color-surface-2:  #1a1a2e;
  --color-surface-3:  #232340;

  /* Borders */
  --color-border:     #2a2a42;
  --color-border-2:   #3a3a58;

  /* Accent:Blood Crimson */
  --color-accent:     #c62828;
  --color-accent-2:   #ef5350;
  --color-accent-glow: rgba(198, 40, 40, 0.15);

  /* Gold:Antique */
  --color-gold:       #c9a23c;
  --color-gold-2:     #dbb85c;
  --color-gold-glow:  rgba(201, 162, 60, 0.12);

  /* Text:Bone */
  --color-text:       #d6cfc0;
  --color-text-muted: #8a8494;
  --color-text-dim:   #5a5468;

  /* Status */
  --color-danger:     #f44336;
  --color-warning:    #ff9800;
  --color-success:    #4caf50;
  --color-info:       #42a5f5;

  /* Type badge colours */
  --color-type-projectile: #f97316;
  --color-type-aoe:        #a855f7;
  --color-type-selfeffect: #22d3ee;
  --color-type-beam:       #eab308;
  --color-type-pillar:     #84cc16;

  /* Severity badge colours */
  --color-severity-minor:    #fbbf24;
  --color-severity-major:    #f97316;
  --color-severity-critical: #f44336;

  /* Fonts */
  --font-body:  'Outfit', sans-serif;
  --font-mono:  'JetBrains Mono', 'Fira Code', monospace;
  --font-title: 'Cinzel', serif;

  /* Spacing */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  32px;
  --space-xl:  64px;

  /* Radii:sharp for metal feel */
  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 6px;

  /* Transitions */
  --transition: 0.2s ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}

/* Film grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.7' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

/* ============================================================
   Typography
   ============================================================ */
a {
  color: var(--color-accent-2);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-gold);
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text);
  letter-spacing: 0.03em;
}

h1 { font-size: 2rem; letter-spacing: 0.05em; }
h2 { font-size: 1.5rem; letter-spacing: 0.04em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }

p { margin-bottom: var(--space-md); }

code, pre {
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

code {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  color: var(--color-gold-2);
}

ul, ol {
  padding-left: var(--space-lg);
  margin-bottom: var(--space-md);
}

/* ============================================================
   Tables:Iron Grid
   ============================================================ */
table {
  width: 100%;
  border-collapse: collapse;
}

th {
  background: linear-gradient(180deg, var(--color-surface-3), var(--color-surface-2));
  color: var(--color-gold);
  font-family: var(--font-title);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  border-bottom: 2px solid var(--color-accent);
}

td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid rgba(42, 42, 66, 0.6);
  vertical-align: top;
}

tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.015);
}

tr:last-child td {
  border-bottom: none;
}

tbody tr:hover td {
  background: var(--color-accent-glow);
}
