/* Design AmourMatch (fichier d origine) */
:root {
  --primary: #ff4d6d;
  --primary-dark: #e63950;
  --secondary: #ff8fa3;
  --bg: #fff5f7;
  --card-bg: #ffffff;
  --text: #2d2d2d;
  --text-light: #6b6b6b;
  --success: #2ecc71;
  --gold: #f1c40f;
  --shadow: 0 10px 40px rgba(255, 77, 109, 0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===== LANDING ===== */
#landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(135deg, #fff5f7 0%, #ffe0e6 50%, #ffc2d1 100%);
  text-align: center;
  position: relative;
}

.logo {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.logo span { color: var(--primary-dark); }

.tagline {
  font-size: 1.15rem;
  color: var(--text-light);
  margin-bottom: 2rem;
  max-width: 340px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border: none;
  padding: 1rem 2.2rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(255, 77, 109, 0.4);
  transition: all 0.3s ease;
  font-family: inherit;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(255, 77, 109, 0.5); }

.btn-secondary {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 0.85rem 1.8rem;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.btn-secondary:hover { background: #fff5f7; }

.features {
  display: flex;
  gap: 1rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.feature {
  background: white;
  padding: 0.8rem 1.1rem;
  border-radius: 16px;
  box-shadow: var(--shadow);
  font-size: 0.85rem;
}

/* ===== AUTH ===== */
.auth-box {
  background: white;
  border-radius: 24px;
  padding: 2rem;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow);
  text-align: left;
}
.auth-box h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--primary);
}
.form-group {
  margin-bottom: 1rem;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
  color: var(--text-light);
}
.form-group input, .form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #eee;
  border-radius: 12px;
  font-size: 1rem;
  font-family: inherit;
  transition: border 0.2s;
}
.form-group input:focus, .form-group select:focus {
  outline: none;
  border-color: var(--primary);
}
.auth-switch {
  text-align: center;
  margin-top: 1.2rem;
  font-size: 0.9rem;
  color: var(--text-light);
}
.auth-switch a {
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

/* ===== APP ===== */
#app {
  display: none;
  min-height: 100vh;
  flex-direction: column;
  max-width: 480px;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
}

header {
  background: white;
  padding: 0.9rem 1.3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 15px rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
}
.header-actions {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}
.icon-btn {
  background: none;
  border: none;
  font-size: 1.35rem;
  cursor: pointer;
  color: var(--text-light);
}
.icon-btn:hover { color: var(--primary); }

.user-badge {
  font-size: 0.75rem;
  background: #ffe0e6;
  color: var(--primary-dark);
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-weight: 600;
}

/* Cards */
.cards-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  position: relative;
  min-height: 480px;
}
.card {
  width: 100%;
  max-width: 360px;
  height: 500px;
  background: var(--card-bg);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 15px 50px rgba(0,0,0,0.12);
  position: absolute;
  transition: transform 0.3s ease, opacity 0.3s ease;
  cursor: grab;
  user-select: none;
}
.card > img, .card-photos {
  width: 100%;
  height: 65%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.card-photos { pointer-events: auto; }
.card-photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}
.card-info {
  padding: 1.1rem 1.3rem;
  height: 35%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.card-name {
  font-size: 1.4rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.card-age { font-weight: 400; color: var(--text-light); }
.card-bio {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.35;
  margin-top: 0.25rem;
}
.card-tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}
.tag {
  background: #ffe0e6;
  color: var(--primary-dark);
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-weight: 500;
}

.actions {
  display: flex;
  justify-content: center;
  gap: 1.8rem;
  padding: 1.2rem;
  background: white;
  border-top: 1px solid #f0f0f0;
}
.action-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  font-size: 1.7rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}
.btn-pass {
  background: white;
  color: #999;
  border: 2px solid #eee;
}
.btn-pass:hover { background: #f8f8f8; transform: scale(1.08); }
.btn-like {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 8px 25px rgba(255, 77, 109, 0.4);
}
.btn-like:hover { transform: scale(1.08); }
.btn-super {
  background: white;
  color: #3498db;
  border: 2px solid #eee;
  font-size: 1.4rem;
}
.btn-super:hover { transform: scale(1.08); }

/* Match modal */
#match-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.match-content {
  background: white;
  border-radius: 28px;
  padding: 2.2rem 1.8rem;
  text-align: center;
  max-width: 360px;
  width: 100%;
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes popIn {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.match-title {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.4rem;
}
.match-photos {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.3rem 0;
}
.match-photos img {
  width: 85px;
  height: 85px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid white;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}
.match-text {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
.match-actions {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

#empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-light);
}
#empty-state h2 {
  font-size: 1.4rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.swipe-indicator {
  position: absolute;
  top: 28%;
  font-size: 2.8rem;
  font-weight: 800;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.15s, transform 0.15s;
  z-index: 10;
  pointer-events: none;
  padding: 0.4rem 0.9rem;
  border-radius: 12px;
  border: 4px solid;
}
.like-indicator {
  right: 18px;
  color: var(--success);
  border-color: var(--success);
  transform: rotate(15deg);
}
.pass-indicator {
  left: 18px;
  color: #e74c3c;
  border-color: #e74c3c;
  transform: rotate(-15deg);
}

/* Bottom nav */
.bottom-nav {
  display: flex;
  justify-content: space-around;
  padding: 0.7rem 0;
  background: white;
  border-top: 1px solid #f0f0f0;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 0.68rem;
  cursor: pointer;
  font-family: inherit;
}
.nav-item.active { color: var(--primary); }
.nav-item span { font-size: 1.3rem; }

/* ===== PAGES ===== */
.page {
  display: none;
  flex: 1;
  overflow-y: auto;
  padding: 1.2rem;
  padding-bottom: 2rem;
}
.page.active { display: block; }

/* Pricing */
.pricing-title {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
  color: var(--text);
}
.pricing-sub {
  text-align: center;
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
.plans {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.plan {
  background: white;
  border-radius: 20px;
  padding: 1.4rem;
  box-shadow: var(--shadow);
  position: relative;
  border: 2px solid transparent;
  transition: all 0.2s;
}
.plan.popular {
  border-color: var(--primary);
  transform: scale(1.02);
}
.plan.popular::before {
  content: "LE MOINS CHER";
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.25rem 0.9rem;
  border-radius: 20px;
}
.plan-name {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}
.plan-price {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
}
.plan-price span {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-light);
}
.plan-features {
  list-style: none;
  margin: 1rem 0;
  font-size: 0.88rem;
}
.plan-features li {
  padding: 0.3rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.plan-features li::before {
  content: "✓";
  color: var(--success);
  font-weight: 700;
}
.plan-btn {
  width: 100%;
  padding: 0.8rem;
  border-radius: 50px;
  border: none;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}
.plan-btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}
.plan-btn.outline {
  background: white;
  color: var(--primary);
  border: 2px solid var(--primary);
}

/* Profile page */
.profile-card {
  background: white;
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  text-align: center;
}
.profile-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 4px solid #ffe0e6;
}
.profile-name {
  font-size: 1.4rem;
  font-weight: 600;
}
.profile-info {
  color: var(--text-light);
  font-size: 0.9rem;
  margin: 0.5rem 0 1.2rem;
}
.profile-stats {
  display: flex;
  justify-content: space-around;
  margin: 1.2rem 0;
  padding: 1rem 0;
  border-top: 1px solid #f0f0f0;
  border-bottom: 1px solid #f0f0f0;
}
.stat {
  text-align: center;
}
.stat-num {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--primary);
}
.stat-label {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* Admin */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
}
.admin-header h2 {
  font-size: 1.3rem;
  color: var(--primary);
}
.admin-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}
.stat-box {
  background: white;
  border-radius: 16px;
  padding: 1rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.stat-box .num {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
}
.stat-box .label {
  font-size: 0.75rem;
  color: var(--text-light);
}
.user-list {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.user-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #f5f5f5;
}
.user-row:last-child { border-bottom: none; }
.user-row img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}
.user-row .info {
  flex: 1;
}
.user-row .name {
  font-weight: 600;
  font-size: 0.95rem;
}
.user-row .meta {
  font-size: 0.75rem;
  color: var(--text-light);
}
.badge {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  font-weight: 600;
}
.badge-free { background: #eee; color: #666; }
.badge-premium { background: #ffe0e6; color: var(--primary-dark); }
.badge-admin { background: #e8f5e9; color: #2e7d32; }

.admin-login {
  max-width: 320px;
  margin: 3rem auto;
  text-align: center;
}

/* Messages page */
.msg-item {
  background: white;
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: 0.8rem;
  display: flex;
  gap: 0.9rem;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  cursor: pointer;
}
.msg-item img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}
.msg-item .content { flex: 1; }
.msg-item .name { font-weight: 600; font-size: 0.95rem; }
.msg-item .preview {
  font-size: 0.8rem;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.msg-item .time {
  font-size: 0.7rem;
  color: var(--text-light);
}

/* Toast */
#toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #2d2d2d;
  color: white;
  padding: 0.8rem 1.4rem;
  border-radius: 50px;
  font-size: 0.9rem;
  z-index: 2000;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
}
#toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}






.btn-report {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.45);
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.btn-report:hover { background: rgba(198,40,40,0.85); }

.report-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.report-content {
  background: white;
  border-radius: 20px;
  padding: 1.5rem;
  max-width: 340px;
  width: 100%;
  text-align: center;
}
.report-content h3 {
  margin-bottom: 1rem;
  color: var(--text);
}
.report-reasons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.report-reason {
  padding: 0.7rem 1rem;
  border: 2px solid #eee;
  border-radius: 12px;
  background: white;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: all 0.15s;
}
.report-reason:hover {
  border-color: var(--primary);
  background: #fff5f7;
}




/* Photo upload */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin: 1rem 0;
}
.photo-slot {
  aspect-ratio: 1;
  border-radius: 14px;
  background: #f5f5f5;
  border: 2px dashed #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s;
}
.photo-slot:hover { border-color: var(--primary); }
.photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-slot .add-icon {
  font-size: 1.8rem;
  color: #bbb;
}
.photo-slot .remove-photo {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(0,0,0,0.6);
  color: white;
  border: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.photo-hint {
  font-size: 0.8rem;
  color: #888;
  text-align: center;
  margin-bottom: 0.5rem;
}
/* Multi photo on card */
.card-photos {
  position: relative;
  height: 65%;
}
.card-photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}
.card-photos img.active { display: block; }
.photo-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
}
.photo-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
}
.photo-dot.active { background: white; }

/* Advanced stats */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin-bottom: 1.2rem;
}
.stat-card {
  background: white;
  border-radius: 14px;
  padding: 1rem;
  box-shadow: var(--shadow);
  text-align: center;
}
.stat-card .num {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}
.stat-card .label {
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: 0.2rem;
}
.stat-card.highlight {
  background: linear-gradient(135deg, #fff5f7, #ffe0e6);
  border: 1px solid #ffc2d1;
}
.log-list {
  background: white;
  border-radius: 14px;
  max-height: 220px;
  overflow-y: auto;
  box-shadow: var(--shadow);
}
.log-item {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #f5f5f5;
  font-size: 0.8rem;
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}
.log-item:last-child { border-bottom: none; }
.log-time {
  color: #999;
  white-space: nowrap;
  font-size: 0.72rem;
  min-width: 55px;
}
.log-text { color: var(--text); flex: 1; }
.section-title {
  font-size: 1.05rem;
  margin: 1.3rem 0 0.7rem;
  color: var(--text);
}

/* User data management */
.user-detail-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.user-detail-content {
  background: white;
  border-radius: 20px;
  padding: 1.5rem;
  max-width: 380px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
}
.user-detail-content h3 {
  margin-bottom: 1rem;
  color: var(--primary);
}
.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
}
.detail-row .label { color: #888; }
.detail-row .value { font-weight: 600; text-align: right; max-width: 60%; word-break: break-word; }
.plan-select {
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  border: 2px solid #eee;
  font-family: inherit;
  font-size: 0.85rem;
}

/* Moderation */
.mod-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.mod-tab {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  border: 2px solid #eee;
  background: white;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.mod-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.mod-actions {
  display: flex;
  gap: 0.4rem;
}
.mod-btn {
  border: none;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.mod-btn.approve { background: #e8f5e9; color: #2e7d32; }
.mod-btn.reject { background: #ffebee; color: #c62828; }
.mod-btn.ban { background: #fce4ec; color: #ad1457; }
.status-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  border-radius: 8px;
  font-weight: 600;
}
.status-pending { background: #fff3e0; color: #e65100; }
.status-approved { background: #e8f5e9; color: #2e7d32; }
.status-rejected { background: #ffebee; color: #c62828; }
.status-banned { background: #f3e5f5; color: #6a1b9a; }

/* Who liked me */
.liked-you-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  background: white;
  padding: 0.9rem;
  border-radius: 16px;
  margin-bottom: 0.7rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.liked-you-item img {
  width: 55px;
  height: 55px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary);
}
.liked-you-item .info { flex: 1; }
.liked-you-item .name { font-weight: 600; }
.liked-you-item .meta { font-size: 0.8rem; color: var(--text-light); }

/* Icebreakers */
.icebreaker {
  background: #f0f7ff;
  border: 1px solid #bbdefb;
  border-radius: 14px;
  padding: 0.8rem 1rem;
  margin: 0.5rem 0;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s;
}
.icebreaker:hover { background: #e3f2fd; transform: translateX(4px); }

/* Verified badge */
.verified {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #e3f2fd;
  color: #1565c0;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
}

/* Boost */
.boost-banner {
  background: linear-gradient(135deg, #7c4dff, #536dfe);
  color: white;
  border-radius: 16px;
  padding: 1.2rem;
  text-align: center;
  margin-bottom: 1rem;
}
.boost-banner h3 { margin-bottom: 0.4rem; }
.boost-banner p { font-size: 0.85rem; opacity: 0.9; margin-bottom: 0.8rem; }

/* Referral */
.referral-box {
  background: linear-gradient(135deg, #fff8e1, #ffecb3);
  border-radius: 16px;
  padding: 1.2rem;
  text-align: center;
  margin-top: 1rem;
}
.referral-code {
  background: white;
  border: 2px dashed #ffa000;
  border-radius: 12px;
  padding: 0.7rem 1rem;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: #e65100;
  margin: 0.8rem 0;
  display: inline-block;
}

/* Who liked locked */
.locked-overlay {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}

/* Nearby map */
.nearby-box {
  background: white;
  border-radius: 20px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}
.nearby-box h3 {
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
  color: var(--text);
}
.map-container {
  background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
  border-radius: 16px;
  height: 220px;
  position: relative;
  overflow: hidden;
  margin-bottom: 1rem;
}
.map-pin {
  position: absolute;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  cursor: pointer;
  transition: transform 0.2s;
}
.map-pin:hover { transform: scale(1.15); }
.map-pin.me {
  border-color: #2196f3;
  background: #e3f2fd;
  z-index: 5;
}
.nearby-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.nearby-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.7rem;
  background: #fafafa;
  border-radius: 14px;
}
.nearby-item img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}
.nearby-item .info { flex: 1; }
.nearby-item .name { font-weight: 600; font-size: 0.95rem; }
.nearby-item .dist { font-size: 0.8rem; color: var(--text-light); }
.nearby-item .btn-mini {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

/* Security tips */
.security-box {
  background: #fff8f0;
  border: 2px solid #ffcc80;
  border-radius: 16px;
  padding: 1.2rem;
  margin-top: 1.5rem;
  text-align: left;
}
.security-box h3 {
  font-size: 1.05rem;
  color: #e65100;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.security-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.security-box li {
  font-size: 0.85rem;
  color: #5d4037;
  padding: 0.35rem 0;
  padding-left: 1.4rem;
  position: relative;
  line-height: 1.4;
}
.security-box li::before {
  content: "🛡️";
  position: absolute;
  left: 0;
  font-size: 0.8rem;
}





/* Notifications */
.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--primary);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.notif-btn { position: relative; }
.notif-panel {
  display: none;
  position: absolute;
  top: 55px;
  right: 10px;
  width: 300px;
  max-width: calc(100vw - 20px);
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  z-index: 500;
  max-height: 360px;
  overflow-y: auto;
}
.notif-panel.open { display: block; }
.notif-header {
  padding: 0.9rem 1rem;
  font-weight: 600;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.notif-item {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #f5f5f5;
  font-size: 0.85rem;
  cursor: pointer;
}
.notif-item:hover { background: #fafafa; }
.notif-item.unread { background: #fff5f7; }
.notif-item .n-time { font-size: 0.72rem; color: #999; margin-top: 0.2rem; }

/* Online dots on map */
.map-pin.online::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: #2ecc71;
  border: 2px solid white;
  border-radius: 50%;
}

/* Events */
.event-card {
  background: white;
  border-radius: 16px;
  padding: 1rem;
  margin-bottom: 0.8rem;
  box-shadow: var(--shadow);
}
.event-card h4 { margin-bottom: 0.3rem; }
.event-meta { font-size: 0.8rem; color: #666; margin-bottom: 0.6rem; }

/* Games */
.game-card {
  background: white;
  border-radius: 16px;
  padding: 1.2rem;
  margin-bottom: 0.8rem;
  box-shadow: var(--shadow);
  text-align: center;
}
.game-board {
  display: grid;
  grid-template-columns: repeat(3, 70px);
  gap: 6px;
  justify-content: center;
  margin: 1rem 0;
}
.game-cell {
  width: 70px;
  height: 70px;
  border: 2px solid #eee;
  border-radius: 12px;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: #fafafa;
  font-weight: 700;
}
.game-cell:hover { border-color: var(--primary); }
.quiz-option {
  display: block;
  width: 100%;
  padding: 0.8rem;
  margin: 0.4rem 0;
  border: 2px solid #eee;
  border-radius: 12px;
  background: white;
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  text-align: left;
}
.quiz-option:hover { border-color: var(--primary); background: #fff5f7; }

/* ===== NETWORK / PERF ===== */
img {
  content-visibility: auto;
  background: #f0f0f0;
}
.card, .msg-item, .liked-you-item, .nearby-item, .user-row {
  content-visibility: auto;
  contain-intrinsic-size: auto 80px;
}
/* Skeleton placeholder while loading */
.card-photos, .card > img {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
}

/* ===== CHROME ANDROID FIXES ===== */
/* Address bar resize */
#app, #landing, #auth {
  min-height: 100vh;
  min-height: 100dvh;
}
/* Better tap targets (Material guideline ~48px) */
.nav-item {
  min-height: 48px;
  min-width: 48px;
  justify-content: center;
}
.icon-btn {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
/* Reduce paint issues while dragging cards */
.card {
  will-change: transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
/* File input works better with capture option on Android */
/* Overscroll glow */
.page {
  overscroll-behavior: contain;
}

/* ===== SAFARI iOS FIXES ===== */
html {
  -webkit-text-size-adjust: 100%;
  height: -webkit-fill-available;
}
body {
  min-height: 100vh;
  min-height: -webkit-fill-available;
  min-height: 100dvh;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}
/* Prevent iOS zoom on input focus (font must be >= 16px) */
input, select, textarea {
  font-size: 16px !important;
}
/* Smooth scrolling */
.page, .log-list, .user-detail-content {
  -webkit-overflow-scrolling: touch;
}
/* Fix fixed elements on iOS */
#match-modal, .report-modal, .user-detail-modal {
  position: fixed;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
/* Buttons look better on iOS */
button, .btn-primary, .btn-secondary, .action-btn, .mod-btn, .plan-btn {
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
/* Card image rendering */
.card img, .card-photos img, .photo-slot img {
  -webkit-user-drag: none;
  user-select: none;
}
/* Safe areas already partially handled; reinforce */
#app {
  min-height: 100vh;
  min-height: -webkit-fill-available;
  min-height: 100dvh;
}
/* Auth full height on iOS */
#auth, #landing {
  min-height: 100vh;
  min-height: -webkit-fill-available;
  min-height: 100dvh;
}

/* ===== MOBILE COMPATIBILITY ===== */
@media (max-width: 480px) {
  .logo { font-size: 2.2rem; }
  .tagline { font-size: 1rem; padding: 0 0.5rem; }
  .btn-primary, .btn-secondary { padding: 0.9rem 1.8rem; font-size: 1rem; }

  #app { max-width: 100%; }

  header { padding: 0.7rem 1rem; }
  .header-logo { font-size: 1.15rem; }
  .icon-btn { font-size: 1.25rem; }

  .cards-container {
    min-height: 420px;
    padding: 0.8rem;
  }
  .card {
    height: 460px;
    max-width: 100%;
    border-radius: 20px;
  }
  .card > img, .card-photos { height: 62%; }
  .card-info { padding: 1rem; height: 38%; }
  .card-name { font-size: 1.25rem; }
  .card-bio { font-size: 0.85rem; }

  .actions { gap: 1.4rem; padding: 1rem; }
  .action-btn { width: 56px; height: 56px; font-size: 1.5rem; }

  .bottom-nav { padding: 0.55rem 0; }
  .nav-item { font-size: 0.62rem; }
  .nav-item span { font-size: 1.2rem; }

  .page { padding: 1rem; padding-bottom: 1.5rem; }

  .plans { gap: 0.8rem; }
  .plan { padding: 1.1rem; }
  .plan-price { font-size: 1.5rem; }

  .match-content, .report-content, .user-detail-content, .auth-box {
    max-width: 100%;
    margin: 0 0.5rem;
    padding: 1.3rem;
  }

  .photo-grid { gap: 0.5rem; }
  .stats-grid { gap: 0.5rem; }
  .stat-card .num { font-size: 1.3rem; }

  .nearby-box { padding: 1rem; }
  .map-container { height: 180px; }

  #toast {
    bottom: 80px;
    font-size: 0.85rem;
    padding: 0.7rem 1.2rem;
    max-width: 90%;
  }

  .swipe-indicator { font-size: 2.2rem; }
}

@media (max-width: 360px) {
  .card { height: 420px; }
  .card-name { font-size: 1.15rem; }
  .action-btn { width: 50px; height: 50px; font-size: 1.35rem; }
  .features { gap: 0.5rem; }
  .feature { font-size: 0.75rem; padding: 0.6rem 0.8rem; }
}

/* Safe area for notched phones (iPhone X+) */
@supports (padding: max(0px)) {
  .bottom-nav {
    padding-bottom: max(0.55rem, env(safe-area-inset-bottom));
  }
  header {
    padding-top: max(0.7rem, env(safe-area-inset-top));
  }
}

/* Prevent pull-to-refresh interfering with swipe */
body {
  overscroll-behavior-y: contain;
}
.cards-container {
  touch-action: pan-y;
}
.card {
  touch-action: none;
}
