/* ═══════════════════════════════════════════════
   CATAN ARGENTINA — Estilos Globales
   css/style.css
   ═══════════════════════════════════════════════ */

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

:root {
  /* Paleta Argentina */
  --arg-sky:     #75AADB;   /* celeste */
  --arg-white:   #FFFFFF;
  --arg-earth:   #8B5E3C;   /* tierra/marrón andino */
  --arg-green:   #2E7D32;   /* verde pampa */
  --arg-sand:    #D4A84B;   /* arena/dorado */
  --arg-dark:    #1a1008;
  --arg-navy:    #0d1f3c;

  /* UI */
  --gold:        #c9a227;
  --gold2:       #e8c84a;
  --parch:       #f5e6c8;
  --ink:         #2c1810;

  /* Fuentes */
  --ft: 'Cinzel', serif;
  --fb: 'Crimson Text', serif;

  /* Sombras */
  --shadow-gold: 0 0 30px rgba(201,162,39,.25);
  --shadow-card: 0 8px 32px rgba(0,0,0,.4);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--fb);
  background: var(--arg-dark);
  color: var(--parch);
  min-height: 100vh;
}

/* ── TIPOGRAFÍA ── */
h1, h2, h3, h4 { font-family: var(--ft); }

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold2); }

/* ── BOTONES GLOBALES ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 10px; border: none; cursor: pointer;
  font-family: var(--ft); font-size: .82rem; font-weight: 600; letter-spacing: 1.5px;
  transition: all .22s; text-decoration: none; white-space: nowrap;
}
.btn-gold {
  background: linear-gradient(135deg, #c9a227, #8b6914);
  color: var(--ink);
  box-shadow: 0 4px 18px rgba(201,162,39,.3);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 6px 26px rgba(201,162,39,.5); color: var(--ink); }

.btn-sky {
  background: linear-gradient(135deg, #75AADB, #1a4f8a);
  color: #fff;
  box-shadow: 0 4px 18px rgba(117,170,219,.3);
}
.btn-sky:hover { transform: translateY(-2px); box-shadow: 0 6px 26px rgba(117,170,219,.5); color: #fff; }

.btn-outline {
  background: transparent;
  border: 1.5px solid rgba(201,162,39,.45);
  color: var(--gold2);
}
.btn-outline:hover { background: rgba(201,162,39,.12); border-color: var(--gold2); }

.btn-ghost {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.18);
  color: var(--parch);
}
.btn-ghost:hover { background: rgba(255,255,255,.14); }

.btn-sm { padding: 8px 16px; font-size: .72rem; }
.btn-lg { padding: 16px 36px; font-size: .95rem; }

/* ── CARDS ── */
.card {
  background: linear-gradient(145deg, #2a1a08, #1a0f04);
  border: 1.5px solid rgba(201,162,39,.22);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-card);
}

/* ── INPUTS ── */
.input {
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(201,162,39,.28);
  border-radius: 8px;
  padding: 10px 14px;
  color: var(--parch);
  font-family: var(--fb);
  font-size: 1rem;
  outline: none;
  width: 100%;
  transition: border-color .2s;
}
.input:focus { border-color: var(--gold); }
.input::placeholder { color: rgba(245,230,200,.35); }

/* ── OVERLAYS ── */
.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.82);
  z-index: 500;
  display: none;
  align-items: center; justify-content: center;
  backdrop-filter: blur(6px);
  padding: 20px;
}
.overlay.open { display: flex; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(201,162,39,.35); border-radius: 3px; }

/* ── UTILITY ── */
.text-gold  { color: var(--gold2); }
.text-sky   { color: var(--arg-sky); }
.text-muted { color: rgba(245,230,200,.5); }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-2 { gap: 16px; }
.w-full { width: 100%; }

/* ── AVATAR ── */
.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  flex-shrink: 0;
}
.avatar-lg { width: 64px; height: 64px; }

/* ── BADGE ── */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 3px 10px; border-radius: 20px;
  font-family: var(--ft); font-size: .62rem; letter-spacing: 1px;
  background: rgba(201,162,39,.18); color: var(--gold2);
  border: 1px solid rgba(201,162,39,.3);
}

/* ── TOAST NOTIFICATIONS ── */
#toast-container {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 999;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast {
  padding: 12px 20px; border-radius: 10px;
  background: linear-gradient(135deg, #2a1a08, #1a0f04);
  border: 1px solid var(--gold);
  font-size: .85rem; color: var(--parch);
  box-shadow: var(--shadow-card);
  animation: toastIn .3s ease, toastOut .3s ease 2.7s forwards;
  pointer-events: all;
}
@keyframes toastIn  { from { opacity:0; transform: translateY(20px); } to { opacity:1; transform: translateY(0); } }
@keyframes toastOut { from { opacity:1; } to { opacity:0; transform: translateY(10px); } }

/* ── LOADING SPINNER ── */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(201,162,39,.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── QR CODE ── */
#qr-container canvas { border-radius: 12px; }

/* ── ROOM CODE ── */
.room-code {
  font-family: var(--ft);
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: 8px;
  color: var(--gold2);
  text-shadow: 0 0 20px rgba(201,162,39,.4);
  background: rgba(0,0,0,.3);
  border: 2px solid var(--gold);
  border-radius: 12px;
  padding: 12px 24px;
  text-align: center;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .btn-lg { padding: 13px 24px; font-size: .85rem; }
  .room-code { font-size: 1.6rem; letter-spacing: 5px; }
}
