@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;800;900&family=Crimson+Text:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* ── FF9-inspired Fantasy Theme ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg:         #0a0f1e;
  --bg-warm:    #0e1528;
  --surface:    #142038;
  --surface2:   #1a2a48;
  --surface3:   #213458;
  --border:     #8b7340;
  --border-dim: #4a3d28;
  --border-bright: #c4a44a;
  --primary:    #d4a847;
  --primary-glow: rgba(212,168,71,0.25);
  --accent:     #c0392b;
  --success:    #4a9a5a;
  --warning:    #d4943a;
  --danger:     #c0392b;
  --text:       #f0e6d0;
  --text-dim:   #9a8b6e;
  --text-bright:#fff5e0;
  --font-heading: 'Cinzel', 'Palatino Linotype', 'Georgia', serif;
  --font-body:   'Crimson Text', 'Palatino Linotype', 'Georgia', serif;
  --radius:     4px;
  --shadow:     0 4px 20px rgba(0,0,0,0.6);
  --panel-shadow: 0 2px 12px rgba(0,0,0,0.5), inset 0 1px 0 rgba(196,164,74,0.15);
  --gold-glow:  0 0 12px rgba(212,168,71,0.3);
}
html, body, #root {
  width: 100%; height: 100%; overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  -webkit-tap-highlight-color: transparent;
}
/* ── Fantasy Panel Mixin (via class) ──────────────────────────────────────── */
.fantasy-panel {
  background: linear-gradient(180deg, var(--surface2) 0%, var(--surface) 100%);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--panel-shadow);
  position: relative;
}
.fantasy-panel::before {
  content: '';
  position: absolute;
  inset: 2px;
  border: 1px solid var(--border-dim);
  border-radius: 2px;
  pointer-events: none;
}
/* ── Buttons ──────────────────────────────────────────────────────────────── */
button {
  font-family: var(--font-heading);
  cursor: pointer;
  border: none;
  outline: none;
  border-radius: var(--radius);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: opacity 0.15s, transform 0.1s, box-shadow 0.15s;
}
button:active { transform: scale(0.97); }
button:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(180deg, #d4a847 0%, #a68330 100%);
  color: #1a0e00;
  border: 1px solid #c4a44a;
  text-shadow: 0 1px 0 rgba(255,255,255,0.2);
  box-shadow: 0 2px 8px rgba(212,168,71,0.3);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: var(--gold-glow);
}
.btn-danger {
  background: linear-gradient(180deg, #c0392b 0%, #8b2020 100%);
  color: #fff;
  border: 1px solid #d44;
}
.btn-ghost {
  background: var(--surface2);
  color: var(--text);
  border: 1px solid var(--border-dim);
}
.btn-ghost:hover:not(:disabled) {
  border-color: var(--border);
}
.btn-sm {
  padding: 5px 10px;
  font-size: 11px;
}
/* ── Inputs ───────────────────────────────────────────────────────────────── */
input, select, textarea {
  background: var(--bg);
  border: 1px solid var(--border-dim);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 10px 14px;
  outline: none;
  width: 100%;
  transition: border-color 0.15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--border-bright);
  box-shadow: 0 0 6px rgba(196,164,74,0.2);
}
input::placeholder { color: var(--text-dim); }
/* ── Scrollbar ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--border) 0%, var(--border-dim) 100%);
  border-radius: 4px;
  border: 1px solid var(--border-dim);
}
/* ── Utility ─────────────────────────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.text-dim { color: var(--text-dim); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.bold { font-weight: 700; }
/* ── Keyframes ────────────────────────────────────────────────────────────── */
@keyframes pulse {
  0%   { opacity: 0.4; }
  50%  { opacity: 1; }
  100% { opacity: 0.4; }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
