/* ============================================
   JEETO PAKISTAN - Design System
   Royal Gold & Dark Theme
   ============================================ */

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

:root {
  /* Colors */
  --bg-primary: #0a0e1a;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.8);
  --bg-card-hover: rgba(25, 35, 55, 0.9);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-border: rgba(255, 255, 255, 0.08);

  --gold: #f0b90b;
  --gold-light: #ffd54f;
  --gold-dark: #c49000;
  --gold-glow: rgba(240, 185, 11, 0.3);
  --gold-gradient: linear-gradient(135deg, #f0b90b, #ffd54f, #f0b90b);

  --green: #00c853;
  --green-glow: rgba(0, 200, 83, 0.3);
  --red: #ff1744;
  --red-glow: rgba(255, 23, 68, 0.3);
  --blue: #2979ff;
  --purple: #7c4dff;
  --orange: #ff9100;

  --text-primary: #f5f5f5;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(240, 185, 11, 0.3);

  /* Typography */
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Orbitron', monospace;

  /* Spacing */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-gold: 0 4px 20px rgba(240, 185, 11, 0.2);
  --shadow-glow: 0 0 30px rgba(240, 185, 11, 0.15);

  /* Layout */
  --nav-height: 60px;
  --tab-height: 65px;
  --max-width: 480px;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 3px; }

/* Gold text */
.gold { color: var(--gold); }

/* ============================================
   LOADING SCREEN
   ============================================ */
.loading-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s, visibility 0.5s;
}

.loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  text-align: center;
}

.loader-icon {
  font-size: 4rem;
  display: block;
  animation: bounce 1s ease-in-out infinite;
}

.loader-title {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 3px;
  margin-top: 12px;
}

.loader-bar {
  width: 200px;
  height: 4px;
  background: var(--bg-secondary);
  border-radius: 2px;
  margin: 20px auto;
  overflow: hidden;
}

.loader-progress {
  width: 0%;
  height: 100%;
  background: var(--gold-gradient);
  border-radius: 2px;
  animation: loadProgress 2s ease-in-out forwards;
}

.loader-text {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ============================================
   AUTH CONTAINER
   ============================================ */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  overflow: hidden;
  background: var(--bg-primary);
}

.auth-bg-effects {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.floating-emoji {
  position: absolute;
  font-size: 2rem;
  opacity: 0.15;
  left: var(--x);
  top: var(--y);
  animation: floatEmoji 6s ease-in-out infinite;
  animation-delay: var(--delay);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  backdrop-filter: blur(20px);
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}

.auth-icon {
  font-size: 3.5rem;
  display: block;
  margin-bottom: 8px;
  animation: pulse 2s ease-in-out infinite;
}

.auth-logo h1 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 3px;
}

.auth-subtitle {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 4px;
}

.form-title {
  font-size: 1.3rem;
  margin-bottom: 20px;
  text-align: center;
  font-weight: 600;
}

.input-group {
  position: relative;
  margin-bottom: 14px;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  z-index: 1;
}

.input-group input {
  width: 100%;
  padding: 14px 44px 14px 44px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-main);
  font-size: 0.95rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  outline: none;
}

.input-group input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

.input-group input::placeholder {
  color: var(--text-muted);
}

.auth-switch {
  text-align: center;
  margin-top: 16px;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.auth-switch a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
}

.auth-error {
  background: rgba(255, 23, 68, 0.1);
  border: 1px solid rgba(255, 23, 68, 0.3);
  color: var(--red);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-top: 12px;
  font-size: 0.85rem;
  text-align: center;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-main);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gold-gradient);
  color: #000;
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(240, 185, 11, 0.4);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  border-color: var(--gold);
  background: rgba(240, 185, 11, 0.1);
}

.btn-danger {
  background: rgba(255, 23, 68, 0.15);
  border: 1px solid rgba(255, 23, 68, 0.3);
  color: var(--red);
}

.btn-danger:hover {
  background: rgba(255, 23, 68, 0.25);
}

.btn-success {
  background: rgba(0, 200, 83, 0.15);
  border: 1px solid rgba(0, 200, 83, 0.3);
  color: var(--green);
}

.btn-success:hover {
  background: rgba(0, 200, 83, 0.25);
}

.btn-full { width: 100%; }

.btn-sm {
  padding: 8px 16px;
  font-size: 0.8rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ============================================
   NAVIGATION
   ============================================ */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(10, 14, 26, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo {
  font-size: 1.5rem;
}

.nav-title {
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 2px;
  font-weight: 700;
}

.nav-balance {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-glass);
  border: 1px solid var(--border-gold);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--gold);
  font-weight: 600;
}

.coin-icon {
  font-size: 1.1rem;
}

.nav-actions {
  display: flex;
  gap: 6px;
}

.nav-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s;
}

.nav-btn:hover {
  border-color: var(--gold);
  background: rgba(240, 185, 11, 0.1);
}

.nav-btn-danger:hover {
  border-color: var(--red);
  background: rgba(255, 23, 68, 0.1);
}

/* ============================================
   BOTTOM TABS
   ============================================ */
.bottom-tabs {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--tab-height);
  background: rgba(10, 14, 26, 0.98);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  transition: all 0.3s;
  font-family: var(--font-main);
}

.tab-btn.active {
  color: var(--gold);
}

.tab-btn.active .tab-icon {
  transform: scale(1.15);
}

.tab-icon {
  font-size: 1.4rem;
  transition: transform 0.3s;
}

.tab-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ============================================
   PAGE CONTAINER
   ============================================ */
.page-container {
  padding-top: calc(var(--nav-height) + 12px);
  padding-bottom: calc(var(--tab-height) + 12px);
  padding-left: 12px;
  padding-right: 12px;
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: 100vh;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--bg-glass-border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 12px;
  backdrop-filter: blur(10px);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

/* ============================================
   STATS ROW
   ============================================ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.stat-item {
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  text-align: center;
}

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

.stat-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================
   ANNOUNCEMENT BANNER
   ============================================ */
.announcement-banner {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: linear-gradient(135deg, rgba(240, 185, 11, 0.15), rgba(255, 145, 0, 0.1));
  border-bottom: 1px solid var(--border-gold);
  z-index: 90;
  animation: slideDown 0.5s ease;
}

.announcement-content {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.announcement-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.announcement-content p {
  flex: 1;
  font-size: 0.8rem;
  color: var(--gold-light);
}

.announcement-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
  position: fixed;
  top: calc(var(--nav-height) + 10px);
  right: 10px;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 350px;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.3s ease;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
}

.toast.success { border-color: rgba(0, 200, 83, 0.4); }
.toast.error { border-color: rgba(255, 23, 68, 0.4); }
.toast.warning { border-color: rgba(255, 145, 0, 0.4); }
.toast.info { border-color: rgba(41, 121, 255, 0.4); }

.toast-icon { font-size: 1.2rem; flex-shrink: 0; }
.toast-message { font-size: 0.85rem; flex: 1; }

.toast.removing {
  animation: slideOutRight 0.3s ease forwards;
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 24px;
  width: 100%;
  max-width: 440px;
  max-height: 80vh;
  overflow-y: auto;
  animation: scaleIn 0.3s ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1rem;
  transition: all 0.3s;
}

.modal-close:hover {
  border-color: var(--red);
  color: var(--red);
}

/* ============================================
   BADGES
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-gold {
  background: rgba(240, 185, 11, 0.15);
  color: var(--gold);
  border: 1px solid rgba(240, 185, 11, 0.3);
}

.badge-green {
  background: rgba(0, 200, 83, 0.15);
  color: var(--green);
  border: 1px solid rgba(0, 200, 83, 0.3);
}

.badge-red {
  background: rgba(255, 23, 68, 0.15);
  color: var(--red);
  border: 1px solid rgba(255, 23, 68, 0.3);
}

.badge-blue {
  background: rgba(41, 121, 255, 0.15);
  color: var(--blue);
  border: 1px solid rgba(41, 121, 255, 0.3);
}

.badge-orange {
  background: rgba(255, 145, 0, 0.15);
  color: var(--orange);
  border: 1px solid rgba(255, 145, 0, 0.3);
}

/* ============================================
   LIST ITEMS
   ============================================ */
.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  transition: all 0.3s;
}

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

.list-item-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.list-item-content {
  flex: 1;
  min-width: 0;
}

.list-item-title {
  font-weight: 600;
  font-size: 0.9rem;
}

.list-item-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.list-item-value {
  text-align: right;
  flex-shrink: 0;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 0.9rem;
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  padding: 0 4px;
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================
   RESPONSIVE - DESKTOP
   ============================================ */
@media (min-width: 768px) {
  :root {
    --max-width: 500px;
  }
  
  .bottom-tabs {
    display: none;
  }

  .page-container {
    padding-bottom: 20px;
  }

  .main-nav {
    justify-content: center;
    gap: 40px;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-gold { color: var(--gold); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: 0.8rem; }
.text-xs { font-size: 0.7rem; }
.font-display { font-family: var(--font-display); }
.font-bold { font-weight: 700; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
