/* ================================================================
   Cruzada do Zodíaco — Design System Global
   Tema: Anime/Saint Seiya — Dark Gold & Cosmic Blue
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── CSS Variables ── */
:root {
  /* Colors */
  --gold-100: #fff8dc;
  --gold-300: #fdd868;
  --gold-400: #f5c842;
  --gold-500: #e6a817;
  --gold-600: #c8870a;
  --gold-700: #a06508;

  --cosmic-100: #e8f0ff;
  --cosmic-300: #93b4ff;
  --cosmic-400: #6690f5;
  --cosmic-500: #3d6be8;
  --cosmic-600: #2451c7;
  --cosmic-700: #1a3a9a;

  --life-color: #e84040;
  --life-light: #ff6b6b;
  --cosmo-color: #3d6be8;

  --bg-darkest: #071026; /* Cosmic Dark Blue */
  --bg-dark: #09142e;
  --bg-mid: #101728;
  --bg-card: #141c30;
  --bg-card-hover: #1a2440;
  --bg-glass: rgba(20, 28, 48, 0.85);

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-gold: rgba(230, 168, 23, 0.4);
  --border-cosmic: rgba(61, 107, 232, 0.4);

  --text-primary: #f0f4ff;
  --text-secondary: #8896b0;
  --text-muted: #4a5568;
  --text-gold: #f5c842;
  --text-cosmic: #93b4ff;

  /* Typography */
  --font-display: 'Cinzel', serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  /* Shadows */
  --shadow-gold: 0 0 20px rgba(230, 168, 23, 0.3);
  --shadow-cosmic: 0 0 20px rgba(61, 107, 232, 0.4);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-deep: 0 8px 48px rgba(0, 0, 0, 0.6);

  /* Transitions */
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-darkest);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Cosmic background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(61, 107, 232, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(230, 168, 23, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse 40% 30% at 50% 50%, rgba(61, 107, 232, 0.04) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

/* Stars */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 25% 40%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 45% 10%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 65% 25%, rgba(255,255,255,0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 80% 55%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 10%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 35% 70%, rgba(255,255,255,0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 80%, rgba(255,255,255,0.3) 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

#app { position: relative; z-index: 1; }

/* ── Typography ── */
h1, h2, h3 { font-family: var(--font-display); }
h1 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; }
h2 { font-size: clamp(1.2rem, 2.5vw, 1.8rem); font-weight: 600; }
h3 { font-size: 1.1rem; font-weight: 600; }

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

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.page { padding: 2rem 0; min-height: calc(100vh - 70px); }

/* ── Navbar ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 16, 38, 0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(230, 168, 23, 0.2);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.6), 0 0 40px rgba(230, 168, 23, 0.04);
  height: 62px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.navbar-inner {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0 1rem;
  gap: 0.5rem;
  overflow: hidden;
}

/* Brand */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
  text-decoration: none;
  overflow: visible;
}
.nav-brand-icon {
  font-size: 1.4rem;
  filter: drop-shadow(0 0 6px rgba(230,168,23,0.6));
}
.nav-brand-text {
  font-family: var(--font-display);
  font-size: clamp(0.5rem, 1.1vw, 0.78rem);
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500), var(--cosmic-300));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.nav-scroll-wrapper {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  padding: 0 0.25rem 0.2rem 0.25rem;
  display: flex;
  justify-content: flex-start;
}

.nav-scroll-wrapper::-webkit-scrollbar {
  height: 4px;
}
.nav-scroll-wrapper::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  margin: 0 10px;
}
.nav-scroll-wrapper::-webkit-scrollbar-thumb {
  background: rgba(230, 168, 23, 0.4);
  border-radius: 4px;
}
.nav-scroll-wrapper::-webkit-scrollbar-thumb:hover {
  background: rgba(230, 168, 23, 0.8);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  white-space: nowrap;
}

.nav-links a {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  font-size: 0.77rem;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  transition: all 0.2s ease;
  text-decoration: none;
  position: relative;
  white-space: nowrap;
}
.nav-links a .nav-icon { font-size: 0.85rem; }
.nav-links a .nav-label { font-size: 0.77rem; }

.nav-links a:hover {
  color: var(--text-gold);
  background: rgba(230, 168, 23, 0.1);
  transform: translateY(-1px);
}
.nav-links a.active {
  color: var(--gold-400);
  background: rgba(230, 168, 23, 0.14);
  box-shadow: inset 0 -2px 0 var(--gold-500);
  font-weight: 600;
}

/* User panel */
.nav-user {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
  justify-content: flex-end;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-left-color: var(--deity-color, #e6a817);
  border-radius: 10px;
  padding: 0.3rem 0.5rem 0.3rem 0.3rem;
  box-shadow: -2px 0 12px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.03) inset;
  transition: box-shadow 0.3s ease;
}

/* Responsividade da Navbar (Abaixo de Desktop grande) */
@media (max-width: 992px) {
  .nav-brand, .nav-user {
    width: auto;
    flex: none;
  }
  .nav-scroll-wrapper {
    width: auto;
    flex: 1;
    justify-content: flex-start;
  }
}

.nav-user:hover {
  box-shadow: -2px 0 16px rgba(0,0,0,0.4), 0 0 12px rgba(var(--deity-color, #e6a817), 0.08) inset;
}

.nav-avatar {
  width: 38px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  border: 2px solid var(--deity-color, #e6a817);
  box-shadow: 0 0 10px rgba(230,168,23,0.25);
  flex-shrink: 0;
}

.nav-user-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 100px;
}

.nav-user-name {
  color: var(--text-gold);
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 0.85rem;
  line-height: 1;
  letter-spacing: 0.02em;
}

.nav-user-meta {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.nav-deity-badge {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.9;
}
.nav-level-badge, .nav-gold-badge {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  padding: 0 4px;
  line-height: 1.6;
}

/* Life/Cosmo mini-bars */
.nav-bars {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
}
.nav-bar-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-bar-icon { font-size: 0.55rem; line-height: 1; }
.nav-bar-track {
  width: 72px;
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 99px;
  overflow: hidden;
}
.nav-bar-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.5s ease;
}
.nav-bar-life  { background: linear-gradient(90deg, #e05, #f44); }
.nav-bar-cosmo { background: linear-gradient(90deg, #53f, #88f); }

/* Logout button */
.nav-logout-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255,255,255,0.4);
  font-size: 1rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.nav-logout-btn:hover {
  border-color: rgba(255, 60, 60, 0.5);
  color: #ff6060;
  background: rgba(255, 60, 60, 0.08);
  transform: scale(1.05);
}

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

.card:hover { border-color: var(--border-gold); box-shadow: var(--shadow-gold); }

.card-gold {
  border-color: var(--border-gold);
  background: linear-gradient(135deg, var(--bg-card), rgba(230, 168, 23, 0.05));
}

.card-cosmic {
  border-color: var(--border-cosmic);
  background: linear-gradient(135deg, var(--bg-card), rgba(61, 107, 232, 0.05));
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text-gold);
  letter-spacing: 0.05em;
}

/* ── Stat Bars ── */
.stat-bar-container { margin-bottom: 0.75rem; }

.stat-bar-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.3rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.stat-bar-track {
  height: 10px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.stat-bar-fill::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 30%;
  height: 100%;
  background: rgba(255,255,255,0.2);
  border-radius: 0 999px 999px 0;
}

.life-bar { background: linear-gradient(90deg, #c0392b, var(--life-light)); }
.life-bar-label { color: var(--life-light); }
.cosmo-bar { background: linear-gradient(90deg, #1a3a9a, var(--cosmic-400)); }
.cosmo-bar-label { color: var(--text-cosmic); }
.xp-bar { background: linear-gradient(90deg, var(--gold-600), var(--gold-300)); }
.xp-bar-label { color: var(--text-gold); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  letter-spacing: 0.02em;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: var(--transition);
}

.btn:hover::before { background: rgba(255,255,255,0.08); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: #0a0a0a;
  box-shadow: 0 4px 15px rgba(230, 168, 23, 0.35);
}

.btn-primary:hover { box-shadow: 0 6px 25px rgba(230, 168, 23, 0.5); }

.btn-cosmic {
  background: linear-gradient(135deg, var(--cosmic-500), var(--cosmic-700));
  color: white;
  box-shadow: 0 4px 15px rgba(61, 107, 232, 0.35);
}

.btn-cosmic:hover { box-shadow: 0 6px 25px rgba(61, 107, 232, 0.5); }

.btn-danger {
  background: linear-gradient(135deg, #e84040, #c0392b);
  color: white;
  box-shadow: 0 4px 15px rgba(232, 64, 64, 0.35);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.btn-ghost:hover { border-color: var(--border-gold); color: var(--text-gold); }

.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.8rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1rem; }
.btn-full { width: 100%; }

/* ── Forms ── */
.form-group { margin-bottom: 1.25rem; }

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.form-input, .form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--transition);
  outline: none;
}

.form-input:focus, .form-select:focus {
  border-color: var(--gold-500);
  background: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 3px rgba(230, 168, 23, 0.15);
}

.form-select { cursor: pointer; }
.form-select option { background: var(--bg-dark); }

/* ── Grid ── */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* ── Stat Badges ── */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }

.stat-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.7rem;
  text-align: center;
  transition: var(--transition);
}

.stat-item:hover { border-color: var(--border-gold); }

.stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--text-gold);
}

.stat-name {
  font-size: 0.7rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.2rem;
}

/* ── Badges / Tags ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.badge-gold { background: rgba(230, 168, 23, 0.15); color: var(--text-gold); border: 1px solid rgba(230, 168, 23, 0.3); }
.badge-bronze { background: rgba(205, 127, 50, 0.15); color: #cd7f32; border: 1px solid rgba(205, 127, 50, 0.3); }
.badge-silver { background: rgba(192, 192, 192, 0.15); color: #c0c0c0; border: 1px solid rgba(192, 192, 192, 0.3); }
.badge-cosmic { background: rgba(61, 107, 232, 0.15); color: var(--text-cosmic); border: 1px solid rgba(61, 107, 232, 0.3); }
.badge-danger { background: rgba(232, 64, 64, 0.15); color: #ff6b6b; border: 1px solid rgba(232, 64, 64, 0.3); }
.badge-success { background: rgba(39, 174, 96, 0.15); color: #5dde90; border: 1px solid rgba(39, 174, 96, 0.3); }

/* ── Alerts ── */
.alert {
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  border: 1px solid;
}

.alert-error { background: rgba(232, 64, 64, 0.1); border-color: rgba(232, 64, 64, 0.3); color: #ff8080; }
.alert-success { background: rgba(39, 174, 96, 0.1); border-color: rgba(39, 174, 96, 0.3); color: #5dde90; }
.alert-info { background: rgba(61, 107, 232, 0.1); border-color: rgba(61, 107, 232, 0.3); color: var(--text-cosmic); }
.alert-warning { background: rgba(230, 168, 23, 0.1); border-color: rgba(230, 168, 23, 0.3); color: var(--text-gold); }

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  padding: 2rem;
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-gold);
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text-gold);
  margin-bottom: 1.5rem;
  text-align: center;
}

/* ── Chat Global ── */
.chat-sender {
  font-weight: 700;
  color: var(--gold-400);
}

/* ── Combat Widget ── */
.combat-floating-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(20, 28, 48, 0.95);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 0.5rem 0.75rem;
  box-shadow: var(--shadow-gold);
  z-index: 9999;
  cursor: pointer;
  backdrop-filter: blur(10px);
  min-width: 130px;
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Battle Chat Widget ── */
.battle-chat-widget {
  position: fixed;
  bottom: 20px;
  left: 20px;
  width: 300px;
  height: 400px;
  background: rgba(14, 21, 38, 0.96);
  border: 1px solid rgba(230, 168, 23, 0.4);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6), inset 0 0 15px rgba(230, 168, 23, 0.05);
  z-index: 9998;
  backdrop-filter: blur(10px);
  overflow: hidden;
  transition: transform 0.3s ease, height 0.3s ease;
}

.battle-chat-widget.collapsed {
  height: 45px;
  cursor: pointer;
}

.battle-chat-header {
  padding: 0.6rem 1rem;
  background: linear-gradient(180deg, rgba(230, 168, 23, 0.15), transparent);
  border-bottom: 1px solid rgba(230, 168, 23, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--text-gold);
  font-weight: bold;
  cursor: pointer;
}

.battle-chat-messages {
  flex: 1;
  padding: 0.8rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bc-msg {
  font-size: 0.82rem;
  line-height: 1.3;
  word-wrap: break-word;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  border-left: 2px solid var(--border-gold);
}

.bc-sender { font-weight: bold; color: var(--gold-400); margin-right: 4px; }
.bc-time { font-size: 0.65rem; color: var(--text-muted); float: right; margin-top:2px; }

.battle-chat-input-area {
  display: flex;
  padding: 0.6rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.2);
}

.battle-chat-input-area input {
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  font-size: 0.8rem;
  outline: none;
}
.battle-chat-input-area input:focus {
  border-color: var(--border-gold);
  background: rgba(230, 168, 23, 0.05);
}
.battle-chat-input-area button {
  background: none; border: none; font-size: 1.1rem; color: var(--gold-500); cursor: pointer; padding: 0 0.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.combat-floating-widget:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(230, 168, 23, 0.5);
}

.combat-widget-header {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-gold);
  margin-bottom: 0.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
}

.combat-widget-timer {
  font-size: 1.1rem;
  font-weight: 700;
  text-align: center;
  color: var(--text-primary);
  font-family: monospace;
  letter-spacing: 0.1em;
}

/* ── Toast ── */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  padding: 0.85rem 1.2rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 500;
  max-width: 350px;
  animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-deep);
  border: 1px solid;
}

.toast-success { background: rgba(39, 174, 96, 0.15); border-color: rgba(39, 174, 96, 0.5); color: #5dde90; }
.toast-error { background: rgba(232, 64, 64, 0.15); border-color: rgba(232, 64, 64, 0.5); color: #ff8080; }
.toast-info { background: rgba(61, 107, 232, 0.15); border-color: rgba(61, 107, 232, 0.5); color: var(--text-cosmic); }
.toast-warning { background: rgba(230, 168, 23, 0.15); border-color: rgba(230, 168, 23, 0.5); color: var(--text-gold); }

/* ── Section header ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text-gold);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.section-title::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 1.1em;
  background: var(--gold-500);
  border-radius: 2px;
}

/* ── Spinner ── */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(230, 168, 23, 0.15);
  border-top-color: var(--gold-400);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 2rem auto;
}

/* ── Loading overlay ── */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  color: var(--text-secondary);
  gap: 1rem;
}

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

/* ── Utilities ── */
.text-gold { color: var(--text-gold); }
.text-cosmic { color: var(--text-cosmic); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-danger { color: var(--life-light); }
.text-success { color: #5dde90; }
.text-center { text-align: center; }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.font-display { font-family: var(--font-display); }
.fw-bold { font-weight: 700; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.hidden { display: none !important; }

/* ── Animations ── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes glow {
  0%, 100% { box-shadow: 0 0 10px rgba(230, 168, 23, 0.3); }
  50% { box-shadow: 0 0 25px rgba(230, 168, 23, 0.6); }
}

/* ── Footer ── */
.site-footer {
  text-align: center;
  padding: 1.5rem 1rem;
  background: rgba(7, 16, 38, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-body);
  margin-top: auto;
  line-height: 1.5;
}
.site-footer p {
  margin-bottom: 0.3rem;
}
.site-footer p:last-child {
  margin-bottom: 0;
}
@keyframes cosmicGlow {
  0%, 100% { box-shadow: 0 0 10px rgba(61, 107, 232, 0.3); }
  50% { box-shadow: 0 0 25px rgba(61, 107, 232, 0.6); }
}

.animate-glow { animation: glow 2s ease-in-out infinite; }
.animate-pulse { animation: pulse 2s ease-in-out infinite; }
.animate-cosmic { animation: cosmicGlow 2s ease-in-out infinite; }

/* ── Table ── */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-md); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead th {
  padding: 0.85rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border-subtle);
}

tbody td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

tbody tr {
  transition: var(--transition);
}

tbody tr:hover { background: rgba(255,255,255,0.03); }
tbody tr:last-child td { border-bottom: none; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .container { padding: 0 1rem; }
  .card { padding: 1.25rem; }
  .modal { padding: 1.5rem; }
  
  .navbar {
    height: auto;
    padding: 0.5rem 0;
  }
  .navbar-inner {
    flex-wrap: wrap;
    justify-content: space-between;
  }
  .nav-brand { order: 1; }
  .nav-user { order: 2; margin-left: auto; }
  .nav-scroll-wrapper {
    order: 3;
    flex: 1 1 100%;
    margin-top: 0.5rem;
    padding-bottom: 0.2rem;
  }
}

/* ── Deity Cards (Create Character) ── */
.deity-card {
  background: var(--bg-card);
  border: 2px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.deity-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: var(--transition);
  background: radial-gradient(ellipse at center, rgba(230,168,23,0.08), transparent 70%);
}

.deity-card:hover::before, .deity-card.selected::before { opacity: 1; }

.deity-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.deity-card.selected {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

.deity-emoji {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  display: block;
  animation: deityFloat 3s ease-in-out infinite;
}

.deity-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.deity-desc {
  font-size: 0.82rem;
  line-height: 1.5;
}

@keyframes deityFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ── Avatar Cards ── */
.avatar-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

.avatar-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.avatar-card.selected {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

/* ── Deity color utilities ── */
.deity-athena { color: #e6a817; }
.deity-hades  { color: #9b59b6; }
.deity-poseidon { color: #3498db; }
.deity-odin   { color: #2ecc71; }

.bg-deity-athena  { background: rgba(230,168,23,0.12); border-color: rgba(230,168,23,0.3); }
.bg-deity-hades   { background: rgba(155,89,182,0.12); border-color: rgba(155,89,182,0.3); }
.bg-deity-poseidon{ background: rgba(52,152,219,0.12); border-color: rgba(52,152,219,0.3); }
.bg-deity-odin    { background: rgba(46,204,113,0.12); border-color: rgba(46,204,113,0.3); }

/* ── Armor cards ── */
.armor-card {
  transition: var(--transition);
}

.armor-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

.armor-owned::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.3);
}

/* ── Progress bars (extra sizes) ── */
.flex-wrap { flex-wrap: wrap; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.my-3 { margin-block: 1.5rem; }
.ml-1 { margin-left: 0.25rem; }

/* ── btn-warning ── */
.btn-warning {
  background: linear-gradient(135deg, #f39c12, #d35400);
  color: white;
  box-shadow: 0 4px 15px rgba(243,156,18,0.35);
}
.btn-warning:hover { box-shadow: 0 6px 25px rgba(243,156,18,0.5); }

/* ── btn-success ── */
.btn-success {
  background: linear-gradient(135deg, #27ae60, #1e8449);
  color: white;
  box-shadow: 0 4px 15px rgba(39,174,96,0.35);
}
.btn-success:hover { box-shadow: 0 6px 25px rgba(39,174,96,0.5); }

/* ── gap-2 override for small screens ── */
.gap-2 { gap: 1rem; }

/* ── Ajustes Responsivos Críticos do Mobile (Chat e Batalha) ── */
@media (max-width: 768px) {
  /* Arrumar esmagamento do Chat Global */
  .chat-layout {
    flex-direction: column !important;
    height: auto !important;
    min-height: calc(100vh - 200px) !important;
  }
  .chat-panel {
    height: 60vh !important;
    flex: none !important;
  }
  .chat-users-panel {
    width: 100% !important;
    height: 30vh !important;
    flex: none !important;
  }

  /* Battle Chat Widget no Mobile */
  .battle-chat-widget {
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    bottom: 15px !important;
    z-index: 10000 !important;
    /* Estado expandido: altura fixa grande */
    height: 380px !important;
  }
  .battle-chat-widget.collapsed {
    height: 54px !important;
    overflow: hidden !important;
  }
  /* Garantir que o header sempre receba o toque */
  .battle-chat-header {
    min-height: 54px !important;
    padding: 0 1rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: rgba(230,168,23,0.15) !important;
    user-select: none !important;
  }

  /* ── Personagem: empilhar seções verticalmente ── */
  .character-grid {
    grid-template-columns: 1fr !important;
  }
  /* Inventário: flex wrap para melhorar leitura */
  .inventory-item-row {
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
  }
  .inventory-item-row > div:first-child {
    min-width: 0 !important;
    flex: 1 !important;
  }
  /* Habilidades: 1 coluna no mobile */
  .skills-grid {
    grid-template-columns: 1fr !important;
  }

  /* ── Combat Timer Widget: mover para o topo no mobile ── */
  /* Evita colisão com o chat de batalha que fica no rodapé */
  .combat-floating-widget {
    bottom: auto !important;
    top: 72px !important;     /* logo abaixo da navbar */
    right: 10px !important;
    left: auto !important;
    min-width: 110px !important;
    padding: 0.35rem 0.6rem !important;
  }
}
