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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #1a1a2e;
  color: #e0e0e0;
  height: 100vh;
  overflow: hidden;
}

#app { height: 100vh; display: flex; flex-direction: column; }

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: #16213e;
  border-bottom: 1px solid #0f3460;
  z-index: 1000;
}
.header-left { display: flex; align-items: center; gap: 8px; }
.header-left h1 { font-size: 1.1rem; font-weight: 600; color: #e0e0e0; }
.logo { font-size: 1.4rem; }
.header-right { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; }

.status-dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block;
}
.status-dot.connected { background: #4ade80; }
.status-dot.disconnected { background: #f87171; }

/* Map */
#map {
  flex: 1;
  z-index: 1;
}

/* Sidebar */
.sidebar {
  position: absolute;
  top: 44px;
  left: 0;
  bottom: 0;
  width: 280px;
  background: #16213eee;
  backdrop-filter: blur(10px);
  z-index: 500;
  overflow-y: auto;
  padding: 12px;
  border-right: 1px solid #0f3460;
  transition: transform 0.3s ease;
}
.sidebar.hidden { transform: translateX(-100%); }

.sidebar-section {
  margin-bottom: 16px;
}
.sidebar-section h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.sidebar-toggle {
  position: absolute;
  top: 52px;
  left: 8px;
  z-index: 501;
  background: #16213ecc;
  color: #e0e0e0;
  border: 1px solid #0f3460;
  border-radius: 4px;
  padding: 6px 10px;
  cursor: pointer;
  display: none;
  font-size: 1.1rem;
}

/* Club list */
.club-list { display: flex; flex-direction: column; gap: 4px; }
.club-item {
  padding: 8px 10px;
  background: #1a1a2e;
  border: 1px solid #0f3460;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
.club-item:hover { background: #0f3460; }
.club-item.active { background: #0f3460; border-color: #4ade80; }
.club-item .club-name { font-size: 0.9rem; font-weight: 500; }
.club-item .club-meta { font-size: 0.75rem; color: #888; margin-top: 2px; }

/* Search */
#club-search {
  width: 100%;
  padding: 6px 10px;
  background: #1a1a2e;
  border: 1px solid #0f3460;
  border-radius: 4px;
  color: #e0e0e0;
  margin-bottom: 8px;
  font-size: 0.85rem;
}
#club-search:focus { outline: none; border-color: #4ade80; }

/* Auth */
#auth-section {
  border-top: 1px solid #0f3460;
  padding-top: 12px;
}
#display-name {
  width: 100%;
  padding: 6px 10px;
  background: #1a1a2e;
  border: 1px solid #0f3460;
  border-radius: 4px;
  color: #e0e0e0;
  margin-bottom: 6px;
  font-size: 0.85rem;
}
#display-name:focus { outline: none; border-color: #4ade80; }
#user-name { font-size: 0.9rem; }

/* Member panel */
.member-panel {
  position: absolute;
  top: 52px;
  right: 8px;
  width: 220px;
  max-height: 60vh;
  overflow-y: auto;
  background: #16213eee;
  backdrop-filter: blur(10px);
  border: 1px solid #0f3460;
  border-radius: 8px;
  padding: 12px;
  z-index: 500;
}
.member-panel h3 { font-size: 0.85rem; margin-bottom: 8px; color: #4ade80; }

.member-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid #0f346033;
  font-size: 0.85rem;
}
.member-dot {
  width: 8px; height: 8px; border-radius: 50;
  flex-shrink: 0;
}
.member-dot.active { background: #4ade80; }
.member-dot.stale { background: #fbbf24; }
.member-dot.offline { background: #666; }
.member-sport { font-size: 0.7rem; color: #888; }

/* Buttons */
.btn {
  padding: 6px 14px;
  border: 1px solid #0f3460;
  border-radius: 4px;
  background: #1a1a2e;
  color: #e0e0e0;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s;
}
.btn:hover { background: #0f3460; }
.btn-primary { background: #0f3460; border-color: #4ade80; color: #4ade80; }
.btn-primary:hover { background: #4ade8022; }
.btn-small { padding: 3px 8px; font-size: 0.75rem; }

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: #000000aa;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-content {
  background: #16213e;
  border: 1px solid #0f3460;
  border-radius: 10px;
  padding: 24px;
  width: 90%;
  max-width: 400px;
}
.modal-content h2 { margin-bottom: 16px; font-size: 1.1rem; }
.modal-content label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.85rem;
  color: #aaa;
}
.modal-content input, .modal-content select {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 6px 10px;
  background: #1a1a2e;
  border: 1px solid #0f3460;
  border-radius: 4px;
  color: #e0e0e0;
  font-size: 0.85rem;
}
.modal-content input:focus, .modal-content select:focus {
  outline: none; border-color: #4ade80;
}
.modal-actions { display: flex; gap: 8px; margin-top: 16px; }

.sport-checks { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; }
.sport-checks label {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 0.8rem; color: #e0e0e0; margin-bottom: 0;
}

/* Sport icons */
.sport-icon { font-size: 0.85rem; }

/* Responsive */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.visible { transform: translateX(0); }
  .sidebar-toggle { display: block; }
  .member-panel { width: 180px; }
}
