/* Fariid Earn - Premium Mobile UI */
/* FariidTech */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;500;600;700;800&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  /* Dark theme (default) */
  --bg-primary: #070b14;
  --bg-secondary: #0d1323;
  --bg-card: rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.07);
  --bg-input: rgba(255,255,255,0.06);
  --border: rgba(255,255,255,0.08);
  --border-accent: rgba(99,102,241,0.4);

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #475569;

  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --accent-3: #ec4899;
  --accent-green: #10b981;
  --accent-orange: #f59e0b;
  --accent-red: #ef4444;
  --accent-blue: #3b82f6;

  --gradient-main: linear-gradient(135deg, #6366f1, #8b5cf6);
  --gradient-green: linear-gradient(135deg, #10b981, #059669);
  --gradient-orange: linear-gradient(135deg, #f59e0b, #d97706);
  --gradient-pink: linear-gradient(135deg, #ec4899, #be185d);
  --gradient-blue: linear-gradient(135deg, #3b82f6, #2563eb);

  --shadow-card: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 40px rgba(99,102,241,0.15);
  --shadow-btn: 0 4px 20px rgba(99,102,241,0.4);

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --nav-height: 68px;
  --header-height: 60px;
}

[data-theme="light"] {
  --bg-primary: #f0f4ff;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255,255,255,0.9);
  --bg-card-hover: rgba(255,255,255,1);
  --bg-input: rgba(0,0,0,0.04);
  --border: rgba(0,0,0,0.08);
  --border-accent: rgba(99,102,241,0.3);

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;

  --shadow-card: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-glow: 0 0 40px rgba(99,102,241,0.1);
}

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

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

body {
  font-family: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: calc(var(--nav-height) + 12px);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background mesh */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -20%;
  width: 80vw;
  height: 80vw;
  background: radial-gradient(circle, rgba(99,102,241,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ====== TYPOGRAPHY ====== */
h1, h2, h3 { font-family: 'Sora', sans-serif; font-weight: 700; }
h1 { font-size: 24px; line-height: 1.2; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }

/* ====== SCROLLBAR ====== */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* ====== HEADER ====== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: rgba(7,11,20,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] .app-header {
  background: rgba(240,244,255,0.85);
}

.header-logo {
  font-family: 'Sora', sans-serif;
  font-size: 18px;
  font-weight: 800;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

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

.header-btn {
  width: 38px;
  height: 38px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  text-decoration: none;
  color: var(--text-secondary);
}
.header-btn:active { transform: scale(0.9); }
.header-btn .badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 16px;
  height: 16px;
  background: var(--accent-red);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-primary);
}

/* ====== BOTTOM NAV ====== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--nav-height);
  background: rgba(7,11,20,0.92);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 200;
  padding: 0 8px;
}
[data-theme="light"] .bottom-nav {
  background: rgba(255,255,255,0.92);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  color: var(--text-muted);
  min-width: 52px;
  position: relative;
}
.nav-item.active { color: var(--accent); }
.nav-item.active .nav-icon {
  background: rgba(99,102,241,0.15);
  color: var(--accent);
}
.nav-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.nav-label { font-size: 10px; font-weight: 600; letter-spacing: 0.3px; }

/* ====== CARDS ====== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.2s;
}
.card:hover { border-color: var(--border-accent); }

.card-glass {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(20px);
}

.balance-card {
  background: var(--gradient-main);
  border: none;
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-btn);
}
.balance-card::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
}
.balance-card::after {
  content: '';
  position: absolute;
  bottom: -50px;
  left: -20px;
  width: 160px;
  height: 160px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

/* ====== STATS GRID ====== */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
}
.stat-value {
  font-family: 'Sora', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}
.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}

/* ====== BUTTONS ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.15s;
}
.btn:active::after { background: rgba(255,255,255,0.1); }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--gradient-main);
  color: #fff;
  box-shadow: var(--shadow-btn);
  width: 100%;
}
.btn-primary:hover { box-shadow: 0 6px 30px rgba(99,102,241,0.5); }

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

.btn-green {
  background: var(--gradient-green);
  color: #fff;
  box-shadow: 0 4px 16px rgba(16,185,129,0.3);
  width: 100%;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-accent);
  color: var(--accent);
  padding: 10px 20px;
}

.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 8px;
  width: auto;
}

/* ====== FORMS ====== */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}
.form-control {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  font-size: 15px;
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  outline: none;
  transition: all 0.2s;
  -webkit-appearance: none;
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
  background: var(--bg-input);
}
.input-icon-wrap { position: relative; }
.input-icon-wrap .form-control { padding-left: 44px; }
.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}

/* ====== SECTION HEADERS ====== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-family: 'Sora', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}
.section-link {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

/* ====== PAGE LAYOUT ====== */
.page { padding: 16px; }
.page-title {
  font-family: 'Sora', sans-serif;
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 4px;
}
.page-subtitle { color: var(--text-muted); font-size: 14px; margin-bottom: 24px; }

/* ====== AUTH PAGES ====== */
.auth-page {
  min-height: 100vh;
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-logo {
  text-align: center;
  margin-bottom: 36px;
}
.auth-logo h1 {
  font-family: 'Sora', sans-serif;
  font-size: 32px;
  font-weight: 900;
  background: var(--gradient-main);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-logo p { color: var(--text-muted); font-size: 14px; margin-top: 6px; }

.auth-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
}
[data-theme="light"] .auth-card { background: #fff; }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 13px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ====== VIDEO CARDS ====== */
.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s;
}
.video-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  position: relative;
  background: #000;
  overflow: hidden;
}
.video-thumb iframe {
  width: 100%;
  height: 100%;
  border: none;
}
.video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
}
.timer-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(99,102,241,0.2);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: #fff;
}
.video-info { padding: 14px 16px; }
.video-title { font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.video-meta { display: flex; align-items: center; gap: 8px; }
.video-badge {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(99,102,241,0.15);
  color: var(--accent);
}
.video-reward {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-green);
}

/* ====== SPIN WHEEL ====== */
.spin-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0;
}
.wheel-wrap {
  position: relative;
  width: 280px;
  height: 280px;
}
#spinCanvas {
  border-radius: 50%;
  box-shadow: 0 0 40px rgba(99,102,241,0.3), 0 0 80px rgba(99,102,241,0.1);
}
.wheel-pointer {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 24px solid var(--accent);
  filter: drop-shadow(0 2px 8px rgba(99,102,241,0.6));
}
.wheel-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  width: 36px;
  height: 36px;
  background: var(--gradient-main);
  border-radius: 50%;
  border: 3px solid var(--bg-primary);
  z-index: 10;
}

/* ====== TASK CARDS ====== */
.task-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  transition: all 0.2s;
}
.task-item:active { transform: scale(0.99); }
.task-icon-wrap {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.task-body { flex: 1; min-width: 0; }
.task-name { font-size: 14px; font-weight: 600; margin-bottom: 3px; }
.task-desc { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-reward {
  text-align: right;
  white-space: nowrap;
}
.task-coins {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-green);
}
.task-status {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ====== WALLET ====== */
.withdrawal-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}
.method-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.method-card.selected {
  border-color: var(--accent);
  background: rgba(99,102,241,0.08);
}
.method-card .method-name { font-size: 13px; font-weight: 700; margin-top: 6px; }
.method-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-size: 11px;
  font-weight: 800;
}

/* ====== TRANSACTION LIST ====== */
.tx-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.tx-item:last-child { border-bottom: none; }
.tx-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tx-info { flex: 1; min-width: 0; }
.tx-desc { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-date { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.tx-amount { font-size: 15px; font-weight: 700; white-space: nowrap; }
.tx-amount.positive { color: var(--accent-green); }
.tx-amount.negative { color: var(--accent-red); }

/* ====== LEVEL / XP BAR ====== */
.xp-bar-wrap {
  background: var(--bg-input);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  margin-top: 6px;
}
.xp-bar {
  height: 100%;
  background: var(--gradient-main);
  border-radius: 999px;
  transition: width 0.6s ease;
}
.level-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--gradient-main);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

/* ====== REFERRAL ====== */
.ref-code-box {
  background: var(--bg-input);
  border: 1px dashed var(--border-accent);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ref-code {
  font-family: 'Sora', sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--accent);
}

/* ====== LEADERBOARD ====== */
.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius);
  margin-bottom: 8px;
  transition: all 0.2s;
}
.leaderboard-item.top-1 { background: linear-gradient(135deg, rgba(251,191,36,0.1), rgba(251,191,36,0.05)); border: 1px solid rgba(251,191,36,0.3); }
.leaderboard-item.top-2 { background: rgba(148,163,184,0.05); border: 1px solid rgba(148,163,184,0.2); }
.leaderboard-item.top-3 { background: rgba(205,127,50,0.05); border: 1px solid rgba(205,127,50,0.2); }
.rank-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  min-width: 32px;
}
.rank-1 { background: linear-gradient(135deg,#fbbf24,#d97706); color: #fff; }
.rank-2 { background: linear-gradient(135deg,#94a3b8,#64748b); color: #fff; }
.rank-3 { background: linear-gradient(135deg,#cd7f32,#92400e); color: #fff; }
.rank-n { background: var(--bg-input); color: var(--text-muted); font-size: 12px; }

/* ====== ACHIEVEMENT BADGES ====== */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.badge-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  position: relative;
}
.badge-icon.locked { filter: grayscale(1); opacity: 0.4; }
.badge-icon.earned { box-shadow: 0 4px 16px rgba(99,102,241,0.3); }
.badge-name { font-size: 10px; text-align: center; color: var(--text-muted); font-weight: 500; }

/* ====== CHECK-IN CALENDAR ====== */
.checkin-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 12px;
}
.checkin-day {
  aspect-ratio: 1;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
}
.checkin-day.done { background: var(--gradient-main); color: #fff; border-color: transparent; }
.checkin-day.today { border-color: var(--accent); color: var(--accent); }

/* ====== ALERTS ====== */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.alert-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #f87171; }
.alert-success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3); color: #34d399; }
.alert-info { background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.3); color: #818cf8; }
.alert-warning { background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.3); color: #fbbf24; }

/* ====== LOADING ====== */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, rgba(255,255,255,0.06) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: skeleton-shine 1.5s infinite;
  border-radius: 8px;
}
@keyframes skeleton-shine {
  from { background-position: 200% center; }
  to { background-position: -200% center; }
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.page-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  flex-direction: column;
  gap: 16px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ====== TOAST ====== */
#toast-container {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: calc(100% - 32px);
  max-width: 440px;
  pointer-events: none;
}
.toast {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-card);
  animation: toast-in 0.3s ease;
  pointer-events: all;
}
.toast.success { border-left: 3px solid var(--accent-green); }
.toast.error { border-left: 3px solid var(--accent-red); }
.toast.info { border-left: 3px solid var(--accent); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ====== SHORTLINK ====== */
.shortlink-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.shortlink-timer {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 20px;
  box-shadow: 0 0 30px rgba(99,102,241,0.4);
}

/* ====== PROFILE ====== */
.avatar-wrap {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--accent);
  overflow: hidden;
  background: var(--gradient-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  margin: 0 auto 12px;
  position: relative;
}

/* ====== CATEGORY TABS ====== */
.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  -webkit-tap-highlight-color: transparent;
}
.tab-btn.active {
  background: var(--gradient-main);
  border-color: transparent;
  color: #fff;
}

/* ====== PROGRESS ====== */
.progress {
  height: 6px;
  background: var(--bg-input);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s ease;
}

/* ====== SECTION DIVIDER ====== */
.spacer { height: 16px; }
.spacer-sm { height: 8px; }

/* ====== UTILITY ====== */
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-muted { color: var(--text-muted); }
.text-green { color: var(--accent-green); }
.text-red { color: var(--accent-red); }
.text-accent { color: var(--accent); }
.font-bold { font-weight: 700; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }
.w-full { width: 100%; }
.text-center { text-align: center; }

/* ====== COIN DISPLAY ====== */
.coin-display {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-weight: 700;
  color: var(--accent-orange);
}

/* ====== ANIMATIONS ====== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.3s ease; }

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(99,102,241,0.2); }
  50% { box-shadow: 0 0 40px rgba(99,102,241,0.5); }
}
.pulse-glow { animation: pulse-glow 2s infinite; }

@keyframes bounce-in {
  0% { transform: scale(0.5); opacity: 0; }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}
.bounce-in { animation: bounce-in 0.4s cubic-bezier(0.34,1.56,0.64,1); }

/* ====== REWARD POP ====== */
.reward-pop {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  background: var(--gradient-main);
  border-radius: var(--radius-lg);
  padding: 32px 40px;
  text-align: center;
  z-index: 9998;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  animation: bounce-in 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
.reward-pop .coins-amount {
  font-family: 'Sora', sans-serif;
  font-size: 48px;
  font-weight: 900;
  color: #fff;
}
.reward-pop-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 9997;
}

/* ====== EMPTY STATE ====== */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-icon {
  width: 64px;
  height: 64px;
  background: var(--bg-card);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}
.empty-title { font-size: 16px; font-weight: 700; color: var(--text-secondary); margin-bottom: 8px; }
.empty-text { font-size: 14px; }

/* ====== SAFE AREA ====== */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .bottom-nav { padding-bottom: env(safe-area-inset-bottom); height: calc(var(--nav-height) + env(safe-area-inset-bottom)); }
  body { padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 12px); }
}

/* ====== DARK/LIGHT TOGGLE ====== */
.theme-toggle {
  width: 44px;
  height: 24px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: all 0.3s;
}
.theme-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: var(--accent);
  border-radius: 50%;
  transition: transform 0.3s;
}
[data-theme="light"] .theme-toggle::after { transform: translateX(20px); }

/* ====== COPY LINK ====== */
.copy-btn {
  padding: 8px 14px;
  background: var(--gradient-main);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
