/*
Theme Name: HeartMatch Pro
Theme URI: https://matthiasschmehl.de
Author: Matthias Schmehl
Author URI: https://matthiasschmehl.de
Description: DSGVO-konforme Dating-App als Progressive Web App. GPS-Tracking, tägliche Selfie-Verifikation, Video- & Text-Chat, Screenshot-Schutz. Zielgruppe: Singles 20–40 in Deutschland.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: heartmatch-pro
Tags: dating, pwa, gps, chat, video, dsgvo, responsive, accessibility-ready
*/

/* ============================================================
   DESIGN TOKENS
   Palette: Tiefdunkles Midnight-Plum + Coral-Rose Gradient
   Signature: Liquid-Mesh-Hintergrund mit Glassmorphism-Cards
   ============================================================ */
:root {
  /* Core Palette */
  --rose:        #FF3E6C;
  --rose-dark:   #CC2255;
  --rose-light:  #FF7096;
  --coral:       #FF6B35;
  --violet:      #7C3AED;
  --violet-mid:  #9F67FF;
  --violet-light:#C4A8FF;
  --midnight:    #0F0A1E;
  --deep:        #1A1230;
  --card:        #221840;
  --card-hover:  #2D1F52;
  --border:      rgba(255,255,255,0.08);
  --border-glow: rgba(255,62,108,0.4);
  --text:        #F0EAF8;
  --text-muted:  #9B8FBF;
  --text-dim:    #5D547A;
  --white:       #FFFFFF;
  --success:     #00D68F;
  --warning:     #FFB020;
  --danger:      #FF3E3E;
  --online:      #00D68F;

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #FF3E6C 0%, #FF6B35 50%, #7C3AED 100%);
  --grad-card:    linear-gradient(145deg, rgba(255,62,108,0.08) 0%, rgba(124,58,237,0.08) 100%);
  --grad-mesh:    radial-gradient(ellipse at 20% 50%, rgba(124,58,237,0.3) 0%, transparent 50%),
                  radial-gradient(ellipse at 80% 20%, rgba(255,62,108,0.3) 0%, transparent 50%),
                  radial-gradient(ellipse at 60% 80%, rgba(255,107,53,0.2) 0%, transparent 50%);

  /* Typography */
  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-body:    'DM Sans', 'Inter', sans-serif;
  --font-mono:    'DM Mono', monospace;

  /* Spacing */
  --sp-xs:  0.25rem;
  --sp-sm:  0.5rem;
  --sp-md:  1rem;
  --sp-lg:  1.5rem;
  --sp-xl:  2.5rem;
  --sp-xxl: 5rem;

  /* Radii */
  --r-sm:   8px;
  --r-md:   16px;
  --r-lg:   24px;
  --r-xl:   32px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-card:  0 8px 32px rgba(0,0,0,0.4);
  --shadow-glow:  0 0 40px rgba(255,62,108,0.25);
  --shadow-blue:  0 0 40px rgba(124,58,237,0.3);

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --tr:   0.3s var(--ease);

  /* App Shell */
  --nav-h: 64px;
  --tab-h: 72px;
}

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

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  background: var(--midnight);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  /* Screenshot protection hint for browsers */
  -webkit-user-select: none;
  user-select: none;
}

/* Allow text selection only in chat */
.chat-message-text, .form-input, .form-textarea { -webkit-user-select: text; user-select: text; }

/* Skip link */
.skip-link {
  position: absolute; top: -100%; left: 1rem;
  background: var(--rose); color: #fff;
  padding: 0.5rem 1rem; border-radius: 0 0 var(--r-sm) var(--r-sm);
  text-decoration: none; font-weight: 700; z-index: 9999;
}
.skip-link:focus { top: 0; }

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--rose-light); text-decoration: none; }
a:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; border-radius: var(--r-sm); }
button:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; border-radius: var(--r-sm); }
ul { list-style: none; }

/* ============================================================
   MESH BACKGROUND
   ============================================================ */
.mesh-bg {
  position: fixed; inset: 0; z-index: 0;
  background: var(--midnight);
  overflow: hidden;
  pointer-events: none;
}
.mesh-bg::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--grad-mesh);
  animation: meshFloat 12s ease-in-out infinite alternate;
}
.mesh-bg::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255,255,255,0.04) 1px, transparent 0);
  background-size: 40px 40px;
}
@keyframes meshFloat {
  0%   { transform: scale(1) rotate(0deg); }
  100% { transform: scale(1.1) rotate(3deg); }
}

/* ============================================================
   APP SHELL
   ============================================================ */
#app-shell {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: flex; flex-direction: column;
}

/* ── Top Navigation Bar ──────────────────────────────────── */
#top-nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h); z-index: 500;
  background: rgba(15,10,30,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 var(--sp-lg);
  gap: var(--sp-md);
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 700;
  background: var(--grad-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  flex: 1;
}
.nav-logo span { font-style: italic; }
.nav-actions { display: flex; gap: var(--sp-sm); align-items: center; }
.nav-icon-btn {
  width: 40px; height: 40px;
  border-radius: var(--r-full);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 1.1rem;
  transition: var(--tr);
  position: relative;
}
.nav-icon-btn:hover { background: rgba(255,62,108,0.15); color: var(--rose); border-color: var(--border-glow); }
.nav-icon-btn .badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--rose); color: #fff;
  font-size: 0.6rem; font-weight: 800;
  width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* ── Bottom Tab Bar ──────────────────────────────────────── */
#bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--tab-h); z-index: 500;
  background: rgba(15,10,30,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex; align-items: stretch;
}
.tab-item {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 4px;
  cursor: pointer;
  color: var(--text-dim);
  font-size: 0.65rem; font-weight: 600;
  letter-spacing: 0.04em; text-transform: uppercase;
  transition: var(--tr);
  border: none; background: none;
  padding: var(--sp-sm) var(--sp-xs);
  position: relative;
}
.tab-item svg { width: 22px; height: 22px; transition: var(--tr); }
.tab-item.active { color: var(--rose); }
.tab-item.active svg { filter: drop-shadow(0 0 6px var(--rose)); }
.tab-item.active::before {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 32px; height: 2px;
  background: var(--grad-primary);
  border-radius: 0 0 var(--r-sm) var(--r-sm);
}
.tab-item:hover:not(.active) { color: var(--text-muted); }
.tab-item .tab-badge {
  position: absolute; top: 8px; right: calc(50% - 14px);
  background: var(--rose); color: #fff;
  font-size: 0.55rem; font-weight: 800;
  width: 14px; height: 14px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
}
.tab-item .tab-badge.show { display: flex; }

/* ── Page Container ──────────────────────────────────────── */
.page {
  display: none;
  flex: 1;
  padding-top: var(--nav-h);
  padding-bottom: var(--tab-h);
  min-height: 100vh;
  overflow-y: auto;
}
.page.active { display: block; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--sp-sm);
  padding: 0.75rem 1.75rem;
  border: none; border-radius: var(--r-full);
  font-family: var(--font-body);
  font-size: 0.9rem; font-weight: 700;
  cursor: pointer; transition: var(--tr);
  white-space: nowrap; text-decoration: none;
}
.btn--primary {
  background: var(--grad-primary);
  color: #fff;
  box-shadow: 0 4px 24px rgba(255,62,108,0.4);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(255,62,108,0.5); }
.btn--primary:active { transform: translateY(0); }
.btn--ghost {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn--ghost:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.2); }
.btn--danger { background: linear-gradient(135deg, var(--danger), #CC0000); color: #fff; }
.btn--success { background: linear-gradient(135deg, var(--success), #00A870); color: #000; }
.btn--full { width: 100%; }
.btn--lg { padding: 1rem 2rem; font-size: 1rem; }
.btn--sm { padding: 0.5rem 1rem; font-size: 0.8rem; }
.btn--icon { width: 44px; height: 44px; padding: 0; border-radius: var(--r-full); font-size: 1.1rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* Pulse animation for CTA */
@keyframes pulseRose {
  0%,100% { box-shadow: 0 4px 24px rgba(255,62,108,0.4); }
  50%      { box-shadow: 0 4px 40px rgba(255,62,108,0.7), 0 0 0 8px rgba(255,62,108,0.1); }
}
.btn--pulse { animation: pulseRose 2s infinite; }

/* ============================================================
   CARDS / GLASS MORPHISM
   ============================================================ */
.glass-card {
  background: rgba(34,24,64,0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
  transition: var(--tr);
}
.glass-card:hover { border-color: rgba(255,62,108,0.25); box-shadow: var(--shadow-glow); }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { display: flex; flex-direction: column; gap: var(--sp-xs); margin-bottom: var(--sp-md); }
.form-label { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.form-input, .form-textarea, .form-select {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0.85rem 1rem;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: var(--tr);
  width: 100%;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(255,62,108,0.15);
  background: rgba(255,62,108,0.05);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-dim); }
.form-select { appearance: none; cursor: pointer; }
.form-select option { background: var(--deep); }
.form-textarea { resize: vertical; min-height: 100px; }

/* Checkbox / Radio custom */
.form-check {
  display: flex; align-items: flex-start;
  gap: var(--sp-sm); cursor: pointer;
  font-size: 0.9rem; color: var(--text-muted);
}
.form-check input[type="checkbox"],
.form-check input[type="radio"] { accent-color: var(--rose); width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }

/* Toggle Switch */
.toggle-wrap { display: flex; align-items: center; gap: var(--sp-md); }
.toggle-switch {
  position: relative; width: 52px; height: 28px; flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: rgba(255,255,255,0.1);
  border-radius: var(--r-full);
  cursor: pointer; transition: var(--tr);
}
.toggle-slider::before {
  content: '';
  position: absolute; left: 3px; top: 3px;
  width: 22px; height: 22px;
  background: var(--text-muted);
  border-radius: 50%; transition: var(--tr);
}
.toggle-switch input:checked + .toggle-slider { background: var(--grad-primary); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(24px); background: #fff; }

/* ============================================================
   LANDING / ONBOARDING
   ============================================================ */
#page-landing {
  display: flex; flex-direction: column;
  min-height: 100vh; padding: 0;
  overflow: hidden;
}
.landing-hero {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: var(--sp-xl) var(--sp-lg);
  text-align: center;
  overflow: hidden;
}
.landing-hero-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15,10,30,0.4) 0%, rgba(15,10,30,0.9) 100%),
    url('https://images.unsplash.com/photo-1516589091380-5d8e87df6999?w=800&q=80') center/cover no-repeat;
  z-index: 0;
}
.landing-hero-content { position: relative; z-index: 1; max-width: 480px; }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-xs);
  background: rgba(255,62,108,0.15);
  border: 1px solid rgba(255,62,108,0.3);
  color: var(--rose-light);
  padding: var(--sp-xs) var(--sp-md);
  border-radius: var(--r-full);
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  margin-bottom: var(--sp-lg);
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 8vw, 4.5rem);
  font-weight: 700; line-height: 1.1;
  margin-bottom: var(--sp-lg);
}
.hero-title em { font-style: italic; background: var(--grad-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero-subtitle { color: var(--text-muted); font-size: 1.05rem; line-height: 1.7; margin-bottom: var(--sp-xl); }

/* Floating profile bubbles */
.hero-bubbles { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.bubble {
  position: absolute;
  border-radius: 50%;
  border: 3px solid;
  overflow: hidden;
  animation: bubbleFloat var(--dur, 6s) ease-in-out infinite alternate;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.bubble img { width: 100%; height: 100%; object-fit: cover; }
@keyframes bubbleFloat {
  0%   { transform: translateY(0) scale(1); }
  100% { transform: translateY(-20px) scale(1.03); }
}

/* Feature pills */
.hero-features {
  display: flex; flex-wrap: wrap; gap: var(--sp-sm);
  justify-content: center; margin-top: var(--sp-xl);
}
.feature-pill {
  display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  padding: var(--sp-xs) var(--sp-md);
  border-radius: var(--r-full);
  font-size: 0.8rem; color: var(--text-muted);
  backdrop-filter: blur(10px);
}

/* Onboarding stepper */
.onboarding-wrap {
  display: none; position: fixed; inset: 0; z-index: 800;
  background: rgba(15,10,30,0.97);
  backdrop-filter: blur(20px);
  overflow-y: auto; padding: var(--sp-xl) var(--sp-lg);
  flex-direction: column; align-items: center;
}
.onboarding-wrap.open { display: flex; }
.onboarding-step { display: none; width: 100%; max-width: 460px; text-align: center; }
.onboarding-step.active { display: block; }
.step-indicator {
  display: flex; justify-content: center; gap: var(--sp-sm); margin-bottom: var(--sp-xl);
}
.step-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--text-dim); transition: var(--tr);
}
.step-dot.active { background: var(--rose); width: 24px; border-radius: var(--r-full); }
.step-icon { font-size: 3rem; margin-bottom: var(--sp-md); }
.step-title { font-family: var(--font-display); font-size: 1.8rem; margin-bottom: var(--sp-sm); }
.step-desc { color: var(--text-muted); margin-bottom: var(--sp-xl); }

/* ============================================================
   DISCOVER / SWIPE CARDS
   ============================================================ */
#page-discover { padding: var(--sp-md); }
.discover-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--sp-md) 0;
}
.discover-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }
.filter-btn {
  display: flex; align-items: center; gap: var(--sp-xs);
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  color: var(--text-muted); border-radius: var(--r-full);
  padding: var(--sp-xs) var(--sp-md); font-size: 0.85rem; cursor: pointer;
  transition: var(--tr);
}
.filter-btn:hover { border-color: var(--rose); color: var(--rose); }

/* Profile Swipe Stack */
.swipe-stack {
  position: relative;
  height: 520px;
  margin: var(--sp-md) 0;
}
.swipe-card {
  position: absolute; inset: 0;
  border-radius: var(--r-xl);
  overflow: hidden;
  cursor: grab;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
  user-select: none;
  box-shadow: var(--shadow-card);
  touch-action: pan-y;
}
.swipe-card:nth-child(2) { transform: scale(0.96) translateY(8px); z-index: 1; }
.swipe-card:nth-child(3) { transform: scale(0.92) translateY(16px); z-index: 0; }
.swipe-card:first-child  { z-index: 2; }
.swipe-card.dragging { cursor: grabbing; transition: none; }
.swipe-card.gone-left  { transform: translateX(-150%) rotate(-20deg) !important; opacity: 0; }
.swipe-card.gone-right { transform: translateX(150%) rotate(20deg) !important; opacity: 0; }

.swipe-card-img {
  width: 100%; height: 100%; object-fit: cover;
  pointer-events: none;
}
.swipe-card-gradient {
  position: absolute; bottom: 0; left: 0; right: 0; height: 60%;
  background: linear-gradient(to top, rgba(15,10,30,0.98) 0%, rgba(15,10,30,0.6) 60%, transparent 100%);
}
.swipe-card-info {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: var(--sp-lg);
}
.swipe-card-name {
  font-family: var(--font-display);
  font-size: 1.8rem; font-weight: 700; margin-bottom: var(--sp-xs);
}
.swipe-card-age { color: var(--rose-light); font-weight: 700; }
.swipe-card-loc { display: flex; align-items: center; gap: 4px; color: var(--text-muted); font-size: 0.85rem; margin: var(--sp-xs) 0; }
.swipe-card-bio { color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; margin-bottom: var(--sp-md); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.swipe-tags { display: flex; flex-wrap: wrap; gap: var(--sp-xs); }
.swipe-tag {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
  color: var(--text-muted); padding: 3px 10px;
  border-radius: var(--r-full); font-size: 0.75rem;
}

/* Like/Nope indicator overlay */
.like-indicator {
  position: absolute; top: 2rem; left: 2rem;
  background: var(--success); color: #fff;
  border: 3px solid #fff; border-radius: var(--r-sm);
  padding: 4px 12px; font-weight: 900; font-size: 1.3rem;
  letter-spacing: 0.1em; transform: rotate(-15deg);
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.nope-indicator {
  position: absolute; top: 2rem; right: 2rem;
  background: var(--danger); color: #fff;
  border: 3px solid #fff; border-radius: var(--r-sm);
  padding: 4px 12px; font-weight: 900; font-size: 1.3rem;
  letter-spacing: 0.1em; transform: rotate(15deg);
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}

/* GPS Verified badge */
.verified-badge {
  position: absolute; top: var(--sp-md); right: var(--sp-md);
  display: flex; align-items: center; gap: 4px;
  background: rgba(0,214,143,0.2); border: 1px solid var(--success);
  color: var(--success); border-radius: var(--r-full);
  padding: 4px 10px; font-size: 0.72rem; font-weight: 700;
  backdrop-filter: blur(8px);
}

/* Action buttons */
.swipe-actions {
  display: flex; align-items: center; justify-content: center;
  gap: var(--sp-lg); padding: var(--sp-md) 0;
}
.action-btn {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; cursor: pointer; border: none;
  transition: var(--tr); box-shadow: var(--shadow-card);
}
.action-nope  { background: rgba(255,62,62,0.15); color: var(--danger); border: 2px solid rgba(255,62,62,0.3); }
.action-super { background: rgba(124,58,237,0.15); color: var(--violet-mid); border: 2px solid rgba(124,58,237,0.3); }
.action-like  { background: rgba(0,214,143,0.15); color: var(--success); border: 2px solid rgba(0,214,143,0.3); }
.action-nope:hover  { background: var(--danger); color: #fff; transform: scale(1.1); }
.action-super:hover { background: var(--violet); color: #fff; transform: scale(1.1); }
.action-like:hover  { background: var(--success); color: #000; transform: scale(1.1); }
.action-btn-xl { width: 68px; height: 68px; font-size: 1.8rem; }

/* Match Banner */
.match-banner {
  display: none; position: fixed; inset: 0; z-index: 900;
  background: rgba(15,10,30,0.95);
  backdrop-filter: blur(20px);
  flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: var(--sp-xl);
}
.match-banner.show { display: flex; }
.match-title { font-family: var(--font-display); font-size: clamp(2rem,8vw,3.5rem); background: var(--grad-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: var(--sp-sm); }
@keyframes heartBeat { 0%,100%{transform:scale(1);}50%{transform:scale(1.3);} }
.match-heart { font-size: 4rem; animation: heartBeat 0.8s ease-in-out 3; }
.match-avatars { display: flex; align-items: center; gap: var(--sp-lg); margin: var(--sp-xl) 0; }
.match-avatar { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; border: 4px solid; }

/* ============================================================
   MATCHES / CHAT LIST
   ============================================================ */
.section-head {
  padding: var(--sp-lg) var(--sp-lg) var(--sp-sm);
  font-family: var(--font-display); font-size: 1.5rem; font-weight: 700;
}
/* New Matches Row */
.new-matches-row {
  display: flex; gap: var(--sp-md);
  overflow-x: auto; padding: 0 var(--sp-lg) var(--sp-md);
  scrollbar-width: none;
}
.new-matches-row::-webkit-scrollbar { display: none; }
.new-match-item {
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-xs);
  flex-shrink: 0; cursor: pointer;
}
.new-match-avatar-wrap {
  position: relative; width: 64px; height: 64px;
}
.new-match-avatar {
  width: 64px; height: 64px; border-radius: 50%; object-fit: cover;
  border: 2px solid;
  animation: gradientBorder 3s ease infinite;
}
@keyframes gradientBorder {
  0%,100% { border-color: var(--rose); }
  50%      { border-color: var(--violet); }
}
.new-match-online {
  position: absolute; bottom: 2px; right: 2px;
  width: 14px; height: 14px; background: var(--online);
  border: 2px solid var(--midnight); border-radius: 50%;
}
.new-match-name { font-size: 0.75rem; color: var(--text-muted); text-align: center; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Chat List */
.chat-list { padding: 0 var(--sp-md); }
.chat-item {
  display: flex; align-items: center; gap: var(--sp-md);
  padding: var(--sp-md);
  border-radius: var(--r-md);
  cursor: pointer; transition: var(--tr);
  border-bottom: 1px solid var(--border);
}
.chat-item:hover { background: rgba(255,255,255,0.04); }
.chat-item:last-child { border-bottom: none; }
.chat-avatar-wrap { position: relative; flex-shrink: 0; }
.chat-avatar { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; }
.chat-online-dot {
  position: absolute; bottom: 2px; right: 2px;
  width: 12px; height: 12px; background: var(--online);
  border: 2px solid var(--midnight); border-radius: 50%;
}
.chat-info { flex: 1; min-width: 0; }
.chat-name { font-weight: 700; font-size: 0.95rem; margin-bottom: 2px; }
.chat-preview { color: var(--text-muted); font-size: 0.85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.chat-time { font-size: 0.72rem; color: var(--text-dim); }
.chat-unread {
  background: var(--rose); color: #fff;
  font-size: 0.65rem; font-weight: 800;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* ============================================================
   CHAT VIEW
   ============================================================ */
.chat-view {
  display: none; position: fixed; inset: 0; z-index: 600;
  flex-direction: column; background: var(--midnight);
}
.chat-view.open { display: flex; }

.chat-header {
  height: var(--nav-h);
  display: flex; align-items: center; gap: var(--sp-md);
  padding: 0 var(--sp-md);
  background: rgba(15,10,30,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-header-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.chat-header-info { flex: 1; }
.chat-header-name { font-weight: 700; font-size: 0.95rem; }
.chat-header-status { font-size: 0.75rem; color: var(--success); }
.chat-header-actions { display: flex; gap: var(--sp-sm); }

.chat-messages {
  flex: 1; overflow-y: auto;
  padding: var(--sp-lg) var(--sp-md);
  display: flex; flex-direction: column; gap: var(--sp-md);
  scrollbar-width: thin; scrollbar-color: var(--card) transparent;
}
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--card); border-radius: 2px; }

.msg-wrap { display: flex; gap: var(--sp-sm); max-width: 80%; }
.msg-wrap.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg-avatar-sm { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0; align-self: flex-end; }
.msg-bubble {
  padding: 0.75rem 1rem;
  border-radius: var(--r-lg);
  font-size: 0.9rem; line-height: 1.5;
  max-width: 100%;
}
.msg-wrap:not(.mine) .msg-bubble {
  background: var(--card); border-bottom-left-radius: var(--r-sm);
}
.msg-wrap.mine .msg-bubble {
  background: var(--grad-primary); color: #fff;
  border-bottom-right-radius: var(--r-sm);
}
.msg-time { font-size: 0.65rem; color: var(--text-dim); margin-top: 4px; text-align: right; }

/* Date divider */
.date-divider {
  display: flex; align-items: center; gap: var(--sp-md);
  font-size: 0.75rem; color: var(--text-dim); text-align: center;
  margin: var(--sp-sm) 0;
}
.date-divider::before, .date-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* Typing indicator */
.typing-dots {
  display: flex; gap: 4px; padding: 0.75rem 1rem;
  background: var(--card); border-radius: var(--r-lg); border-bottom-left-radius: var(--r-sm);
  width: fit-content;
}
.typing-dot {
  width: 6px; height: 6px; background: var(--text-dim);
  border-radius: 50%; animation: typingBounce 1.2s infinite;
}
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce { 0%,100%{transform:translateY(0);}50%{transform:translateY(-4px);background:var(--rose);} }

/* Chat input */
.chat-input-wrap {
  display: flex; align-items: center; gap: var(--sp-sm);
  padding: var(--sp-sm) var(--sp-md);
  background: rgba(15,10,30,0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-input {
  flex: 1; background: rgba(255,255,255,0.06);
  border: 1px solid var(--border); border-radius: var(--r-full);
  padding: 0.7rem 1.2rem; color: var(--text);
  font-family: var(--font-body); font-size: 0.9rem; outline: none;
  transition: var(--tr);
}
.chat-input:focus { border-color: var(--rose); background: rgba(255,62,108,0.05); }
.chat-input::placeholder { color: var(--text-dim); }
.chat-send-btn {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--grad-primary); border: none;
  color: #fff; font-size: 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: var(--tr); flex-shrink: 0;
}
.chat-send-btn:hover { transform: scale(1.08); }
.chat-attach-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: var(--tr);
}
.chat-attach-btn:hover { color: var(--rose); border-color: var(--rose); }

/* ============================================================
   VIDEO CALL
   ============================================================ */
.video-call-view {
  display: none; position: fixed; inset: 0; z-index: 700;
  background: #000; flex-direction: column;
}
.video-call-view.active { display: flex; }
.video-remote {
  flex: 1; object-fit: cover; width: 100%;
  background: var(--deep);
}
.video-remote-placeholder {
  flex: 1; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--deep), var(--card));
  font-size: 5rem;
}
.video-local {
  position: absolute; top: calc(var(--nav-h) + 1rem); right: 1rem;
  width: 100px; height: 140px;
  border-radius: var(--r-md); object-fit: cover;
  border: 2px solid rgba(255,255,255,0.3);
  background: var(--card); z-index: 1;
  overflow: hidden;
}
.video-call-controls {
  position: absolute; bottom: 2rem; left: 0; right: 0;
  display: flex; justify-content: center; gap: var(--sp-xl);
  z-index: 2;
}
.video-control-btn {
  width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; cursor: pointer; border: none;
  box-shadow: var(--shadow-card); transition: var(--tr);
  background: rgba(255,255,255,0.15); color: #fff;
  backdrop-filter: blur(8px);
}
.video-control-btn:hover { transform: scale(1.1); background: rgba(255,255,255,0.25); }
.video-control-btn.end { background: var(--danger); }
.video-call-caller {
  position: absolute; top: var(--nav-h); left: 0; right: 0;
  padding: var(--sp-lg); text-align: center; color: #fff;
  z-index: 2; background: linear-gradient(to bottom, rgba(0,0,0,0.6), transparent);
}
.video-caller-name { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }
.video-call-status { font-size: 0.9rem; opacity: 0.7; }
/* Screenshot blocker overlay */
.screenshot-blocker {
  position: fixed; inset: 0; z-index: 9999;
  background: #000; opacity: 0;
  pointer-events: none;
  transition: opacity 0.1s;
}
.screenshot-blocker.block { opacity: 1; pointer-events: all; }

/* ============================================================
   SELFIE VERIFICATION
   ============================================================ */
.selfie-gate {
  display: none; position: fixed; inset: 0; z-index: 850;
  background: var(--midnight);
  flex-direction: column; align-items: center; justify-content: center;
  padding: var(--sp-xl) var(--sp-lg); text-align: center;
}
.selfie-gate.required { display: flex; }
.selfie-camera-wrap {
  width: 260px; height: 340px;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 3px solid;
  border-image: var(--grad-primary) 1;
  border-image: none;
  border-color: var(--rose);
  position: relative;
  margin: var(--sp-xl) auto;
  background: var(--deep);
}
.selfie-camera-wrap video, .selfie-camera-wrap canvas {
  width: 100%; height: 100%; object-fit: cover;
}
.selfie-overlay-ring {
  position: absolute; inset: 0;
  border: 3px dashed rgba(255,62,108,0.5);
  border-radius: var(--r-xl);
  animation: ringPulse 2s ease-in-out infinite;
}
@keyframes ringPulse { 0%,100%{opacity:0.5;}50%{opacity:1;} }
.selfie-scan-line {
  position: absolute; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--rose), transparent);
  animation: scanLine 3s linear infinite;
}
@keyframes scanLine { 0%{top:0;}100%{top:100%;} }
.selfie-hint { font-size: 0.85rem; color: var(--text-muted); margin-top: var(--sp-sm); }
.selfie-preview { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 3px solid var(--rose); margin: var(--sp-md) auto; display: none; }
.selfie-status {
  display: flex; align-items: center; justify-content: center; gap: var(--sp-sm);
  padding: var(--sp-sm) var(--sp-lg);
  border-radius: var(--r-full); font-size: 0.85rem; font-weight: 700;
  margin-top: var(--sp-md);
}
.selfie-status.pending { background: rgba(255,176,32,0.15); color: var(--warning); border: 1px solid rgba(255,176,32,0.3); }
.selfie-status.ok { background: rgba(0,214,143,0.15); color: var(--success); border: 1px solid rgba(0,214,143,0.3); }

/* ============================================================
   PROFILE & SETTINGS
   ============================================================ */
.profile-hero {
  position: relative; height: 280px; overflow: hidden;
}
.profile-hero-img { width: 100%; height: 100%; object-fit: cover; }
.profile-hero-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(to top, var(--midnight) 0%, transparent 60%);
}
.profile-avatar-wrap {
  position: absolute; bottom: -40px; left: var(--sp-lg);
  width: 90px; height: 90px; border-radius: 50%;
  border: 4px solid var(--rose); overflow: hidden;
  box-shadow: var(--shadow-glow);
}
.profile-avatar-wrap img { width: 100%; height: 100%; object-fit: cover; }
.profile-body { padding: 56px var(--sp-lg) var(--sp-lg); }
.profile-name { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; }
.profile-location { color: var(--text-muted); font-size: 0.9rem; margin-bottom: var(--sp-md); }
.profile-stats {
  display: flex; gap: var(--sp-xl); margin-bottom: var(--sp-lg);
  padding: var(--sp-lg) 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.profile-stat-num { font-family: var(--font-display); font-size: 1.4rem; font-weight: 700; color: var(--rose); }
.profile-stat-lbl { font-size: 0.75rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }

/* Settings Section */
.settings-section { margin-bottom: var(--sp-xl); }
.settings-label {
  font-size: 0.72rem; font-weight: 700; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 0 var(--sp-lg); margin-bottom: var(--sp-sm);
}
.settings-item {
  display: flex; align-items: center; gap: var(--sp-md);
  padding: var(--sp-md) var(--sp-lg);
  background: var(--card);
  border-bottom: 1px solid var(--border); cursor: pointer;
  transition: var(--tr);
}
.settings-item:first-of-type { border-radius: var(--r-md) var(--r-md) 0 0; }
.settings-item:last-of-type  { border-radius: 0 0 var(--r-md) var(--r-md); border-bottom: none; }
.settings-item:only-of-type  { border-radius: var(--r-md); }
.settings-item:hover { background: var(--card-hover); }
.settings-icon { width: 36px; height: 36px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }
.settings-info { flex: 1; }
.settings-name { font-weight: 600; font-size: 0.95rem; }
.settings-desc { font-size: 0.8rem; color: var(--text-muted); }
.settings-arrow { color: var(--text-dim); font-size: 0.8rem; }

/* GPS Status Indicator */
.gps-status-bar {
  display: flex; align-items: center; gap: var(--sp-sm);
  padding: var(--sp-sm) var(--sp-lg);
  background: rgba(0,214,143,0.08); border: 1px solid rgba(0,214,143,0.2);
  border-radius: var(--r-md); margin: var(--sp-md);
  font-size: 0.85rem;
}
.gps-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success);
  animation: gpsPulse 1.5s infinite;
}
@keyframes gpsPulse { 0%,100%{opacity:1;transform:scale(1);}50%{opacity:0.5;transform:scale(0.8);} }
.gps-dot.off { background: var(--text-dim); animation: none; }

/* ============================================================
   DSGVO MODAL
   ============================================================ */
.modal-overlay {
  display: none; position: fixed; inset: 0; z-index: 900;
  background: rgba(15,10,30,0.9); backdrop-filter: blur(10px);
  align-items: center; justify-content: center; padding: var(--sp-md);
}
.modal-overlay.open { display: flex; }
.modal-box {
  width: 100%; max-width: 480px;
  background: var(--deep);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: var(--sp-xl);
  max-height: 90vh; overflow-y: auto;
}
.modal-title { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: var(--sp-sm); }
.modal-body { color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; margin-bottom: var(--sp-lg); }
.modal-actions { display: flex; gap: var(--sp-md); flex-wrap: wrap; }

/* ============================================================
   UTILITY
   ============================================================ */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.text-center { text-align: center; }
.text-muted  { color: var(--text-muted); }
.text-rose   { color: var(--rose); }
.text-success{ color: var(--success); }
.mt-sm { margin-top: var(--sp-sm); }
.mt-md { margin-top: var(--sp-md); }
.mt-lg { margin-top: var(--sp-lg); }
.mb-md { margin-bottom: var(--sp-md); }
.gap-sm { gap: var(--sp-sm); }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* Loading spinner */
.spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid rgba(255,62,108,0.2);
  border-top-color: var(--rose);
  animation: spin 0.8s linear infinite;
  margin: 2rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Toast */
.toast-wrap { position: fixed; top: calc(var(--nav-h) + 1rem); left: 50%; transform: translateX(-50%); z-index: 9990; display: flex; flex-direction: column; gap: var(--sp-sm); pointer-events: none; width: 90%; max-width: 380px; }
.toast {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-md) var(--sp-lg);
  font-size: 0.9rem; font-weight: 500;
  display: flex; align-items: center; gap: var(--sp-sm);
  box-shadow: var(--shadow-card);
  animation: toastIn 0.3s var(--ease) forwards;
  pointer-events: all;
}
.toast.success { border-color: rgba(0,214,143,0.4); }
.toast.error   { border-color: rgba(255,62,62,0.4); }
.toast.info    { border-color: rgba(124,58,237,0.4); }
@keyframes toastIn { from{opacity:0;transform:translateY(-12px);}to{opacity:1;transform:translateY(0);} }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 600px) {
  .swipe-stack { height: 580px; }
  #page-discover { max-width: 480px; margin: 0 auto; }
}
@media (max-width: 380px) {
  .swipe-stack { height: 460px; }
  .hero-title { font-size: 2.4rem; }
}
