* { box-sizing: border-box; margin: 0; padding: 0; }
html, body, #root { height: 100%; width: 100%; }

body {
  background: radial-gradient(ellipse at center, #1a1a2e 0%, #0f0f1a 70%);
}

/* Vignette overlay */
#root::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(ellipse at center, transparent 50%, rgba(0,0,0,0.6) 100%);
  pointer-events: none;
  z-index: 9999;
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: rgba(15,15,26,0.5); }
::-webkit-scrollbar-thumb { background: rgba(226,183,20,0.3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(226,183,20,0.5); }

/* Glow borders */
.glow-gold { box-shadow: 0 0 10px rgba(226,183,20,0.15), inset 0 0 10px rgba(226,183,20,0.05); }
.glow-purple { box-shadow: 0 0 10px rgba(108,52,131,0.2), inset 0 0 10px rgba(108,52,131,0.05); }
.glow-red { box-shadow: 0 0 10px rgba(192,57,43,0.2); }

/* HP bar gradients */
.hp-bar-fill {
  background: linear-gradient(90deg, #c0392b 0%, #e2b714 50%, #27ae60 100%);
  background-size: 200%;
  transition: width 0.5s ease, background-position 0.5s ease;
}

.mp-bar-fill {
  background: linear-gradient(90deg, #2980b9, #6c3483);
  transition: width 0.5s ease;
}

.xp-bar-fill {
  background: linear-gradient(90deg, #e2b714, #f39c12);
  transition: width 0.5s ease;
}

/* Typewriter animation */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.narrative-entry { animation: fadeInUp 0.4s ease forwards; }

@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 8px rgba(226,183,20,0.3); }
  50% { box-shadow: 0 0 20px rgba(226,183,20,0.6); }
}
.pulse-gold { animation: pulse-gold 2s ease-in-out infinite; }

@keyframes combat-flash {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
.combat-banner { animation: combat-flash 1.5s ease-in-out infinite; }

/* Input glow */
.input-glow:focus {
  box-shadow: 0 0 15px rgba(226,183,20,0.3);
  border-color: #e2b714;
}

/* Button hover */
.btn-gold {
  background: linear-gradient(135deg, #e2b714, #d4a50a);
  transition: all 0.2s ease;
}
.btn-gold:hover {
  background: linear-gradient(135deg, #f0c420, #e2b714);
  box-shadow: 0 0 20px rgba(226,183,20,0.4);
  transform: translateY(-1px);
}

/* Modal backdrop */
.modal-backdrop {
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(4px);
}

/* Status effect badges */
.status-buff { background: rgba(39,174,96,0.2); border: 1px solid rgba(39,174,96,0.4); }
.status-debuff { background: rgba(192,57,43,0.2); border: 1px solid rgba(192,57,43,0.4); }

/* Rarity colors */
.rarity-common { color: #d5d5d5; }
.rarity-uncommon { color: #27ae60; }
.rarity-rare { color: #2980b9; }
.rarity-epic { color: #8e44ad; }
.rarity-legendary { color: #e2b714; }

/* Combat mode */
.combat-border { border: 1px solid rgba(192,57,43,0.5); }

/* Tab active */
.tab-active {
  border-bottom: 2px solid #e2b714;
  color: #e2b714;
}

/* Mobile tabs */
.mobile-tab-active {
  background: rgba(226,183,20,0.15);
  border-bottom: 2px solid #e2b714;
}

/* Stat modifier badges */
.stat-mod {
  font-size: 0.65rem;
  padding: 1px 4px;
  border-radius: 3px;
}
.stat-mod-pos { background: rgba(39,174,96,0.25); color: #27ae60; }
.stat-mod-neg { background: rgba(192,57,43,0.25); color: #c0392b; }
.stat-mod-zero { background: rgba(128,128,128,0.15); color: #888; }

/* Loading dots */
@keyframes dots {
  0%, 20% { content: '.'; }
  40% { content: '..'; }
  60%, 100% { content: '...'; }
}
.loading-dots::after { content: ''; animation: dots 1.5s steps(1) infinite; }

/* Quick action buttons */
.quick-btn {
  background: rgba(226,183,20,0.1);
  border: 1px solid rgba(226,183,20,0.3);
  transition: all 0.15s ease;
}
.quick-btn:hover {
  background: rgba(226,183,20,0.2);
  border-color: rgba(226,183,20,0.5);
}

/* Panel styling */
.panel {
  background: linear-gradient(180deg, rgba(22,33,62,0.9) 0%, rgba(15,15,26,0.95) 100%);
  border: 1px solid rgba(226,183,20,0.1);
}

@media (max-width: 768px) {
  #root::before { display: none; }
}