/* ═══════════════════════════════════════════════════════════════════
   SPOT ME RADAR – DESIGN TOKENS & STYLES
═══════════════════════════════════════════════════════════════════ */

:root {
  --bg:      #060a0f;
  --sur:     #0c1219;
  --card:    #101820;
  --card2:   #141f2e;
  --bord:    rgba(255,255,255,.08);
  --bord2:   rgba(255,255,255,.13);
  --acc:     #00e5c0;
  --acc-dim: rgba(0,229,192,.12);
  --p2:      #7b5cfa;
  --p3:      #ff4f7b;
  --text:    #dde4f0;
  --muted:   #4e6070;
  --muted2:  #7a8fa8;
  --green:   #1ecc68;
  --touch:   52px;
}

* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent }

body {
  background: var(--bg); color: var(--text);
  font-family: 'DM Sans', sans-serif; font-size: 17px; line-height: 1.5;
  min-height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* ─── Header ─── */
.app-header {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--bord);
  background: rgba(6,10,15,.96);
  backdrop-filter: blur(24px);
  flex-shrink: 0;
}
.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.back-btn, .refresh-btn {
  width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--bord2); background: rgba(255,255,255,.04);
  color: var(--muted2); font-size: 1.5rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; text-decoration: none;
}
.back-btn { font-size: 1.8rem; line-height: 1; }
.refresh-btn { font-size: 1.2rem; }
.back-btn:active, .refresh-btn:active { background: rgba(255,255,255,.09); color: var(--text); }
.refresh-btn.spinning { animation: spin 0.6s linear infinite; pointer-events: none; opacity: 0.6; }
@keyframes spin { to { transform: rotate(360deg); } }

.logo {
  font-family: 'Syne', sans-serif; font-weight: 800; letter-spacing: 1px;
  font-size: 1.2rem; color: var(--acc);
}
.logo b { color: var(--text); font-weight: 800; }
.status-badge {
  font-size: 0.6rem; font-weight: 600; letter-spacing: 1px;
  color: var(--acc); background: var(--acc-dim);
  padding: 0.2rem 0.6rem; border-radius: 100px;
  border: 1px solid rgba(0,229,192,.2);
  white-space: nowrap;
}

/* ─── Profil‑Card (kompakt) ─── */
.profile-bar {
  padding: 0.75rem 1.25rem;
  background: var(--card); border-bottom: 1px solid var(--bord);
  display: flex; align-items: center; gap: 0.8rem; flex-shrink: 0;
}
.profile-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--p2), var(--p3));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; border: 2px solid var(--bord2); flex-shrink: 0;
  overflow: hidden;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-info { flex: 1; min-width: 0; }
.profile-name {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.95rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.profile-meta {
  font-size: 0.75rem; color: var(--muted2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.profile-actions {
  display: flex; gap: 6px;
}
.icon-btn {
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--bord2); background: rgba(255,255,255,.04);
  color: var(--muted2); font-size: 1.1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.icon-btn.active { background: var(--acc); color: var(--bg); border-color: var(--acc); }
.icon-btn:active { background: rgba(255,255,255,.09); }

/* ─── Radar Viewport ─── */
.radar-viewport {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  background: var(--bg);
  flex-shrink: 0;
}
.radar-canvas {
  position: relative; width: 100%; height: auto;
  max-width: min(70vw, 70vh); aspect-ratio: 1/1;
}
.radar-bg {
  position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(circle at center, rgba(0,229,192,.03) 0%, transparent 70%);
  border: 1px solid rgba(0,229,192,.15);
  box-shadow: 0 0 40px rgba(0,0,0,.5);
}
.ring {
  position: absolute; inset: 0; border: 1px solid rgba(0,229,192,.08); border-radius: 50%;
}
.ring-label {
  position: absolute; left: 50%; transform: translateX(-50%);
  color: var(--acc); font-size: 0.6rem; opacity: 0.5;
  background: var(--bg); padding: 0 4px;
}
.radar-sweep {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0%, rgba(0,229,192,.08) 100%);
  animation: sweep 8s linear infinite;
  pointer-events: none;
}
@keyframes sweep { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.center-dot {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 14px; height: 14px; background: white; border-radius: 50%;
  box-shadow: 0 0 20px var(--acc); border: 2px solid var(--bg); z-index: 10;
}

/* Peer Nodes */
.peer-node {
  position: absolute; width: 14px; height: 14px; margin-left: -7px; margin-top: -7px;
  background: var(--acc); border-radius: 50%;
  box-shadow: 0 0 12px var(--acc); cursor: pointer;
  z-index: 50; transition: transform 0.2s;
  border: 2px solid var(--bg);
}
.peer-node:active { transform: scale(1.4); }
.peer-node::after {
  content: attr(data-label); position: absolute; top: 18px; left: 50%;
  transform: translateX(-50%); font-size: 0.65rem; white-space: nowrap;
  background: var(--card2); padding: 2px 8px; border-radius: 12px;
  border: 1px solid var(--bord2); color: var(--text);
  pointer-events: none; opacity: 0; transition: opacity 0.15s;
}
.peer-node:hover::after { opacity: 1; }

/* ─── Horizontale Profil-Liste ─── */
.community-list-section {
  flex: 0 0 auto;
  padding: 0 0 0.5rem 0;
  background: var(--bg);
}
.horizontal-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.5rem 1.25rem 1rem 1.25rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.horizontal-scroll::-webkit-scrollbar { display: none; }

.profile-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
  background: var(--card2);
  border: 1px solid var(--bord);
  border-radius: 18px;
  padding: 0.9rem;
  margin-bottom: 0;
  transition: border-color 0.2s;
  position: relative;
  overflow: hidden;
}
.profile-card:active { border-color: var(--bord2); }
.profile-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  border-radius: 2px 2px 0 0; opacity: 0; transition: opacity 0.3s;
}
.profile-card.homo::before   { background: linear-gradient(90deg,var(--p2),var(--acc)); opacity: 1; }
.profile-card.bi::before     { background: linear-gradient(90deg,var(--p3),var(--p2)); opacity: 1; }
.profile-card.hetero::before { background: linear-gradient(90deg,var(--muted),var(--muted2)); opacity: 0.4; }

.card-top { display: flex; align-items: flex-start; gap: 0.7rem; margin-bottom: 0.6rem; }
.card-av {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg,var(--p2),var(--p3));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; border: 2px solid var(--bord2);
}
.card-info { flex: 1; min-width: 0; }
.card-name {
  font-family: 'Syne',sans-serif; font-weight: 700; font-size: 0.95rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-age-loc { font-size: 0.75rem; color: var(--muted2); margin-top: 0.2rem; }
.card-age-loc b { color: var(--muted); font-weight: 500; }
.online-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 8px var(--green);
  flex-shrink: 0; margin-top: 6px; animation: blink 2s ease infinite;
}
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.3} }

.location-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(0,229,192,.1); border: 1px solid rgba(0,229,192,.3);
  border-radius: 100px; padding: 2px 8px; font-size: 0.65rem;
  color: var(--acc); margin-left: 8px; cursor: pointer;
}
.location-badge:active { background: rgba(0,229,192,.2); }

.card-badges {
  display: flex; flex-wrap: wrap; gap: 0.25rem; margin-bottom: 0.6rem;
}
.badge {
  padding: 0.15rem 0.5rem; border-radius: 100px; font-size: 0.7rem; font-weight: 500;
  border: 1px solid transparent;
}
.badge-homo   { background: rgba(123,92,250,.12); color: var(--p2); border-color: rgba(123,92,250,.25); }
.badge-bi     { background: rgba(255,79,123,.1);  color: var(--p3); border-color: rgba(255,79,123,.22); }
.badge-hetero { background: rgba(255,255,255,.05); color: var(--muted2); border-color: var(--bord2); }
.badge-role   { background: rgba(0,229,192,.08); color: var(--acc); border-color: rgba(0,229,192,.2); }
.badge-trans  { background: rgba(0,229,192,.06); color: var(--acc); border-color: rgba(0,229,192,.15); font-size: 0.65rem; }
.badge-cross  { background: rgba(255,185,0,.07); color: #f5a623; border-color: rgba(255,185,0,.18); font-size: 0.65rem; }

/* Bio in Profilkarten vollständig anzeigen */
.card-bio {
  max-height: none !important;
  overflow: visible !important;
  display: block !important;
  -webkit-line-clamp: unset !important;
  line-clamp: unset !important;
  white-space: normal !important;
  text-overflow: clip !important;
}

.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 0.7rem; }
.card-time { font-size: 0.7rem; color: var(--muted); }
.btn-chat {
  display: flex; align-items: center; gap: 0.45rem;
  padding: 0.4rem 0.9rem; border-radius: 10px; border: none;
  background: var(--acc); color: var(--bg);
  font-family: 'DM Sans',sans-serif; font-size: 0.8rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s; flex-shrink: 0;
}
.btn-chat:active { transform: scale(0.96); opacity: 0.9; }

/* ─── Filter Drawer ─── */
.filter-drawer {
  background: var(--card); border-top: 1px solid var(--bord);
  padding: 1rem 1.25rem; flex-shrink: 0;
}
.filter-title {
  font-size: 0.7rem; letter-spacing: 2px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 0.75rem;
}
.filter-row {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px;
  scrollbar-width: none;
}
.filter-chip {
  background: var(--sur); border: 1.5px solid var(--bord2);
  padding: 6px 14px; border-radius: 20px; font-size: 0.8rem;
  white-space: nowrap; color: var(--muted2); cursor: pointer;
  transition: all 0.15s; user-select: none;
}
.filter-chip.active {
  background: var(--acc-dim); border-color: var(--acc); color: var(--acc);
}
.filter-select-row {
  display: flex; gap: 8px; margin-bottom: 10px;
}
.filter-select {
  flex: 1; padding: 8px 12px; background: var(--sur);
  border: 1.5px solid var(--bord2); border-radius: 12px;
  color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 0.85rem;
}
.reset-link {
  font-size: 0.75rem; color: var(--muted2); background: none; border: none;
  padding: 4px 8px; cursor: pointer;
}

/* ─── Bottom Navigation ─── */
nav {
  display: flex; justify-content: space-around; padding: 0.5rem 0 1.2rem;
  border-top: 1px solid var(--bord); background: var(--bg); flex-shrink: 0;
}
.nav-btn {
  background: none; border: none; color: var(--muted2); opacity: 0.5;
  font-family: 'Syne', sans-serif; font-size: 0.8rem; letter-spacing: 1px;
  cursor: pointer; padding: 8px 16px; border-radius: 12px; transition: all 0.15s;
}
.nav-btn.active { opacity: 1; color: var(--acc); background: var(--acc-dim); }

/* Modal */
.location-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.8);
  z-index: 1000; display: none; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.location-modal {
  background: var(--card2); border: 1px solid var(--bord2);
  border-radius: 24px; padding: 1.5rem; width: 90%; max-width: 400px;
}
.location-modal.inside { background: rgba(30, 204, 104, 0.08); border-color: var(--green); }
.location-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
}
.location-modal-title { font-family: 'Syne', sans-serif; font-weight: 700; color: var(--acc); }
.location-modal-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.1); border: none; color: var(--text);
  font-size: 1.2rem; cursor: pointer;
}
#location-map-small { height: 200px; border-radius: 12px; margin-bottom: 1rem; }
.location-distance {
  text-align: center; font-weight: 600; padding: 0.5rem;
  border-radius: 12px; margin-bottom: 0.8rem;
}
.location-distance.inside { background: rgba(30, 204, 104, 0.15); color: var(--green); }
.checkin-btn {
  width: 100%; padding: 0.8rem; border: none; border-radius: 12px;
  background: var(--acc); color: var(--bg); font-weight: 700; font-size: 0.95rem;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  gap: 0.4rem; transition: all 0.2s;
}

/* Profil-Detail-Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.8);
  z-index: 1000; display: none; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.modal-content {
  background: var(--card2); border: 1px solid var(--bord2);
  border-radius: 24px; padding: 1.5rem; width: 90%; max-width: 400px;
  max-height: 80vh; overflow-y: auto;
  position: relative;
}
.modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 32px; height: 32px; border-radius: 50%;
  background: rgba(255,255,255,.1); border: none; color: var(--text);
  font-size: 1.2rem; cursor: pointer; z-index: 10;
}
.profile-detail-card .detail-avatar {
  width: 70px; height: 70px; border-radius: 50%;
  background: linear-gradient(135deg, var(--p2), var(--p3));
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; margin: 0 auto 1rem;
}
.profile-detail-card .detail-name {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1.5rem;
  text-align: center; margin-bottom: 0.25rem;
}
.profile-detail-card .detail-location {
  text-align: center; color: var(--muted2); font-size: 0.9rem; margin-bottom: 1rem;
}
.profile-detail-card .detail-badges {
  display: flex; flex-wrap: wrap; gap: 0.35rem; justify-content: center;
  margin-bottom: 1rem;
}
.profile-detail-card .detail-bio {
  background: var(--card); border-radius: 16px; padding: 1rem;
  margin-bottom: 1.5rem; color: var(--text); font-size: 0.95rem;
  line-height: 1.5; white-space: pre-wrap;
}
.profile-detail-card .detail-footer {
  display: flex; gap: 0.8rem;
}
.profile-detail-card .detail-btn {
  flex: 1; padding: 0.8rem; border-radius: 14px; border: none;
  font-weight: 700; font-size: 0.95rem; cursor: pointer;
  text-align: center; transition: all 0.15s;
}
.profile-detail-card .btn-primary {
  background: var(--acc); color: var(--bg);
}
.profile-detail-card .btn-secondary {
  background: var(--sur); color: var(--text); border: 1px solid var(--bord2);
}

/* QR-Modal */
#qr-code-container canvas, #qr-code-container img {
  border-radius: 16px;
  background: white;
  padding: 8px;
}

.toast {
  position: fixed; bottom: 2.5rem; left: 50%; transform: translateX(-50%);
  background: var(--card2); border: 1px solid var(--bord2);
  border-radius: 100px; padding: 0.6rem 1.5rem; font-size: 0.85rem;
  z-index: 9999; transition: all 0.3s; opacity: 0; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-10px); }
/* ═══════════ SPOTS-GRID (index.html Home) ═══════════ */
.spots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  padding: 0 0 0.5rem;
}
.spot-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.85rem 0.5rem;
  background: var(--card2);
  border: 1px solid var(--bord);
  border-radius: 16px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.2s, transform 0.15s;
  position: relative;
  overflow: hidden;
}
.spot-tile::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--tile-acc);
  opacity: 0.8;
}
.spot-tile:active { transform: scale(0.97); }
.spot-tile-icon { font-size: 1.6rem; line-height: 1; }
.spot-tile-name {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--tile-acc);
}
.spot-tile-desc {
  font-size: 0.68rem;
  color: var(--muted2);
  text-align: center;
  line-height: 1.3;
}
