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

:root {
  --bg-0: #0c0a08;
  --bg-1: #161210;
  --bg-2: #1e1814;
  --bg-3: #28211a;
  --bg-4: #332a22;

  --color-red:    #c0392b;
  --color-blue:   #2980b9;
  --color-green:  #27ae60;
  --color-yellow: #d4ac0d;
  --color-black:  #636363;

  --tile-city:    #c8a876;
  --tile-road:    #8b7355;
  --tile-field:   #4a7c59;
  --tile-bg:      #e8dcc8;
  --tile-border:  #a08060;

  --accent:     #c8860a;
  --accent-h:   #e09a18;
  --accent-dim: rgba(200,134,10,.15);
  --accent-glow: 0 0 20px rgba(200,134,10,.35);

  --text-1: #f0ead8;
  --text-2: #9b8870;
  --text-3: #5a4a38;

  --border:   rgba(255,255,255,.06);
  --border-h: rgba(255,255,255,.12);

  --green: #27ae60;
  --red:   #e74c3c;

  --r-sm: 6px; --r-md: 12px; --r-lg: 18px; --r-xl: 24px;

  --font-d: 'Cinzel', 'Playfair Display', serif;
  --font-b: 'Crimson Pro', 'Georgia', serif;
}

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

html { height: 100%; }

body {
  background: var(--bg-0);
  color: var(--text-1);
  font-family: var(--font-b);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 20% 20%, rgba(200,134,10,.04) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(41,128,185,.03) 0%, transparent 60%);
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-1); }
::-webkit-scrollbar-thumb { background: var(--bg-4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* Reset */
button {
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all .15s ease;
}
input, select, textarea {
  font-family: inherit;
  background: var(--bg-3);
  border: 1px solid var(--border-h);
  color: var(--text-1);
  border-radius: var(--r-sm);
  padding: .5rem .75rem;
  outline: none;
  transition: border-color .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-h); }

/* Cards */
.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.5rem;
}
.card-sm { padding: 1rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .6rem 1.4rem;
  border-radius: var(--r-md);
  font-size: .95rem;
  font-weight: 600;
  background: var(--bg-3);
  color: var(--text-1);
  border: 1px solid var(--border-h);
}
.btn:hover {
  background: var(--bg-4);
  border-color: var(--accent);
}
.btn-primary {
  background: var(--accent);
  color: #0c0a08;
  border-color: var(--accent-h);
  font-family: var(--font-d);
  letter-spacing: .05em;
}
.btn-primary:hover {
  background: var(--accent-h);
  box-shadow: var(--accent-glow);
}
.btn-danger { background: var(--red); color: #fff; border-color: #c0392b; }
.btn-danger:hover { background: #c0392b; }
.btn-sm { padding: .35rem .8rem; font-size: .85rem; }
.btn:disabled { opacity: .4; cursor: not-allowed; }

/* Player color chips */
.color-chip {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}
.color-red    { background: var(--color-red); }
.color-blue   { background: var(--color-blue); }
.color-green  { background: var(--color-green); }
.color-yellow { background: var(--color-yellow); }
.color-black  { background: var(--color-black); }

/* Utility */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: .25rem; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }
.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; }
.w-full { width: 100%; }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .75rem; }
.text-center { text-align: center; }
.text-muted { color: var(--text-2); }
.font-display { font-family: var(--font-d); }
.font-bold { font-weight: 700; }
.rounded { border-radius: var(--r-md); }

/* Titles */
h1, h2, h3 { font-family: var(--font-d); letter-spacing: .04em; color: var(--text-1); }

/* Toast / Notification */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  pointer-events: none;
}
.toast {
  background: var(--bg-3);
  border: 1px solid var(--border-h);
  border-radius: var(--r-md);
  padding: .7rem 1.2rem;
  color: var(--text-1);
  font-size: .9rem;
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
  animation: slideIn .2s ease;
  pointer-events: all;
}
.toast.error { border-color: var(--red); }
.toast.success { border-color: var(--green); }
@keyframes slideIn {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

/* Spinner */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--bg-4);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Divider */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1rem 0;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .15rem .5rem;
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 600;
  font-family: var(--font-d);
}

/* Follower icon (SVG-like in CSS) */
.follower-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: currentColor;
  font-size: 10px;
  color: rgba(255,255,255,.9);
}

/* Tabs */
.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); }
.tab-btn {
  background: none;
  color: var(--text-2);
  padding: .5rem 1rem;
  border-bottom: 2px solid transparent;
  font-family: var(--font-b);
  font-size: .9rem;
  border-radius: 0;
}
.tab-btn:hover { color: var(--text-1); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
