/* ===========================================
   MAISON DU MAGHREB - Design System v2.0
   Application mobile pour jeunes Maghrébins
   Palette: Quebec Blue + Gold + Modern Gradients
   =========================================== */

/* ===== GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
  /* Quebec Blue Palette */
  --blue-900: #063d66;
  --blue-800: #074a7a;
  --blue-700: #085589;
  --blue-600: #095797;
  --blue-500: #0a68b3;
  --blue-400: #2b82c9;
  --blue-300: #5da3db;
  --blue-200: #94c4e8;
  --blue-100: #cce2f4;
  --blue-50: #e8f2fa;

  /* Gold Palette */
  --gold-900: #7a5f00;
  --gold-800: #9a7800;
  --gold-700: #b38b00;
  --gold-600: #d4a500;
  --gold-500: #e8b800;
  --gold-400: #f0c832;
  --gold-300: #f5d966;
  --gold-200: #f9e799;
  --gold-100: #fcf3cc;
  --gold-50: #fef9e6;

  /* Semantic Colors */
  --primary: var(--blue-600);
  --primary-dark: var(--blue-800);
  --primary-light: var(--blue-100);
  --accent: var(--gold-600);
  --accent-dark: var(--gold-800);
  --accent-light: var(--gold-100);

  /* Status Colors */
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --error: #ef4444;
  --error-light: #fee2e2;
  --info: var(--blue-500);
  --info-light: var(--blue-50);

  /* Neutrals */
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --black: #000000;

  /* Typography */
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  /* Font Sizes */
  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-lg: 17px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 30px;
  --text-4xl: 36px;

  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;

  /* Shadows - upgraded with color */
  --shadow-sm: 0 1px 3px rgba(9, 87, 151, 0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(9, 87, 151, 0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 24px rgba(9, 87, 151, 0.1), 0 4px 8px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 40px rgba(9, 87, 151, 0.12), 0 8px 16px rgba(0,0,0,0.04);
  --shadow-gold: 0 4px 14px rgba(212, 165, 0, 0.25);
  --shadow-primary: 0 4px 14px rgba(9, 87, 151, 0.3);

  /* Safe Areas */
  --safe-top: 47px;
  --safe-bottom: 34px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html, body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--gray-800);
  background: #eef2f7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== MOBILE FRAME ===== */
.mobile-frame {
  width: 390px;
  min-height: 844px;
  background: var(--white);
  margin: 20px auto;
  border-radius: 44px;
  overflow: hidden;
  position: relative;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.05),
    0 25px 60px -12px rgba(9, 87, 151, 0.2),
    0 12px 28px -8px rgba(0,0,0,0.1);
}

/* ===== PAGE LAYOUT ===== */
.page {
  min-height: 844px;
  display: flex;
  flex-direction: column;
  background: var(--gray-50);
  position: relative;
}

.page-content {
  flex: 1;
  overflow-y: auto;
  padding-bottom: var(--safe-bottom);
  -webkit-overflow-scrolling: touch;
}

.page-content.has-bottom-nav {
  padding-bottom: calc(var(--safe-bottom) + 72px);
}

/* ===== STATUS BAR ===== */
.status-bar {
  height: var(--safe-top);
  padding: 14px 24px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  position: relative;
  z-index: 100;
}

.status-bar.dark {
  color: var(--white);
}

.status-bar.light {
  color: var(--gray-900);
}

.status-time {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  letter-spacing: 0.3px;
}

.status-icons {
  display: flex;
  gap: 5px;
  align-items: center;
}

/* ===== APP HEADER ===== */
.app-header {
  padding: 0 var(--spacing-md) var(--spacing-md);
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  min-height: 44px;
}

.app-header.with-bg {
  background: var(--primary);
  color: var(--white);
}

.header-back {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  cursor: pointer;
  color: inherit;
  transition: all 0.3s var(--ease-out);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-back:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

.header-title {
  flex: 1;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
}

.header-action {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  color: inherit;
  transition: all 0.3s var(--ease-out);
}

.header-action:hover {
  transform: scale(1.05);
}

/* ===== GRADIENT HEADER ===== */
.gradient-header {
  background: linear-gradient(145deg, var(--blue-800) 0%, var(--blue-500) 60%, var(--blue-400) 100%);
  color: var(--white);
  padding-bottom: var(--spacing-lg);
  border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
  position: relative;
  overflow: hidden;
}

.gradient-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.gradient-header::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -20%;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(212,165,0,0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.gradient-header-gold {
  background: linear-gradient(145deg, var(--gold-800) 0%, var(--gold-500) 60%, var(--gold-400) 100%);
  color: var(--white);
  padding-bottom: var(--spacing-lg);
  border-radius: 0 0 var(--radius-2xl) var(--radius-2xl);
  position: relative;
  overflow: hidden;
}

.gradient-header-gold::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  border-radius: 50%;
}

/* ===== BOTTOM NAVIGATION - Modern 5-Tab with FAB ===== */
.bottom-nav {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 354px;
  height: 70px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-radius: 24px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow:
    0 8px 40px rgba(9, 87, 151, 0.1),
    0 2px 8px rgba(0,0,0,0.04);
  z-index: 1000;
  padding: 0 6px;
  border: 1px solid rgba(255, 255, 255, 0.75);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 14px;
  text-decoration: none;
  color: var(--gray-400);
  transition: all 0.3s var(--ease-out);
  border-radius: 16px;
  position: relative;
}

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

.nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 3px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

.nav-item:hover {
  color: var(--primary);
  background: var(--blue-50);
}

.nav-item span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

/* FAB, Bouton central surélevé */
.nav-fab {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #095797, #0a7fd4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -20px;
  box-shadow: 0 6px 20px rgba(9, 87, 151, 0.35);
  color: white;
  transition: all 0.3s var(--ease-out);
  padding: 0;
  flex-direction: row;
  gap: 0;
}

.nav-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 28px rgba(9, 87, 151, 0.4);
  color: white;
  background: linear-gradient(135deg, #074a7a, #0a7fd4);
}

.nav-fab::before {
  display: none;
}

.nav-fab span {
  display: none;
}

.nav-icon {
  font-size: 22px;
  line-height: 1;
}

.nav-label {
  font-size: 10px;
  font-weight: 600;
}

/* ===== BUTTONS - Enhanced ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: 15px 24px;
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
  width: 100%;
  position: relative;
  overflow: hidden;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.15) 0%, transparent 50%);
  pointer-events: none;
}

.btn-primary {
  background: linear-gradient(145deg, var(--blue-600) 0%, var(--blue-500) 100%);
  color: var(--white);
  box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
  background: linear-gradient(145deg, var(--blue-700) 0%, var(--blue-600) 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(9, 87, 151, 0.35);
}

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

.btn-secondary {
  background: var(--white);
  color: var(--gray-700);
  border: 1.5px solid var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.btn-secondary::after { display: none; }

.btn-secondary:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  transform: translateY(-1px);
}

.btn-gold {
  background: linear-gradient(145deg, var(--gold-600) 0%, var(--gold-500) 100%);
  color: var(--white);
  box-shadow: var(--shadow-gold);
}

.btn-gold:hover {
  background: linear-gradient(145deg, var(--gold-700) 0%, var(--gold-600) 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(212, 165, 0, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--primary);
}

.btn-ghost::after { display: none; }

.btn-ghost:hover {
  background: var(--primary-light);
}

.btn-danger {
  background: linear-gradient(145deg, var(--error) 0%, #dc2626 100%);
  color: var(--white);
}

.btn-white {
  background: var(--white);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.btn-white::after { display: none; }

.btn-outline {
  background: transparent;
  border: 2px solid currentColor;
}

.btn-outline::after { display: none; }

.btn-sm {
  padding: 10px 16px;
  font-size: var(--text-sm);
  border-radius: var(--radius-md);
}

.btn-lg {
  padding: 18px 32px;
  font-size: var(--text-lg);
}

/* ===== CARDS - Enhanced ===== */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s var(--ease-out);
  border: 1px solid rgba(0,0,0,0.03);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-elevated {
  box-shadow: var(--shadow-md);
}

.card-border {
  border: 1px solid var(--gray-200);
}

.card-gradient {
  background: linear-gradient(145deg, var(--blue-700) 0%, var(--blue-500) 60%, var(--blue-400) 100%);
  color: var(--white);
  border: none;
  position: relative;
  overflow: hidden;
}

.card-gradient::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.card-gold {
  background: linear-gradient(145deg, var(--gold-700) 0%, var(--gold-500) 60%, var(--gold-400) 100%);
  color: var(--white);
  border: none;
}

/* ===== BADGES ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.3px;
}

.badge-primary {
  background: var(--primary-light);
  color: var(--primary);
}

.badge-gold {
  background: var(--gold-100);
  color: var(--gold-800);
}

.badge-success {
  background: var(--success-light);
  color: #065f46;
}

.badge-warning {
  background: var(--warning-light);
  color: #92400e;
}

.badge-error {
  background: var(--error-light);
  color: #b91c1c;
}

.badge-gray {
  background: var(--gray-100);
  color: var(--gray-600);
}

/* ===== TAGS ===== */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  background: var(--gray-100);
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  white-space: nowrap;
  border: 1.5px solid transparent;
}

.tag.active {
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-primary);
}

.tag:hover {
  background: var(--gray-200);
  transform: translateY(-1px);
}

.tag.active:hover {
  background: var(--primary-dark);
}

/* ===== AVATARS ===== */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: linear-gradient(145deg, var(--blue-100) 0%, var(--blue-200) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--primary);
  overflow: hidden;
}

.avatar-sm {
  width: 32px;
  height: 32px;
  font-size: var(--text-sm);
}

.avatar-lg {
  width: 56px;
  height: 56px;
  font-size: var(--text-lg);
}

.avatar-xl {
  width: 80px;
  height: 80px;
  font-size: var(--text-2xl);
}

.avatar-group {
  display: flex;
}

.avatar-group .avatar {
  margin-left: -8px;
  border: 2px solid var(--white);
}

.avatar-group .avatar:first-child {
  margin-left: 0;
}

/* ===== FORMS - Enhanced ===== */
.form-group {
  margin-bottom: var(--spacing-md);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--gray-800);
  background: var(--white);
  transition: all 0.3s var(--ease-out);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(9, 87, 151, 0.1);
}

.form-input::placeholder {
  color: var(--gray-400);
}

.form-input.error {
  border-color: var(--error);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--gray-500);
  margin-top: var(--spacing-xs);
}

.form-error {
  font-size: var(--text-xs);
  color: var(--error);
  margin-top: var(--spacing-xs);
}

/* ===== CHECKBOX & RADIO ===== */
.checkbox-group {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  cursor: pointer;
}

.checkbox-input {
  width: 22px;
  height: 22px;
  border: 2px solid var(--gray-300);
  border-radius: 6px;
  cursor: pointer;
  accent-color: var(--primary);
}

.checkbox-label {
  font-size: var(--text-sm);
  color: var(--gray-700);
}

/* ===== LIST ITEMS ===== */
.list-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--white);
  text-decoration: none;
  color: inherit;
  transition: all 0.3s var(--ease-out);
  border-radius: var(--radius-md);
}

.list-item:hover {
  background: var(--gray-50);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.list-item-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
  flex-shrink: 0;
}

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

.list-item-title {
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 2px;
}

.list-item-subtitle {
  font-size: var(--text-sm);
  color: var(--gray-500);
}

.list-item-arrow {
  color: var(--gray-400);
}

/* ===== EVENT CARDS - Enhanced ===== */
.event-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.3s var(--ease-out);
  border: 1px solid rgba(0,0,0,0.03);
}

.event-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.event-card-image {
  height: 150px;
  background: linear-gradient(145deg, var(--blue-400) 0%, var(--blue-600) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  position: relative;
}

.event-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
}

.event-card-content {
  padding: var(--spacing-md);
}

.event-card-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: var(--spacing-xs);
}

.event-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-md);
  font-size: var(--text-sm);
  color: var(--gray-500);
}

.event-card-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ===== SECTIONS ===== */
.section {
  padding: var(--spacing-md);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-md);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 800;
  color: var(--gray-800);
  letter-spacing: -0.2px;
}

.section-link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s;
}

.section-link:hover {
  color: var(--primary-dark);
}

/* ===== TABS ===== */
.tabs {
  display: flex;
  gap: var(--spacing-sm);
  padding: 0 var(--spacing-md);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  background: var(--gray-100);
  color: var(--gray-600);
  border: none;
}

.tab.active {
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-primary);
}

.tab:hover:not(.active) {
  background: var(--gray-200);
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
  height: 8px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-500) 0%, var(--gold-400) 100%);
  border-radius: var(--radius-full);
  transition: width 0.6s var(--ease-out);
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.3) 0%, transparent 100%);
}

/* ===== STEP PROGRESS ===== */
.step-progress {
  display: flex;
  justify-content: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--gray-300);
  transition: all 0.4s var(--ease-spring);
}

.step-dot.active {
  width: 28px;
  background: var(--primary);
}

.step-dot.completed {
  background: var(--primary);
}

/* ===== POINTS DISPLAY ===== */
.points-display {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  color: var(--gold-600);
}

.points-display .icon {
  font-size: 1.2em;
}

/* ===== PROFILE HEADER ===== */
.profile-header {
  text-align: center;
  padding: var(--spacing-lg);
}

.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-full);
  background: linear-gradient(145deg, var(--gold-400) 0%, var(--gold-600) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  margin: 0 auto var(--spacing-md);
  color: var(--white);
  border: 4px solid var(--white);
  box-shadow: var(--shadow-lg);
}

.profile-name {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 4px;
}

.profile-subtitle {
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.8);
}

.profile-stats {
  display: flex;
  justify-content: center;
  gap: var(--spacing-xl);
  margin-top: var(--spacing-lg);
}

.profile-stat {
  text-align: center;
}

.profile-stat-value {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--white);
}

.profile-stat-label {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ===== SUCCESS SCREEN ===== */
.success-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
  padding: var(--spacing-xl);
  text-align: center;
}

.success-icon {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-full);
  background: linear-gradient(145deg, #34d399 0%, #10b981 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-lg);
  animation: successPulse 2s ease-in-out infinite;
  box-shadow: 0 8px 30px rgba(16, 185, 129, 0.3);
}

.success-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: var(--spacing-sm);
}

.success-message {
  font-size: var(--text-base);
  color: var(--gray-600);
  margin-bottom: var(--spacing-xl);
  line-height: 1.6;
}

/* ===== ONBOARDING ===== */
.onboarding-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl);
  text-align: center;
}

.onboarding-icon {
  width: 160px;
  height: 160px;
  border-radius: var(--radius-2xl);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-xl);
  font-size: 72px;
}

.onboarding-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: var(--spacing-md);
}

.onboarding-text {
  font-size: var(--text-base);
  color: var(--gray-600);
  line-height: 1.7;
}

/* ===== SPLASH SCREEN - Enhanced ===== */
.splash-screen {
  min-height: 844px;
  background: linear-gradient(160deg, var(--blue-900) 0%, var(--blue-600) 50%, var(--blue-400) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.splash-screen::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(212,165,0,0.12) 0%, transparent 60%);
  top: -200px;
  right: -200px;
  border-radius: 50%;
}

.splash-screen::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 60%);
  bottom: -100px;
  left: -100px;
  border-radius: 50%;
}

.splash-logo {
  width: 140px;
  height: 140px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-2xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  margin-bottom: var(--spacing-lg);
  animation: logoFloat 3s ease-in-out infinite;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  position: relative;
  z-index: 1;
}

.splash-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 800;
  margin-bottom: var(--spacing-xs);
  letter-spacing: -0.5px;
  position: relative;
  z-index: 1;
}

.splash-subtitle {
  font-size: var(--text-base);
  opacity: 0.7;
  font-weight: 300;
  letter-spacing: 1px;
  position: relative;
  z-index: 1;
}

.splash-loader {
  position: absolute;
  bottom: 100px;
  display: flex;
  gap: 8px;
  z-index: 1;
}

.splash-loader span {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.4);
  animation: pulse 1.4s ease-in-out infinite;
}

.splash-loader span:nth-child(2) {
  animation-delay: 0.2s;
}

.splash-loader span:nth-child(3) {
  animation-delay: 0.4s;
}

/* ===== SEARCH BAR ===== */
.search-bar {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-lg);
  margin: 0 var(--spacing-md) var(--spacing-md);
  border: 1px solid rgba(255,255,255,0.1);
}

.search-bar input {
  flex: 1;
  background: transparent;
  border: none;
  font-size: var(--text-base);
  color: var(--white);
  outline: none;
  font-family: var(--font-body);
}

.search-bar input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.search-bar-light {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  backdrop-filter: none;
}

.search-bar-light input {
  color: var(--gray-800);
}

.search-bar-light input::placeholder {
  color: var(--gray-400);
}

/* ===== SELECTION CARD ===== */
.selection-card {
  padding: var(--spacing-lg);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  text-align: center;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  background: var(--white);
}

.selection-card:hover {
  border-color: var(--primary);
  background: var(--blue-50);
  transform: translateY(-2px);
}

.selection-card.active {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 4px rgba(9, 87, 151, 0.1);
}

.selection-card-icon {
  font-size: 40px;
  margin-bottom: var(--spacing-sm);
}

.selection-card-title {
  font-weight: 600;
  color: var(--gray-800);
}

/* ===== CALLOUT ===== */
.callout {
  display: flex;
  gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--blue-50);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--primary);
}

.callout-icon {
  color: var(--primary);
  flex-shrink: 0;
}

.callout-content {
  flex: 1;
}

.callout-title {
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 4px;
}

.callout-text {
  font-size: var(--text-sm);
  color: var(--gray-600);
  line-height: 1.6;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: var(--spacing-lg);
  padding-bottom: calc(var(--spacing-lg) + var(--safe-bottom));
  width: 100%;
  max-height: 80%;
  overflow-y: auto;
}

.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--gray-300);
  border-radius: var(--radius-full);
  margin: 0 auto var(--spacing-lg);
}

/* ===== BADGE CARD ===== */
.badge-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--spacing-md);
  background: var(--white);
  border-radius: var(--radius-lg);
  text-align: center;
  min-width: 100px;
  transition: all 0.3s var(--ease-out);
  border: 1px solid rgba(0,0,0,0.03);
}

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

.badge-card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: var(--spacing-sm);
}

.badge-card-icon.gold {
  background: linear-gradient(145deg, var(--gold-400) 0%, var(--gold-600) 100%);
}

.badge-card-icon.blue {
  background: linear-gradient(145deg, var(--blue-400) 0%, var(--blue-600) 100%);
}

.badge-card-icon.green {
  background: linear-gradient(145deg, #34d399 0%, #10b981 100%);
}

.badge-card-icon.purple {
  background: linear-gradient(145deg, #a78bfa 0%, #8b5cf6 100%);
}

.badge-card-icon.locked {
  background: var(--gray-200);
  opacity: 0.5;
}

.badge-card-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--gray-700);
}

.badge-card.locked .badge-card-title {
  color: var(--gray-400);
}

/* ===== QR CODE ===== */
.qr-code {
  width: 200px;
  height: 200px;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

/* ===== UTILITIES ===== */
.scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.scroll-x::-webkit-scrollbar {
  display: none;
}

.divider {
  height: 1px;
  background: var(--gray-200);
  margin: var(--spacing-md) 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-md);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.p-md { padding: var(--spacing-md); }
.p-lg { padding: var(--spacing-lg); }
.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-gold { color: var(--gold-600); }
.text-success { color: var(--success); }
.text-gray { color: var(--gray-500); }
.text-white { color: var(--white); }
.text-sm { font-size: var(--text-sm); }
.text-lg { font-size: var(--text-lg); }
.font-display { font-family: var(--font-display); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.bg-white { background: var(--white); }
.bg-gray { background: var(--gray-50); }
.rounded-lg { border-radius: var(--radius-lg); }
.shadow-md { box-shadow: var(--shadow-md); }
.hidden { display: none; }

/* ===== INTEREST GRID ===== */
.interest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-sm);
}

.interest-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-md);
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
}

.interest-item:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.interest-item.selected {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(9, 87, 151, 0.1);
}

.interest-item .icon {
  font-size: 28px;
}

.interest-item .label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--gray-700);
  text-align: center;
}

/* ===== QUICK ACTIONS ===== */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-sm);
  padding: var(--spacing-md);
}

.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: var(--spacing-sm);
  text-decoration: none;
  color: inherit;
  transition: all 0.3s var(--ease-out);
}

.quick-action-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s var(--ease-out);
  border: 1px solid rgba(0,0,0,0.03);
}

.quick-action:hover {
  transform: scale(1.05);
}

.quick-action:hover .quick-action-icon {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.quick-action-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--gray-600);
  text-align: center;
}

/* ===== MESSAGE BUBBLE ===== */
.message-bubble {
  max-width: 80%;
  padding: 10px var(--spacing-md);
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-sm);
  line-height: 1.5;
}

.message-bubble.sent {
  background: linear-gradient(145deg, var(--blue-600) 0%, var(--blue-500) 100%);
  color: var(--white);
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.message-bubble.received {
  background: var(--white);
  color: var(--gray-800);
  margin-right: auto;
  border-bottom-left-radius: 4px;
  box-shadow: var(--shadow-sm);
}

/* ===== EMPTY STATE ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-2xl);
  text-align: center;
}

.empty-state-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin-bottom: var(--spacing-lg);
}

.empty-state-title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: var(--spacing-sm);
}

.empty-state-text {
  font-size: var(--text-sm);
  color: var(--gray-500);
  line-height: 1.6;
}

/* ===== NOTIFICATION DOT ===== */
.notif-dot {
  width: 10px;
  height: 10px;
  background: var(--error);
  border-radius: 50%;
  border: 2px solid var(--white);
  position: absolute;
  top: -2px;
  right: -2px;
}

/* ===== ANIMATIONS ===== */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes pulse {
  0%, 80%, 100% {
    transform: scale(1);
    opacity: 0.4;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes successPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 0 20px rgba(16, 185, 129, 0);
  }
}

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

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes gentlePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(10px, -10px) scale(1.05); }
  66% { transform: translate(-5px, 5px) scale(0.95); }
}

.animate-fade-in {
  animation: fadeIn 0.4s var(--ease-out);
}

.animate-fade-in-up {
  animation: fadeInUp 0.5s var(--ease-out);
}

.animate-scale-in {
  animation: scaleIn 0.4s var(--ease-spring);
}

/* ===== GLASS EFFECT ===== */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.3);
}

.glass-dark {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,0.1);
}

/* ===== TOGGLE SWITCH ===== */
.toggle {
  width: 48px;
  height: 28px;
  background: var(--gray-300);
  border-radius: 14px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s;
  flex-shrink: 0;
}

.toggle.active {
  background: var(--primary);
}

.toggle::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  background: var(--white);
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: transform 0.3s var(--ease-spring);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle.active::after {
  transform: translateX(20px);
}

/* ===== SKELETON LOADING ===== */
.skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
