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

body {
  font-family: 'Segoe UI', sans-serif;
  background: #0f0f0f;
  color: #e8e8e8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Navbar ── */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 2rem;
  background: #141414;
  border-bottom: 1px solid #222;
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-brand {
  font-weight: 700;
  font-size: 1.1rem;
  color: #4f9cf9;
  text-decoration: none;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.nav-links a {
  color: #aaa;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s;
}
.nav-links a:hover, .nav-links a.active { color: #e8e8e8; }
.nav-user { color: #4f9cf9; font-size: 0.9rem; text-decoration: none; }
.nav-user:hover { color: #7ab8ff; }

/* ── Buttons ── */
.btn-primary {
  background: #4f9cf9;
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s;
}
.btn-primary:hover { background: #3b8de8; }
.btn-primary-sm {
  background: #4f9cf9;
  color: #fff;
  text-decoration: none;
  padding: 0.3rem 0.8rem;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: 600;
}
.btn-outline {
  background: transparent;
  color: #aaa;
  border: 1px solid #3a3a3a;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: border-color 0.15s, color 0.15s;
}
.btn-outline:hover { border-color: #888; color: #e8e8e8; }
.btn-outline-sm {
  background: transparent;
  color: #aaa;
  border: 1px solid #3a3a3a;
  text-decoration: none;
  padding: 0.3rem 0.8rem;
  border-radius: 5px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.btn-outline-sm:hover { border-color: #888; color: #e8e8e8; }
.btn-danger {
  background: #5a1e1e;
  color: #e07070;
  border: 1px solid #7a2a2a;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s;
}
.btn-danger:hover { background: #7a2a2a; }

/* ── Container & layout ── */
.container {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  flex: 1;
}
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}
@media (max-width: 640px) { .two-col { grid-template-columns: 1fr; } }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.section-header h2 { font-size: 1rem; color: #ccc; }

.page-header { margin-bottom: 1.5rem; }
.page-header h1 { font-size: 1.6rem; }

/* ── Cards ── */
.card {
  display: block;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 1rem 1.1rem;
  text-decoration: none;
  color: inherit;
  margin-bottom: 0.75rem;
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover { border-color: #4f9cf9; transform: translateY(-2px); }
.card-top { display: flex; align-items: center; justify-content: space-between; }
.card-title { font-weight: 600; font-size: 0.95rem; }
.card-meta { font-size: 0.8rem; color: #666; margin-top: 0.35rem; }
.card-desc { font-size: 0.85rem; color: #999; margin-top: 0.35rem; }
.card-sub { font-size: 0.8rem; color: #555; margin-top: 0.2rem; }

/* ── Hero ── */
.hero { text-align: center; margin-bottom: 2rem; }
.hero h1 { font-size: 2rem; font-weight: 700; }
.hero p { color: #888; margin-top: 0.4rem; }

/* ── Weather ── */
.weather-card {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}
.weather-card.weather-good { border-color: #2a5a2a; background: #111a11; }
.weather-main { display: flex; align-items: baseline; gap: 1rem; }
.weather-desc { font-size: 1.2rem; font-weight: 600; }
.weather-temp { font-size: 2rem; font-weight: 700; color: #4f9cf9; }
.weather-sub { font-size: 0.85rem; color: #666; margin-top: 0.25rem; }
.weather-badge {
  display: inline-block;
  margin-top: 0.6rem;
  font-size: 0.85rem;
  background: #1e3a1e;
  color: #6fcf6f;
  padding: 3px 10px;
  border-radius: 4px;
}
.weather-badge.bad { background: #2a1e1e; color: #cf8080; }

/* ── Forms ── */
.form-card {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.collapsible summary {
  cursor: pointer;
  font-weight: 600;
  color: #4f9cf9;
  user-select: none;
  list-style: none;
}
.collapsible summary::-webkit-details-marker { display: none; }
.form-inner { margin-top: 1rem; }
label {
  display: block;
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 0.85rem;
}
label input, label select, label textarea {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  color: #e8e8e8;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  font-family: inherit;
}
label input:focus, label select:focus, label textarea:focus {
  outline: none;
  border-color: #4f9cf9;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }

/* ── Auth ── */
.auth-wrap {
  max-width: 360px;
  margin: 3rem auto;
}
.auth-wrap h1 { font-size: 1.4rem; margin-bottom: 1rem; }
.auth-link { margin-top: 1rem; font-size: 0.85rem; color: #666; text-align: center; }
.auth-notice { font-size: 0.85rem; color: #666; margin-bottom: 1rem; }
.auth-notice a, .auth-link a { color: #4f9cf9; }
.error { color: #e07070; font-size: 0.85rem; margin-bottom: 0.75rem; }

/* ── Tags ── */
.vehicle-tag {
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 600;
}
.vehicle-tag.car { background: #1e3a5f; color: #4f9cf9; }
.vehicle-tag.moto { background: #3a1e1e; color: #cf7070; }
.vehicle-tag.both { background: #1e3a2a; color: #6fcf8f; }
.vehicle-tag-sm { font-size: 0.7rem; padding: 1px 5px; border-radius: 3px; }
.vehicle-tag-sm.car { background: #1e3a5f; color: #4f9cf9; }
.vehicle-tag-sm.moto { background: #3a1e1e; color: #cf7070; }

.score-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: #222;
  color: #888;
}
.score-badge.pos { background: #1e3a1e; color: #6fcf6f; }
.score-badge.neg { background: #2a1e1e; color: #cf6f6f; }

/* ── Detail pages ── */
.back-link { font-size: 0.85rem; color: #666; text-decoration: none; }
.back-link:hover { color: #aaa; }
.detail-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; flex-wrap: wrap; }
.detail-header h1 { font-size: 1.5rem; }
.detail-meta { display: flex; gap: 1rem; font-size: 0.85rem; color: #666; flex-wrap: wrap; margin-bottom: 1rem; }
.detail-desc { color: #bbb; line-height: 1.6; margin-bottom: 1.5rem; }

.participants-section { margin: 1.5rem 0; }
.participants-section h2 { font-size: 1rem; margin-bottom: 0.75rem; color: #ccc; }
.participant-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.participant { display: flex; align-items: center; gap: 0.4rem; background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 6px; padding: 0.3rem 0.65rem; font-size: 0.85rem; }

.inline-form { display: flex; align-items: center; gap: 0.5rem; }
.select-inline { background: #111; border: 1px solid #2a2a2a; color: #e8e8e8; border-radius: 6px; padding: 0.5rem 0.75rem; font-size: 0.9rem; }

/* ── Roads / voting ── */
.vote-section { display: flex; align-items: center; gap: 1rem; margin: 1rem 0 1.5rem; }
.score-big { font-size: 2rem; font-weight: 700; color: #888; }
.score-big.pos { color: #6fcf6f; }
.score-big.neg { color: #cf6f6f; }
.vote-form { display: flex; gap: 0.4rem; }
.vote-btn {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid #3a3a3a;
  background: #1a1a1a;
  color: #888;
  font-size: 1.1rem;
  cursor: pointer;
  transition: all 0.15s;
}
.vote-btn:hover { border-color: #aaa; color: #e8e8e8; }
.vote-btn.up.active { background: #1e3a1e; border-color: #6fcf6f; color: #6fcf6f; }
.vote-btn.down.active { background: #2a1e1e; border-color: #cf6f6f; color: #cf6f6f; }

.filter-bar { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.filter-btn { font-size: 0.8rem; padding: 3px 10px; border-radius: 4px; text-decoration: none; color: #888; border: 1px solid #2a2a2a; transition: all 0.15s; }
.filter-btn:hover, .filter-btn.active { border-color: #4f9cf9; color: #4f9cf9; }

/* ── Comments ── */
.comments-section { margin-top: 1.5rem; }
.comments-section h2 { font-size: 1rem; color: #ccc; margin-bottom: 0.75rem; }
.comment {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.6rem;
}
.comment.danger { border-color: #4a2020; background: #1a1010; }
.danger-tag { font-size: 0.7rem; background: #4a2020; color: #e07070; padding: 1px 6px; border-radius: 3px; margin-bottom: 0.35rem; display: inline-block; }
.comment p { font-size: 0.9rem; color: #ccc; }
.comment-meta { font-size: 0.75rem; color: #555; margin-top: 0.35rem; }
.comment-form { margin-top: 1rem; }
.danger-check { margin-bottom: 0.75rem; }
.checkbox-label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: #888; cursor: pointer; }
.checkbox-label input { width: auto; }

/* ── Coverage map ── */
#map {
  height: 500px;
  border-radius: 10px;
  margin-top: 1rem;
  border: 1px solid #2a2a2a;
}

/* ── Road route map ── */
#road-map {
  height: 340px;
  border-radius: 10px;
  margin: 1rem 0 1.5rem;
  border: 1px solid #2a2a2a;
}
#picker-map {
  height: 260px;
  border-radius: 8px;
  border: 1px solid #2a2a2a;
}
.coverage-stats {
  display: flex;
  align-items: baseline;
  gap: 2rem;
  margin-bottom: 1rem;
}
.stat-big { font-size: 2.5rem; font-weight: 700; color: #4f9cf9; }
.stat-big small { font-size: 0.9rem; font-weight: 400; color: #666; display: block; }
.stat-count { font-size: 1rem; color: #888; }
.empty-map { background: #1a1a1a; border: 1px solid #2a2a2a; border-radius: 10px; padding: 2rem; color: #666; margin-top: 1rem; }
.empty-map code { background: #222; padding: 2px 6px; border-radius: 3px; color: #aaa; }

.empty { color: #555; font-size: 0.9rem; }
.empty a { color: #4f9cf9; }

/* ── Profile ── */
.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s;
}
a.stat-card:hover { border-color: #4f9cf9; }
.stat-value { font-size: 1.8rem; font-weight: 700; color: #4f9cf9; }
.stat-label { font-size: 0.78rem; color: #666; margin-top: 0.25rem; }

/* ── Footer ── */
.site-footer { text-align: center; padding: 2rem; color: #333; font-size: 0.8rem; }
