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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

/* Landing Page */
.landing {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
}

.hero {
  text-align: center;
  padding: 4rem 0;
}

.hero h1 {
  font-size: 3rem;
  color: #1a73e8;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 1.5rem;
  color: #555;
  margin-bottom: 1rem;
}

.description {
  color: #666;
  max-width: 500px;
  margin: 0 auto 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-strava {
  background: #fc4c02;
  color: white;
}

.btn-primary {
  background: #1a73e8;
  color: white;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.feature {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.feature .flag {
  font-size: 2rem;
}

.feature h3 {
  margin: 0.5rem 0;
}

.how-it-works {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  margin-top: 2rem;
}

.how-it-works h2 {
  margin-bottom: 1rem;
}

.how-it-works ol {
  padding-left: 1.5rem;
}

.how-it-works li {
  margin: 0.5rem 0;
}

/* Dashboard */
.dashboard {
  display: grid;
  grid-template-columns: 1fr 350px;
  height: 100vh;
}

.map-container {
  position: relative;
}

#map {
  width: 100%;
  height: 100%;
}

.sidebar {
  background: white;
  overflow-y: auto;
  border-left: 1px solid #e0e0e0;
}

.sidebar-header {
  padding: 1rem;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-info img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.user-name {
  font-weight: 600;
}

.logout-btn {
  color: #666;
  text-decoration: none;
  font-size: 0.875rem;
}

.stats-section {
  padding: 1rem;
  border-bottom: 1px solid #e0e0e0;
}

.stats-title {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.stat-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0.5rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.stat-flag {
  font-size: 1.25rem;
}

.stat-info {
  flex: 1;
}

.stat-count {
  font-weight: 600;
}

.stat-percent {
  font-size: 0.875rem;
  color: #666;
}

.progress-bar {
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  margin-top: 0.25rem;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: #1a73e8;
  transition: width 0.3s;
}

.country-tabs {
  display: flex;
  border-bottom: 1px solid #e0e0e0;
}

.country-tab {
  flex: 1;
  padding: 0.75rem;
  text-align: center;
  cursor: pointer;
  border: none;
  background: none;
  font-size: 1.25rem;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.country-tab.active {
  opacity: 1;
  border-bottom: 2px solid #1a73e8;
}

.sync-section {
  padding: 1rem;
  border-bottom: 1px solid #e0e0e0;
}

.sync-btn {
  width: 100%;
  padding: 0.75rem;
  background: #1a73e8;
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

.sync-btn:hover {
  background: #1557b0;
}

.sync-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.sync-status {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #666;
}

.activities-section {
  padding: 1rem;
}

.activities-title {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.activity-list {
  max-height: 300px;
  overflow-y: auto;
}

.activity-item {
  padding: 0.75rem;
  border-bottom: 1px solid #f0f0f0;
}

.activity-name {
  font-weight: 500;
}

.activity-date {
  font-size: 0.8rem;
  color: #888;
}

/* Municipality tooltip */
.municipality-tooltip {
  background: white;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  font-size: 0.875rem;
}

@media (max-width: 768px) {
  .dashboard {
    grid-template-columns: 1fr;
    grid-template-rows: 50vh 1fr;
  }

  .features {
    grid-template-columns: 1fr;
  }
}
