/*:root {
  --bg: #0f172a;
  --bg-alt: #111827;
  --card: #020617;
  --accent: #fbbf24;
  --accent-soft: rgba(251, 191, 36, 0.12);
  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --border-subtle: #1f2937;
  --error: #f97373;
  --success: #4ade80;
  --mono: "JetBrains Mono", Consolas, "Fira Code", Menlo, monospace;
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}*/

:root {
  --bg: #0d0b14;
  --bg-alt: #14121f;
  --card: #1b1730;
  --accent: #c084fc; 
  --accent-soft: rgba(192, 132, 252, 0.15);

  --text-main: #ede9fe;
  --text-muted: #a78bfa;
  --border-subtle: #27233d;

  --error: #f87171;
  --success: #4ade80;

  --mono: "JetBrains Mono", "Fira Code", Consolas, monospace;
  --sans: "Inter", system-ui, sans-serif;
}

/*:root {
  --bg: #0e1113;
  --bg-alt: #15191c;
  --card: #1b1f23;

  --accent: #34d399; // jade green 
  --accent-soft: rgba(52, 211, 153, 0.12);

  --text-main: #e5e7eb;
  --text-muted: #9ca3af;
  --border-subtle: #2a2f33;

  --error: #fb7185;
  --success: #10b981;

  --mono: "Cascadia Code", "Fira Code", monospace;
  --sans: "Roboto", system-ui, sans-serif;
}*/


/*:root {
  --bg: #0b0b0c;
  --bg-alt: #131314;
  --card: #1d1b1f;

  --accent: #f87171; // infernal red
  --accent-soft: rgba(248, 113, 113, 0.15);

  --text-main: #f3f4f6;
  --text-muted: #d1d5db;
  --border-subtle: #27272a;

  --error: #ef4444;
  --success: #fbbf24; // warm gold to contrast

  --mono: "Source Code Pro", Consolas, monospace;
  --sans: "Segoe UI", system-ui, sans-serif;
}*/


/*root {
  --bg: #0b1520;
  --bg-alt: #102030;
  --card: #132a3b;

  --accent: #7dd3fc; // frost blue
  --accent-soft: rgba(125, 211, 252, 0.15);

  --text-main: #e0f2fe;
  --text-muted: #94a3b8;
  --border-subtle: #1e293b;

  --error: #fb7185;
  --success: #4ade80;

  --mono: "JetBrains Mono", "Fira Code", monospace;
  --sans: "Inter", "Segoe UI", system-ui, sans-serif;
}*/


/*:root {
  --bg: #1a0f0a;            
  --bg-alt: #24130d;       
  --card: #2e1a12;          

  --accent: #f9a44c;        
  --accent-soft: rgba(249, 164, 76, 0.15);

  --text-main: #fdf4e7;    
  --text-muted: #d7bfa8;   

  --border-subtle: #3c2117; 

  --error: #ef6464;        
  --success: #7ed957;      

  --mono: "JetBrains Mono", "Fira Code", Consolas, monospace;
  --sans: "Inter", "Segoe UI", system-ui, sans-serif;
}*/








* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 1.5rem;
  font-family: var(--sans);
  background: radial-gradient(circle at top left, #1f2937, #020617 50%);
  color: var(--text-main);
}

.app-shell {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 1.5rem;
  align-items: flex-start;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 1.8rem;
  letter-spacing: 0.04em;
}

.tagline {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.panel {
  background: linear-gradient(145deg, var(--bg-alt), var(--card));
  border-radius: 1rem;
  border: 1px solid var(--border-subtle);
  padding: 1.2rem 1.3rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: baseline;
  margin-bottom: 0.8rem;
}

.panel-title {
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.field-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.code-input {
  width: 100%;
  font-family: var(--mono);
  font-size: 0.9rem;
  background: #020617;
  color: var(--text-main);
  border-radius: 0.6rem;
  border: 1px solid var(--border-subtle);
  padding: 0.7rem 0.75rem;
  min-height: 4.5rem;
  resize: vertical;
  outline: none;
  line-height: 1.4;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.5);
}

.code-input:focus {
  border-color: var(--accent);
  box-shadow:
    0 0 0 1px var(--accent-soft),
    0 0 0 2px rgba(251, 191, 36, 0.12);
}

.examples {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--mono);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.pill {
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.status-row {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.6rem;
  font-size: 0.8rem;
}

.status {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.status-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
}

.status-dot.ok {
  background: var(--success);
}

.status-dot.error {
  background: var(--error);
}

.status-text {
  color: var(--text-muted);
}

.status-text strong {
  color: var(--text-main);
  font-weight: 500;
}

.unknown-tokens {
  color: var(--error);
}

.stat-table {
  margin-top: 0.8rem;
  border-collapse: collapse;
  width: 100%;
  font-size: 0.85rem;
  border-radius: 0.6rem;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.stat-table th,
.stat-table td {
  padding: 0.4rem 0.6rem;
  text-align: left;
}

.stat-table th {
  background: #020617;
  font-weight: 400;
  color: var(--text-muted);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.stat-table tr:nth-child(even) td {
  background: rgba(15, 23, 42, 0.75);
}

.stat-table tr:nth-child(odd) td {
  background: rgba(15, 23, 42, 0.4);
}

.stat-code {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--accent);
}

.stat-label {
  font-size: 0.82rem;
}

.stat-value {
  font-family: var(--mono);
  text-align: right;
}

.actions {
  margin-top: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.btn {
  border-radius: 999px;
  border: 1px solid var(--accent);
  padding: 0.45rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 500;
  background: linear-gradient(135deg, var(--accent-soft), transparent);
  color: var(--accent);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition:
    background 0.15s ease-out,
    transform 0.05s ease-out,
    box-shadow 0.15s ease-out;
}

.btn:hover {
  background: rgba(251, 191, 36, 0.18);
  box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.3);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-secondary {
  border-color: var(--border-subtle);
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.7);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* STAT CARD PREVIEW */

.preview-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.preview-title {
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat-card {
  position: relative;
  border-radius: 1rem;
  padding: 1.2rem 1.2rem 1rem;
  background:
    radial-gradient(circle at top, rgba(251, 191, 36, 0.12), transparent 55%),
    radial-gradient(circle at bottom, rgba(15, 23, 42, 0.9), #020617);
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(15, 23, 42, 0.9);
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 0.95rem;
  border: 1px solid rgba(15, 23, 42, 0.9);
  pointer-events: none;
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
  margin-bottom: 0.4rem;
}

.card-name {
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}

.card-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: right;
}

.card-meta-secondary {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.divider {
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    rgba(148, 163, 184, 0.7),
    transparent
  );
  margin: 0.4rem 0 0.6rem;
}

.section-heading {
  margin-top: 1.4rem;      /* more breathing room above */
  margin-bottom: 0.35rem;  /* slight gap before the content */
  font-size: 1rem;         /* bigger heading */
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-block {
  margin-top: 0.35rem;
  font-size: 0.82rem;
}

.section-heading + .section-block {
  border-top: 1px solid #ddd;   /* TEMP: replace #ddd to match your existing divider style */
  padding-top: 0.5rem;
}



.entry-row {
  margin-bottom: 0.8rem;
  line-height: 1.4;
}

/* The bold "Bite.", "Multiattack.", etc. */
.entry-name {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  margin-right: 0.25rem;
}

/* The descriptive text */
.entry-text {
  font-weight: 400;
}


.basic-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
  font-size: 0.82rem;
  margin-bottom: .1rem;
}

.basic-item span.label {
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  margin-right: 0.25rem;
}

.basic-item span.value {
  /* font-family: var(--mono); */
}

.ability-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.3rem;
  font-size: 0.8rem;
  margin-bottom: 0.6rem;
}

.ability {
  background: rgba(15, 23, 42, 0.8);
  border-radius: 0.5rem;
  padding: 0.3rem 0.25rem;
  text-align: center;
  border: 1px solid rgba(15, 23, 42, 0.9);
}

.ability-label {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.66rem;
  color: var(--text-muted);
  margin-bottom: 0.12rem;
}

.ability-score {
  font-family: var(--mono);
  font-size: 0.92rem;
}

.ability-mod {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--accent);
}

.footer-note {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  text-align: right;
  opacity: 0.9;
}

.dim {
  opacity: 0.5;
}
