/* --- CSS Variables & Theming --- */
:root {
  --bg-primary: #0B1220;    /* Deep dark blue from reference */
  --bg-secondary: #131B2D;  /* Slightly lighter for cards */
  --bg-tertiary: #1E273A;   /* For hover states & distinct elements */
  
  --accent-gold: #D4AF37;   /* For premium elements */
  --accent-gold-glow: rgba(212, 175, 55, 0.2);
  --accent-blue: #00A3FF;   /* Vibrant interactions */
  
  --text-primary: #FFFFFF;
  --text-secondary: #94A3B8;
  
  --border-light: rgba(255, 255, 255, 0.08);
  --border-radius-md: 12px;
  --border-radius-lg: 16px;
  
  --transition-fast: 0.2s ease;
  
  --header-height: 60px;
  --bottom-nav-height: 65px;
}

/* --- Global Utilities --- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent; /* better mobile feel */
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

/* --- Typography --- */
h1, h2, h3 { font-weight: 600; }

/* --- Layout --- */
#app-root {
  padding-top: var(--header-height);
  padding-bottom: calc(var(--bottom-nav-height) + 10px);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 600px; /* Constrict for mobile-first feel on desktop */
  margin: 0 auto;
  padding: 16px;
}

/* --- Header --- */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: rgba(11, 18, 32, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  z-index: 100;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.brand-name {
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* --- Bottom Navigation --- */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-height);
  background: var(--bg-primary);
  display: flex;
  justify-content: space-around;
  border-top: 1px solid var(--border-light);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom); /* iOS support */
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.75rem;
  width: 100%;
  transition: var(--transition-fast);
}

.nav-item svg {
  width: 20px;
  height: 20px;
  transition: stroke var(--transition-fast);
}

.nav-item.active {
  color: var(--accent-gold);
}

.nav-item.active svg {
  stroke: var(--accent-gold);
  filter: drop-shadow(0 0 4px var(--accent-gold-glow));
}

/* --- Buttons --- */
button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #b89326 100%);
  color: var(--bg-primary);
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  transition: all var(--transition-fast);
}

.btn-primary:active {
  transform: scale(0.95);
}

.icon-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  border-color: var(--accent-gold);
  color: var(--accent-gold);
}

.icon-btn svg {
  flex-shrink: 0;
}

/* --- Cards / Glassmorphism --- */
.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* --- Dynamic Views --- */
.view-title {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.wallet-balance {
  font-size: 2.2rem;
  font-weight: 600;
  background: -webkit-linear-gradient(left, #fff, var(--accent-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-top: 8px;
}

/* --- Modal --- */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-lg);
  padding: 30px;
  width: 100%;
  max-width: 400px;
  position: relative;
}

.modal-content h2 {
  text-align: center;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.modal-content form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-content input {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 1rem;
  width: 100%;
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper input {
  padding-right: 40px;
}

.password-toggle {
  position: absolute;
  right: 12px;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
}

.modal-content input::placeholder {
  color: var(--text-secondary);
}

.modal-content input:focus {
  outline: none;
  border-color: var(--accent-gold);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 24px;
  color: var(--text-secondary);
  cursor: pointer;
}

/* --- Toast Notifications --- */
.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: var(--bg-tertiary);
  border: 1px solid var(--accent-gold);
  color: var(--text-primary);
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  z-index: 300;
  opacity: 0;
  transition: all 0.3s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --- Hero Section --- */
.hero-section {
  text-align: center;
  padding: 40px 20px;
}

.hero-icon {
  margin-bottom: 20px;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin-bottom: 8px;
  letter-spacing: 2px;
}

.hero-subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  font-weight: 400;
}

.hero-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 320px;
  margin: 0 auto 30px;
}

.hero-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.hero-feature {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.hero-feature svg {
  color: var(--accent-gold);
  flex-shrink: 0;
}

.hero-btn {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(212, 175, 55, 0); }
}
