/* ============================================
   REALM OF SHADOWS - Dark RPG Theme
   ============================================ */

:root {
  --gold: #f59e0b;
  --gold-dark: #d97706;
  --purple: #a78bfa;
  --purple-dark: #7c3aed;
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-tertiary: #1a1a24;
  --border: #2a2a3a;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #333 transparent;
}

*::-webkit-scrollbar { width: 6px; }
*::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
*::-webkit-scrollbar-track { background: transparent; }

body {
  background: var(--bg-primary);
  background-image: 
    radial-gradient(ellipse at 20% 50%, rgba(120, 58, 237, 0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(245, 158, 11, 0.03) 0%, transparent 50%);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Glass panels */
.glass-panel {
  background: rgba(17, 17, 24, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
}

/* Game input fields */
.game-input {
  background: rgba(10, 10, 15, 0.8);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.625rem 0.875rem;
  color: #e5e7eb;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.game-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.1);
}
.game-input::placeholder { color: #4b5563; }

/* Buttons */
.btn-primary {
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: #111;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn-secondary {
  background: rgba(75, 85, 99, 0.3);
  color: #d1d5db;
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  border: 1px solid #374151;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover { background: rgba(75, 85, 99, 0.5); }

.btn-success {
  background: linear-gradient(135deg, #059669, #10b981);
  color: white;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-success:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-success:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

.btn-danger {
  background: linear-gradient(135deg, #dc2626, #ef4444);
  color: white;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-danger:hover { filter: brightness(1.1); }

.btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
}

/* Auth tab active state */
.auth-tab-active {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

/* Navigation buttons */
.nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  color: #6b7280;
  font-size: 0.875rem;
  border: none;
  background: none;
  cursor: pointer;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}
.nav-btn:hover {
  color: #d1d5db;
  background: rgba(255, 255, 255, 0.03);
}
.nav-btn.active {
  color: var(--gold);
  background: rgba(245, 158, 11, 0.05);
  border-left-color: var(--gold);
}

@media (min-width: 768px) {
  .nav-btn {
    justify-content: flex-start;
    padding: 0.75rem 1rem;
  }
}

/* Item rarity colors */
.rarity-common { color: #9ca3af; }
.rarity-uncommon { color: #34d399; }
.rarity-rare { color: #60a5fa; }
.rarity-epic { color: #a78bfa; }
.rarity-legendary { color: #f59e0b; text-shadow: 0 0 8px rgba(245, 158, 11, 0.3); }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.glass-panel {
  animation: fadeIn 0.3s ease-out;
}

/* Level up flash */
@keyframes levelUp {
  0% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.5); }
  50% { box-shadow: 0 0 20px 10px rgba(245, 158, 11, 0.3); }
  100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); }
}

/* Subtle background animation */
@keyframes bgPulse {
  0%, 100% { opacity: 0.03; }
  50% { opacity: 0.06; }
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, var(--purple), transparent 70%);
  animation: bgPulse 8s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

/* Select styling */
select.game-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

/* Toast notifications */
.fixed.top-4.right-4 {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
