* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', sans-serif;
  background: #f4f6f9;
  color: #1a1a2e;
}

/* TOP BAR */
.topbar {
  background: #1a1a2e;
  color: white;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 56px;
}

.logo {
  font-size: 20px;
  font-weight: 700;
}

.tagline {
  font-size: 13px;
  color: #a0aec0;
  flex: 1;
}

.report-btn {
  background: #4f46e5;
  color: white;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.report-btn:hover {
  background: #4338ca;
}

/* MAP */
#map {
  width: 100%;
  height: calc(100vh - 56px);
}

/* OVERLAY */
.form-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 999;
}

.form-overlay.active {
  display: block;
}

/* FORM PANEL */
.form-panel {
  position: fixed;
  top: 0;
  right: -480px;
  width: 440px;
  height: 100vh;
  background: white;
  z-index: 1000;
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.form-panel.active {
  right: 0;
}

.form-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.form-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a2e;
}

.close-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #718096;
  padding: 4px 8px;
  border-radius: 6px;
}

.close-btn:hover {
  background: #f1f5f9;
}

.form-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  display: block;
  margin-bottom: -8px;
}

/* UPLOAD BOX */
.upload-box {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  color: #64748b;
  font-size: 14px;
  transition: border-color 0.2s;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-box:hover {
  border-color: #4f46e5;
}

.upload-box img {
  max-width: 100%;
  max-height: 180px;
  border-radius: 8px;
  object-fit: cover;
}

/* TEXTAREA */
textarea {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: 'Segoe UI', sans-serif;
  resize: none;
  outline: none;
  color: #1a1a2e;
}

textarea:focus {
  border-color: #4f46e5;
}

/* LOCATION */
.location-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.location-btn {
  background: none;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  color: #475569;
  white-space: nowrap;
}

/* SUBMIT */
.submit-btn {
  background: #4f46e5;
  color: white;
  border: none;
  padding: 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  margin-top: 8px;
}

.submit-btn:hover {
  background: #4338ca;
}

/* STATS BAR */
.stats-bar {
  display: flex;
  gap: 1px;
  background: #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.stat-card {
  flex: 1;
  background: white;
  padding: 10px 16px;
  text-align: center;
}

.stat-number {
  font-size: 22px;
  font-weight: 700;
  color: #4f46e5;
}

.stat-label {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.login-btn {
  background: transparent;
  color: white;
  border: 1px solid rgba(255,255,255,0.4);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}

.login-btn:hover {
  background: rgba(255,255,255,0.1);
}

/* AI INSIGHTS BAR */
.insights-bar {
  background: #1e1b4b;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.insights-btn {
  background: #4f46e5;
  color: white;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.insights-btn:hover {
  background: #4338ca;
}

#insightsResult {
  font-size: 13px;
  color: #c7d2fe;
  line-height: 1.6;
  flex: 1;
}

/* LEADERBOARD */
.leaderboard-panel {
  position: fixed;
  top: 56px;
  right: 0;
  width: 300px;
  background: #1e1b4b;
  z-index: 1000;
  border-radius: 0 0 0 12px;
  box-shadow: -4px 4px 20px rgba(0,0,0,0.3);
  overflow: hidden;
}

.lb-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 700;
  color: white;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.lb-list {
  padding: 10px;
  max-height: 400px;
  overflow-y: auto;
}

.lb-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  margin-bottom: 4px;
  background: rgba(255,255,255,0.05);
}

.lb-rank {
  font-size: 16px;
  font-weight: 700;
  color: #fbbf24;
  width: 24px;
  text-align: center;
}

.lb-photo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.lb-name {
  flex: 1;
  font-size: 13px;
  color: white;
  font-weight: 500;
}

.lb-count {
  font-size: 12px;
  color: #a5b4fc;
  font-weight: 600;
}

/* MOBILE RESPONSIVE */
@media (max-width: 600px) {
  .topbar {
    padding: 10px 12px;
    flex-wrap: wrap;
    height: auto;
    gap: 8px;
  }

  .logo {
    font-size: 16px;
  }

  .tagline {
    display: none;
  }

  .topbar-right {
    gap: 6px;
  }

  .login-btn {
    padding: 5px 8px;
    font-size: 11px;
  }

  .report-btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  .stats-bar {
    flex-wrap: wrap;
  }

  .stat-card {
    min-width: 45%;
  }

  .stat-number {
    font-size: 18px;
  }

  .form-panel {
    width: 100%;
    right: -100%;
  }

  .leaderboard-panel {
    width: 100%;
  }

  .insights-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  #map {
    height: calc(100vh - 130px);
  }
}

/* LANGUAGE SELECT */
.lang-select {
  background: rgba(255,255,255,0.1);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}

.lang-select option {
  background: #1e1b4b;
  color: white;
}