/* PhotonNodes design system — dark, restrained, neon accent */
:root {
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.4rem + 2.5vw, 3.25rem);

  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem;
  --space-12: 3rem; --space-16: 4rem; --space-20: 5rem; --space-24: 6rem;

  --bg: #0d0f12;
  --surface: #14171c;
  --surface-2: #1a1e24;
  --surface-3: #20252c;
  --border: #262b33;
  --border-strong: #333a44;
  --text: #e6e9ee;
  --muted: #9aa4b2;
  --faint: #5c6674;

  --accent: #3ddc97;
  --accent-strong: #2fb87e;
  --accent-dim: rgba(61, 220, 151, 0.12);
  --violet: #a78bfa;
  --blue: #60a5fa;
  --amber: #fbbf24;
  --red: #f87171;
  --green: #34d399;

  --radius-sm: 0.375rem; --radius-md: 0.5rem; --radius-lg: 0.75rem; --radius-xl: 1rem; --radius-full: 999px;

  --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.45);
  --transition: 160ms cubic-bezier(0.16, 1, 0.3, 1);

  --font-display: 'Cabinet Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'General Sans', 'Inter', system-ui, sans-serif;

  --content-default: 1080px;
  --content-narrow: 720px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: none; text-size-adjust: none;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  min-height: 100dvh;
  line-height: 1.6;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text);
  background: var(--bg);
}

img, picture, video, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4 { text-wrap: balance; line-height: 1.15; font-family: var(--font-display); font-weight: 700; }
p, li { text-wrap: pretty; max-width: 72ch; }

::selection { background: rgba(61, 220, 151, 0.25); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: var(--radius-sm); }

button { cursor: pointer; background: none; border: none; }
a { color: inherit; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

a, button, input, textarea, select {
  transition: color var(--transition), background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* shared components */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm); font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #08120c; }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger { background: rgba(248, 113, 113, 0.12); color: var(--red); border-color: rgba(248,113,113,0.3); }
.btn-danger:hover { background: rgba(248, 113, 113, 0.2); }
.btn-sm { padding: var(--space-1) var(--space-3); font-size: var(--text-xs); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.input, .select, .textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  color: var(--text);
}
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); }
.textarea { min-height: 120px; resize: vertical; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--text-xs); font-weight: 600;
  padding: 2px 8px; border-radius: var(--radius-full);
  background: var(--accent-dim); color: var(--accent);
  border: 1px solid rgba(61, 220, 151, 0.25);
}
.badge-violet { background: rgba(167,139,250,0.12); color: var(--violet); border-color: rgba(167,139,250,0.25); }
.badge-amber { background: rgba(251,191,36,0.1); color: var(--amber); border-color: rgba(251,191,36,0.25); }
.badge-red { background: rgba(248,113,113,0.1); color: var(--red); border-color: rgba(248,113,113,0.25); }
.badge-blue { background: rgba(96,165,250,0.1); color: var(--blue); border-color: rgba(96,165,250,0.25); }

.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full);
  font-weight: 700; color: #0b0e11;
  flex-shrink: 0;
  user-select: none;
}

.container { max-width: var(--content-default); margin: 0 auto; padding: 0 var(--space-6); }

.muted { color: var(--muted); }
.faint { color: var(--faint); }

.btn-lg { padding: var(--space-3) var(--space-6); font-size: var(--text-base); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: var(--radius-md);
  color: var(--muted); flex-shrink: 0;
}
.icon-btn:hover { color: var(--red); background: var(--surface-2); }
.badge-mint { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(61, 220, 151, 0.25); }
.toast {
  position: fixed; bottom: var(--space-6); left: 50%; transform: translateX(-50%);
  background: var(--surface-3); color: var(--text);
  border: 1px solid var(--border-strong); border-left: 3px solid var(--accent);
  padding: var(--space-3) var(--space-5); border-radius: var(--radius-md);
  font-size: var(--text-sm); z-index: 100; box-shadow: var(--shadow-xl);
  max-width: min(90vw, 480px);
}
