/* Karakal — base */
:root {
  --bg-0: #05070d;
  --bg-1: #0a0e1e;
  --bg-2: #121734;
  --ink-0: #f5f0e0;
  --ink-1: #d0c9b5;
  --ink-2: #8a8570;
  --gold: #f0a92c;
  --gold-hot: #ffcc55;
  --amber: #ff8a1a;
  --plasma: #ff5722;
  --violet: #6b3fa0;
  --cyan: #4dd0e1;
  --danger: #ff4757;
  --success: #26de81;
  --radius: 12px;
  --shadow-gold: 0 0 22px rgba(240,169,44,0.35);
  --font-display: 'Cinzel', 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; min-height: 100vh; width: 100%;
  background: var(--bg-0); color: var(--ink-0);
  font-family: var(--font-sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-hot); text-shadow: 0 0 10px rgba(255,204,85,0.6); }

button {
  font-family: inherit; cursor: pointer; border: none;
  background: transparent; color: inherit;
}
input, select {
  font-family: inherit; color: var(--ink-0);
  background: rgba(10,14,30,0.65);
  border: 1px solid rgba(240,169,44,0.25);
  border-radius: 8px; padding: 12px 14px; font-size: 14px;
  outline: none; transition: border-color .18s, box-shadow .18s;
  width: 100%;
}
input:focus, select:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(240,169,44,0.15);
}
label { display:block; font-size:12px; color: var(--ink-2); margin-bottom:6px; text-transform:uppercase; letter-spacing:1px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px;
  font-weight: 600; font-size: 14px; letter-spacing: .5px;
  text-transform: uppercase; transition: all .18s ease;
  border: 1px solid transparent;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, var(--amber) 100%);
  color: #1a1200; box-shadow: var(--shadow-gold);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 0 32px rgba(255,204,85,0.55); }
.btn-ghost {
  background: rgba(240,169,44,0.06); color: var(--gold);
  border: 1px solid rgba(240,169,44,0.35);
}
.btn-ghost:hover { background: rgba(240,169,44,0.14); border-color: var(--gold); }
.btn-danger {
  background: rgba(255,71,87,0.12); color: #ff8a97; border: 1px solid rgba(255,71,87,0.4);
}
.btn-success {
  background: linear-gradient(135deg, #26de81 0%, #16a05e 100%);
  color: #052916;
}
.btn:disabled { opacity: .45; cursor: not-allowed; }

.brand {
  font-family: var(--font-display);
  font-weight: 700; letter-spacing: 6px;
  background: linear-gradient(180deg, var(--gold-hot) 0%, var(--amber) 60%, var(--plasma) 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px rgba(240,169,44,0.25);
}

.canvas-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
}

.card {
  background: rgba(10,14,30,0.55);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(240,169,44,0.15);
  border-radius: var(--radius);
  padding: 24px;
}

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
  background: rgba(240,169,44,0.1); color: var(--gold);
  border: 1px solid rgba(240,169,44,0.3);
}

.hidden { display: none !important; }

/* scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.3); }
::-webkit-scrollbar-thumb { background: rgba(240,169,44,0.3); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: rgba(240,169,44,0.55); }

@keyframes pulse-gold {
  0%,100% { box-shadow: 0 0 15px rgba(240,169,44,0.4); }
  50%     { box-shadow: 0 0 30px rgba(240,169,44,0.7); }
}
@keyframes fadeIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
.fade-in { animation: fadeIn .5s ease both; }

/* toast */
#toast-root { position: fixed; top: 24px; right: 24px; z-index: 9999; display:flex; flex-direction:column; gap:10px; }
.toast {
  background: rgba(10,14,30,0.95); border:1px solid rgba(240,169,44,0.4);
  padding: 12px 18px; border-radius: 10px; color: var(--ink-0);
  min-width: 240px; box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  animation: fadeIn .3s both;
}
.toast.err { border-color: rgba(255,71,87,0.5); }
.toast.ok  { border-color: rgba(38,222,129,0.5); }


/* Planet hover tooltip */
.planet-tooltip {
  position: fixed;
  display: none;
  z-index: 5000;
  pointer-events: none;
  background: rgba(4,6,16,0.95);
  border: 1px solid rgba(240,169,44,0.5);
  border-radius: 10px;
  padding: 12px 16px;
  max-width: 300px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.7), 0 0 30px rgba(240,169,44,0.2);
  animation: fadeIn 0.15s ease both;
}
.planet-tooltip .pt-name {
  font-family: var(--font-display);
  font-size: 15px; letter-spacing: 3px;
  color: var(--gold-hot);
  text-transform: uppercase;
  margin-bottom: 6px;
}
.planet-tooltip .pt-desc {
  font-size: 12px;
  color: var(--ink-1);
  line-height: 1.5;
}

/* Checkbox */
.checkbox-row {
  display: flex; align-items: center; gap: 10px;
  margin-top: -6px; margin-bottom: 12px;
  font-size: 12px; color: var(--ink-2);
  cursor: pointer;
  letter-spacing: 1px;
}
.checkbox-row input[type=checkbox] {
  width: 16px; height: 16px;
  accent-color: var(--gold);
  cursor: pointer;
  margin: 0;
}
