/* === RESET & BASE === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-deep:    #060a12;
  --bg-dark:    #0d1520;
  --bg-card:    #111d2e;
  --bg-hover:   #172540;
  --border:     #1e3a5f;
  --border-glow:#2a5a9f;
  --gold:       #d4a832;
  --gold-light: #f0c84a;
  --gold-dim:   #7a5a10;
  --crimson:    #c0392b;
  --crimson-light:#e74c3c;
  --teal:       #1abc9c;
  --teal-light: #2ecc71;
  --blue:       #2980b9;
  --blue-light: #3498db;
  --purple:     #8e44ad;
  --text-primary:   #e8dfc0;
  --text-secondary: #8aa0be;
  --text-dim:       #4a6080;
  --shadow-gold:    0 0 20px rgba(212,168,50,0.3);
  --shadow-blue:    0 0 20px rgba(41,128,185,0.3);
  --font-display: 'Cinzel', serif;
  --font-ui:      'Noto Sans JP', sans-serif;
  --font-mono:    'Orbitron', monospace;
}

html, body {
  width: 100%; height: 100%;
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-ui);
  overflow-x: hidden;
}

.screen { width: 100%; min-height: 100vh; }
.hidden { display: none !important; }

/* === SCROLLBAR === */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border-glow); border-radius: 3px; }

/* === LOADING === */
#loading-screen {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg-deep);
  display: flex; align-items: center; justify-content: center;
}
.loading-inner { text-align: center; }
.loading-globe {
  font-size: 5rem; animation: spin 2s linear infinite;
  display: block; margin-bottom: 1rem;
}
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.loading-title {
  font-family: var(--font-display);
  font-size: 3rem; font-weight: 900;
  color: var(--gold);
  letter-spacing: 0.3em;
  text-shadow: 0 0 30px rgba(212,168,50,0.6);
  margin-bottom: 2rem;
}
.loading-bar {
  width: 300px; height: 4px;
  background: var(--bg-card);
  border-radius: 2px; margin: 0 auto 1rem;
  overflow: hidden;
}
.loading-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold-light));
  border-radius: 2px;
  animation: loadFill 2s ease forwards;
}
@keyframes loadFill { to { width: 100%; } }
.loading-text { color: var(--text-secondary); font-size: 0.9rem; }

/* === AUTH SCREEN === */
#auth-screen {
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, #0d1f3a 0%, #060a12 70%);
  position: relative; overflow: hidden;
}
.auth-bg {
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 50px, rgba(30,58,95,0.15) 50px, rgba(30,58,95,0.15) 51px),
    repeating-linear-gradient(90deg, transparent, transparent 50px, rgba(30,58,95,0.15) 50px, rgba(30,58,95,0.15) 51px);
  opacity: 0.5;
}
.auth-container {
  position: relative; z-index: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--gold-dim);
  border-radius: 12px;
  padding: 2.5rem;
  width: 100%; max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), var(--shadow-gold);
}
.auth-logo { text-align: center; margin-bottom: 2rem; }
.logo-icon { font-size: 2.5rem; display: block; margin-bottom: 0.5rem; }
.auth-logo h1 {
  font-family: var(--font-display);
  font-size: 2.5rem; font-weight: 900;
  color: var(--gold); letter-spacing: 0.3em;
}
.auth-logo p { color: var(--text-secondary); font-size: 0.85rem; }
.auth-tabs {
  display: flex; gap: 0; margin-bottom: 1.5rem;
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
}
.auth-tab {
  flex: 1; padding: 0.7rem;
  background: transparent;
  border: none; cursor: pointer;
  color: var(--text-secondary);
  font-family: var(--font-ui);
  transition: all 0.2s;
}
.auth-tab.active {
  background: var(--gold-dim);
  color: var(--gold-light);
  font-weight: 700;
}
.auth-form { display: flex; flex-direction: column; gap: 1rem; }
.auth-form input {
  padding: 0.9rem 1rem;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: 1rem;
  transition: border-color 0.2s;
}
.auth-form input:focus { outline: none; border-color: var(--gold-dim); }
.auth-form input::placeholder { color: var(--text-dim); }
.auth-error { color: var(--crimson-light); font-size: 0.85rem; min-height: 1.2em; }

/* === BUTTONS === */
.btn-primary {
  padding: 0.9rem 2rem;
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  border: none; border-radius: 8px;
  color: #0a0800;
  font-family: var(--font-display);
  font-weight: 700; font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.05em;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-gold); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  padding: 0.9rem 2rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-family: var(--font-ui); font-size: 1rem;
  cursor: pointer; transition: all 0.2s;
}
.btn-secondary:hover { border-color: var(--text-secondary); color: var(--text-primary); }

/* === NATION SETUP === */
#nation-setup-screen {
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
  background: radial-gradient(ellipse at top, #0a1a30 0%, #060a12 70%);
}
.setup-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--gold-dim);
  border-radius: 12px;
  padding: 2rem;
  width: 100%; max-width: 700px;
}
.setup-title {
  font-family: var(--font-display);
  font-size: 1.5rem; color: var(--gold);
  text-align: center; margin-bottom: 2rem;
  letter-spacing: 0.1em;
}
.setup-grid { display: flex; flex-direction: column; gap: 1.5rem; }
.setup-field label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.85rem; margin-bottom: 0.5rem;
  text-transform: uppercase; letter-spacing: 0.1em;
}
.setup-field input {
  width: 100%; padding: 0.9rem 1rem;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-ui); font-size: 1.1rem;
}
.setup-field input:focus { outline: none; border-color: var(--gold-dim); }
.flag-grid, .option-grid {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
}
.flag-option, .option-btn {
  padding: 0.5rem 0.8rem;
  background: var(--bg-dark);
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-primary);
  font-size: 1.3rem;
  transition: all 0.15s;
}
.flag-option:hover, .option-btn:hover { border-color: var(--gold-dim); }
.flag-option.selected, .option-btn.selected {
  border-color: var(--gold);
  background: var(--gold-dim);
  color: var(--gold-light);
  box-shadow: var(--shadow-gold);
}
.option-btn { font-size: 0.85rem; padding: 0.5rem 1rem; }
.btn-found {
  width: 100%;
  padding: 1rem;
  margin-top: 1.5rem;
  background: linear-gradient(135deg, var(--gold-dim), var(--gold));
  border: none; border-radius: 8px;
  color: #0a0800;
  font-family: var(--font-display);
  font-weight: 900; font-size: 1.2rem;
  letter-spacing: 0.1em;
  cursor: pointer; transition: all 0.2s;
}
.btn-found:hover { transform: translateY(-2px); box-shadow: var(--shadow-gold); }
.setup-error { color: var(--crimson-light); font-size: 0.85rem; margin-top: 0.5rem; text-align: center; }

/* === GAME HEADER === */
.game-header {
  display: flex; align-items: center;
  padding: 0.8rem 1.5rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  gap: 1.5rem;
  position: sticky; top: 0; z-index: 100;
}
.header-nation { display: flex; align-items: center; gap: 0.8rem; flex: 1; }
.header-nation span { font-size: 2rem; }
.header-nation h2 { font-family: var(--font-display); font-size: 1.1rem; color: var(--gold); }
.header-player { color: var(--text-secondary); font-size: 0.8rem; }
.header-stats { display: flex; gap: 1.2rem; }
.header-stat { display: flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; }
.header-stat .stat-icon { font-size: 1rem; }
.btn-logout {
  padding: 0.4rem 1rem;
  background: transparent;
  border: 1px solid var(--crimson);
  border-radius: 6px;
  color: var(--crimson);
  font-size: 0.8rem; cursor: pointer;
  transition: all 0.2s;
}
.btn-logout:hover { background: var(--crimson); color: white; }

/* === NAV === */
.game-nav {
  display: flex;
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.nav-btn {
  flex: 1; min-width: 80px;
  padding: 0.9rem 1rem;
  background: transparent; border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-ui); font-size: 0.85rem;
  cursor: pointer; white-space: nowrap;
  transition: all 0.2s;
}
.nav-btn.active { color: var(--gold); border-bottom-color: var(--gold); }
.nav-btn:hover:not(.active) { color: var(--text-primary); background: var(--bg-hover); }

/* === GAME MAIN === */
.game-main { padding: 1.5rem; max-width: 1100px; margin: 0 auto; }
.tab-content { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.section-title {
  font-family: var(--font-display);
  font-size: 1.1rem; color: var(--gold);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.05em;
}

/* === MAIN TAB (GOVERN) === */
.main-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 700px) { .main-layout { grid-template-columns: 1fr; } }

.click-section { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.govern-btn {
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #1e3a5f, #0d1520);
  border: 3px solid var(--gold-dim);
  cursor: pointer;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 0 30px rgba(212,168,50,0.2), inset 0 0 20px rgba(0,0,0,0.5);
  transition: all 0.1s;
  user-select: none;
}
.govern-btn:hover { border-color: var(--gold); box-shadow: 0 0 40px rgba(212,168,50,0.4); }
.govern-btn:active {
  transform: scale(0.95);
  box-shadow: 0 0 50px rgba(212,168,50,0.6);
}
.govern-icon { font-size: 3rem; }
.govern-btn span:last-child {
  font-family: var(--font-display);
  font-size: 0.9rem; letter-spacing: 0.1em;
  color: var(--gold);
}
.click-info {
  display: flex; flex-direction: column; align-items: center;
  gap: 0.3rem; color: var(--text-secondary); font-size: 0.9rem;
}
.click-info strong { color: var(--gold-light); }

.stats-section {}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.8rem;
}
.stat-card {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem;
}
.stat-card-icon { font-size: 1.4rem; }
.stat-card-name { font-size: 0.75rem; color: var(--text-secondary); margin: 0.2rem 0; }
.stat-card-value {
  font-family: var(--font-mono);
  font-size: 1rem; color: var(--text-primary);
  font-weight: 700;
}
.stat-card-bar {
  height: 3px; background: var(--bg-card);
  border-radius: 2px; margin-top: 0.4rem; overflow: hidden;
}
.stat-card-fill {
  height: 100%; border-radius: 2px;
  background: linear-gradient(90deg, var(--blue), var(--teal));
  transition: width 0.5s ease;
}

/* === EVENT BANNER === */
.event-banner {
  margin-top: 1.5rem;
  padding: 1rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--gold-dim);
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  font-size: 0.95rem;
  animation: slideIn 0.4s ease;
}
@keyframes slideIn { from { transform: translateX(-20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* === UPGRADE TAB === */
.upgrade-categories {
  display: flex; gap: 0.5rem; flex-wrap: wrap;
  margin-bottom: 1rem;
}
.cat-btn {
  padding: 0.5rem 1rem;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  cursor: pointer; font-size: 0.85rem;
  transition: all 0.2s;
}
.cat-btn.active { background: var(--gold-dim); color: var(--gold-light); border-color: var(--gold-dim); }
.upgrade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.upgrade-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  display: flex; flex-direction: column; gap: 0.6rem;
  transition: border-color 0.2s;
}
.upgrade-card:hover { border-color: var(--border-glow); }
.upgrade-card.maxed { opacity: 0.6; }
.upgrade-header { display: flex; align-items: center; gap: 0.7rem; }
.upgrade-icon { font-size: 1.5rem; }
.upgrade-name { font-weight: 700; font-size: 0.95rem; }
.upgrade-level { margin-left: auto; font-size: 0.8rem; color: var(--text-secondary); }
.upgrade-desc { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.4; }
.upgrade-progress {
  height: 4px; background: var(--bg-dark);
  border-radius: 2px; overflow: hidden;
}
.upgrade-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--teal-light));
  border-radius: 2px; transition: width 0.4s;
}
.upgrade-footer { display: flex; align-items: center; justify-content: space-between; }
.upgrade-cost { font-size: 0.85rem; color: var(--gold); }
.upgrade-btn {
  padding: 0.4rem 1rem;
  background: var(--gold-dim);
  border: none; border-radius: 6px;
  color: var(--gold-light);
  font-size: 0.85rem; cursor: pointer;
  transition: all 0.2s;
}
.upgrade-btn:hover { background: var(--gold); color: #0a0800; }
.upgrade-btn:disabled { background: var(--bg-dark); color: var(--text-dim); cursor: not-allowed; }
.upgrade-btn.maxed-btn {
  background: var(--bg-dark); color: var(--teal);
  cursor: default;
}

/* === BATTLE TAB === */
.battle-tabs {
  display: flex; gap: 0.5rem; margin-bottom: 1.2rem;
}
.battle-tab {
  padding: 0.6rem 1.2rem;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer; transition: all 0.2s;
}
.battle-tab.active { background: var(--crimson); border-color: var(--crimson-light); color: white; }
.btab-content { }
.enemy-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.enemy-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  display: flex; align-items: center; gap: 1rem;
}
.enemy-flag { font-size: 2rem; }
.enemy-info { flex: 1; }
.enemy-nation { font-weight: 700; font-size: 1rem; }
.enemy-player { font-size: 0.8rem; color: var(--text-secondary); }
.enemy-power { font-size: 0.85rem; color: var(--teal); }
.enemy-btns { display: flex; flex-direction: column; gap: 0.4rem; }
.btn-military, .btn-economic {
  padding: 0.4rem 0.7rem;
  border: none; border-radius: 6px;
  font-size: 0.78rem; cursor: pointer; white-space: nowrap;
  transition: all 0.15s;
}
.btn-military { background: var(--crimson); color: white; }
.btn-military:hover { background: var(--crimson-light); }
.btn-economic { background: var(--blue); color: white; }
.btn-economic:hover { background: var(--blue-light); }

/* === BATTLE SCREEN === */
.battle-screen {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}
.battle-arena {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem; align-items: center;
  margin-bottom: 1.5rem;
}
.battle-side { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.battle-flag { font-size: 3rem; }
.battle-name { font-family: var(--font-display); font-size: 1rem; color: var(--text-primary); }
.battle-hp-bar {
  width: 100%; max-width: 200px;
  height: 14px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 7px; overflow: hidden;
}
.battle-hp-fill {
  height: 100%; transition: width 0.3s ease;
  border-radius: 7px;
}
.player-hp { background: linear-gradient(90deg, var(--teal), var(--teal-light)); }
.enemy-hp { background: linear-gradient(90deg, var(--crimson), var(--crimson-light)); }
.battle-hp-text { font-size: 0.8rem; color: var(--text-secondary); }
.battle-atk { font-size: 0.85rem; color: var(--gold); }
.battle-center { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.battle-type-label { font-size: 0.8rem; color: var(--text-secondary); }
.battle-vs {
  font-family: var(--font-display);
  font-size: 2rem; font-weight: 900;
  color: var(--crimson-light);
  text-shadow: 0 0 20px rgba(192,57,43,0.5);
}
.battle-result-msg { font-size: 0.9rem; color: var(--gold); min-height: 1.2em; text-align: center; }
.battle-log {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.8rem;
  height: 120px; overflow-y: auto;
  font-size: 0.82rem;
  line-height: 1.6;
  margin-bottom: 1.2rem;
}
.log-player { color: var(--teal-light); }
.log-enemy { color: var(--crimson-light); }
.log-system { color: var(--gold); }
.battle-actions { display: flex; gap: 1rem; justify-content: center; }
.attack-btn {
  padding: 1rem 2.5rem;
  background: linear-gradient(135deg, #8b0000, var(--crimson));
  border: 2px solid var(--crimson-light);
  border-radius: 10px;
  color: white;
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 700;
  cursor: pointer; letter-spacing: 0.05em;
  transition: all 0.1s;
  box-shadow: 0 0 20px rgba(192,57,43,0.3);
  user-select: none;
}
.attack-btn:active { transform: scale(0.96); box-shadow: 0 0 40px rgba(192,57,43,0.6); }
.attack-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.retreat-btn {
  padding: 1rem 1.5rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-secondary);
  cursor: pointer; transition: all 0.2s;
}
.retreat-btn:hover { border-color: var(--text-secondary); color: var(--text-primary); }
.battle-over-panel {
  text-align: center;
  padding: 1.5rem;
  background: var(--bg-dark);
  border-radius: 10px;
  margin-top: 1rem;
}
.battle-over-panel h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
.battle-over-panel p { color: var(--text-secondary); margin-bottom: 1rem; }

/* === RANKING === */
.ranking-header-row, .ranking-row {
  display: grid;
  grid-template-columns: 50px 1fr 1fr 80px 100px;
  gap: 0.5rem; padding: 0.7rem 1rem;
  align-items: center;
}
.ranking-header-row {
  background: var(--bg-dark);
  border-radius: 8px 8px 0 0;
  font-size: 0.8rem; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.1em;
  margin-bottom: 2px;
}
.ranking-row {
  background: var(--bg-card);
  border: 1px solid var(--border);
  margin-bottom: 2px;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: background 0.2s;
}
.ranking-row:hover { background: var(--bg-hover); }
.ranking-row.my-row { border-color: var(--gold-dim); background: rgba(212,168,50,0.05); }
.rank-num { font-family: var(--font-mono); font-weight: 700; color: var(--gold); }
.rank-medal { font-size: 1.3rem; }

/* === DIPLOMACY === */
.diplomacy-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 700px) { .diplomacy-layout { grid-template-columns: 1fr; } }
.diplomacy-relations h4, .diplomacy-actions h4 {
  font-family: var(--font-display); font-size: 0.95rem;
  color: var(--gold); margin-bottom: 1rem;
}
.relation-item, .diplomacy-player-item {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.7rem;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
}
.relation-type { margin-left: auto; font-size: 0.78rem; padding: 0.2rem 0.6rem; border-radius: 12px; }
.rel-ally { background: rgba(26,188,156,0.2); color: var(--teal); }
.rel-trade { background: rgba(41,128,185,0.2); color: var(--blue-light); }
.rel-neutral { background: rgba(74,96,128,0.2); color: var(--text-secondary); }
.btn-diplomacy {
  padding: 0.3rem 0.7rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.75rem;
  cursor: pointer; transition: all 0.15s;
}
.btn-diplomacy:hover { border-color: var(--teal); color: var(--teal); }

/* === MODAL === */
.modal {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(0,0,0,0.8);
  display: flex; align-items: center; justify-content: center;
}
.modal-inner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--gold-dim);
  border-radius: 12px;
  padding: 2rem;
  max-width: 450px; width: 100%;
  text-align: center;
}
.modal-inner h2 {
  font-family: var(--font-display);
  color: var(--gold); margin-bottom: 1rem; font-size: 1.4rem;
}
.modal-inner p { color: var(--text-secondary); line-height: 1.6; margin-bottom: 1rem; }
.reincarnation-info {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem; margin: 1rem 0;
  font-size: 0.9rem; color: var(--text-primary);
  line-height: 1.8;
}
.modal-buttons { display: flex; gap: 1rem; justify-content: center; }

/* === CLICK EFFECTS === */
#click-effects { position: fixed; inset: 0; pointer-events: none; z-index: 200; }
.click-effect {
  position: absolute;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--gold-light);
  font-size: 1.2rem;
  text-shadow: 0 0 10px rgba(240,200,74,0.7);
  animation: floatUp 0.8s ease forwards;
  pointer-events: none;
}
@keyframes floatUp {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-60px); }
}
.attack-effect {
  color: var(--crimson-light);
  text-shadow: 0 0 10px rgba(231,76,60,0.7);
}

/* === AGE INDICATOR === */
.age-badge {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.3rem 0.8rem;
  background: var(--bg-dark);
  border: 1px solid var(--border-glow);
  border-radius: 20px;
  font-size: 0.8rem; color: var(--blue-light);
  margin-left: 1rem;
}

/* === REINCARNATION BUTTON === */
.reincarnation-section {
  margin-top: 1.5rem;
  display: flex; justify-content: center;
}
.btn-reincarnate {
  padding: 0.7rem 2rem;
  background: linear-gradient(135deg, #4a0080, var(--purple));
  border: 1px solid #a04ad8;
  border-radius: 10px;
  color: #e0b0ff;
  font-family: var(--font-display);
  font-size: 0.95rem;
  cursor: pointer; transition: all 0.2s;
}
.btn-reincarnate:hover { box-shadow: 0 0 20px rgba(142,68,173,0.4); transform: translateY(-2px); }

/* === MISC === */
.no-data { color: var(--text-secondary); text-align: center; padding: 2rem; font-size: 0.9rem; }
.online-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--teal-light);
  border-radius: 50%;
  margin-right: 4px;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }