body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  font-family: 'Open Sans', sans-serif;
  background: #F5F5F5;
  color: #333;
}

h1, h2, h3 {
  font-family: 'Montserrat', sans-serif;
}

.hero {
  font-size: 1.4rem;
  text-align: center;
  padding: 120px 20px;
  color: black;
  background: url('img/hero.jpg') center/cover no-repeat;
}

.navbar-brand-icon {
  height: 28px;
  width: 28px;
  object-fit: contain;
  margin: 3px 0;
}

.subtitle {
  margin: 10px auto 20px;
  max-width: 600px;
}

#start-btn {
  padding: 12px 20px;
  border-radius: 22px;
  border: none;
  background: #2E7D32;
  color: white;
  cursor: pointer;
  font-size: 16px;
}
#start-btn:hover {
  background: #256628;
}

.imprint-main section {
  padding: 20px 20px;
}

section {
  padding: 60px 20px;
  max-width: 1100px;
  margin: auto;
}

#leaderboard {
  max-width: none;
}

.leaderboard-medal {
  font-size: 0.95rem;
  line-height: 1;
}

.leaderboard-table {
  width: 100%;
}

@media (max-width: 576px) {
  #leaderboard .leaderboard-table {
    font-size: 0.95rem;
  }

  #leaderboard .leaderboard-table td,
  #leaderboard .leaderboard-table th {
    padding: 0.45rem 0.5rem;
  }

  #leaderboard .leaderboard-rank {
    max-width: 10rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.levels-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 25px;
}

.level-card {
  background: white;
  border-radius: 12px;
  padding: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  text-align: center;
}

.level-card img {
  width: 100%;
  border-radius: 12px;
  height: 150px;
  object-fit: cover;
}

#rules ul {
  list-style: none;
  padding: 0;
  font-size: 18px;
}

#rules li {
  margin-bottom: 15px;
}

main { flex: 1; }

.hike-card {
  border-radius: 14px;
  border: none;
  transition: transform 0.08s ease, box-shadow 0.15s ease;
}

.hike-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.08);
}

.hike-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.hike-title-block {
  flex: 1 1 240px;
  min-width: 220px;
}

.hike-date {
  margin-top: 4px;
  font-size: 0.82rem;
  color: #6c757d;
}

.hike-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
  justify-content: flex-end;
}

.hike-level-group,
.hike-stats-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.hike-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.hike-stats-group {
  justify-content: flex-start;
  opacity: 0.9;
}

.hike-level-group .badge {
  font-size: 0.85rem;
  font-weight: 800;
}

.hike-stats-group .badge {
  font-size: 0.72rem;
  font-weight: 600;
}

@media (max-width: 576px) {
  .hike-meta {
    justify-content: flex-start;
  }

  .hike-footer {
    justify-content: flex-start;
  }
}

.hike-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

.hike-actions button {
  padding: 4px 10px;
  font-size: 0.85rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
}

.hike-actions button:first-child {
  background: #2E7D32;
  color: #fff;
}

.hike-actions button:last-child {
  background: #5D4037;
  color: #fff;
}

.hike-meta-badges .badge {
  font-size: 0.75rem;
}

.hike-level-delta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.2rem;
  height: 2.2rem;
  font-size: 1.1rem;
  font-weight: 900;
  border-radius: 999px;
}

.hike-level-delta--up {
  background: #E8F5E9;
  color: #2E7D32;
}

.hike-level-delta--down {
  background: #FFEBEE;
  color: #C62828;
}

.hike-level-delta--flat {
  background: #ECEFF1;
  color: #546E7A;
}

.hike-level-current {
  background: #8D6E63;
  color: #fff;
  padding: 0.45rem 0.7rem;
  letter-spacing: 0.02em;
}

.hike-card--garmin {
  border-left: 6px solid #1976D2;
}

.hike-source-badge--garmin {
  background: #E3F2FD;
  color: #1565C0;
  font-weight: 700;
}

.profile-main section {
  padding-top: 0;
  padding-bottom: 0;
  max-width: none;
  margin: 0;
}

.profile-card {
  border: none;
  border-radius: 14px;
}

.profile-sidebar {
  margin-bottom: 1.25rem;
}

@media (min-width: 992px) {
  .profile-sidebar {
    margin-bottom: 0;
  }

  .profile-hikes {
    padding-left: 0.75rem;
  }
}

.profile-info p {
  margin-bottom: 0.4rem;
}

.profile-info .fw-bold {
  color: #5D4037;
}

.profile-main .btn-hike-add {
  background-color: #2E7D32;
  border-color: #2E7D32;
  color: #fff;
  font-weight: bold;
  width: 40px;
  height: 40px;
  font-size: 1.25rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.profile-main .btn-primary {
  background-color: #2E7D32;
  border-color: #2E7D32;
}

.profile-main .btn-primary:hover {
  background-color: #256628;
  border-color: #256628;
}

.profile-main .btn-outline-secondary {
  color: #5D4037;
  border-color: #5D4037;
}

.profile-main .btn-outline-secondary:hover {
  background-color: #5D4037;
  color: #fff;
}

.flash {
  max-width: 1100px;
  margin: 10px auto 0;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  display: none;
}

.flash--success {
  display: block;
  background: #E8F5E9;
  color: #2E7D32;
}

.flash--error {
  display: block;
  background: #FFEBEE;
  color: #C62828;
}

.bg-brown {
  background: #8D6E63;
  color: #fff;
}

footer {
  text-align: center;
  padding: 20px;
  background: #8D6E63;
  color: white;
}

.footer-links a {
  color: white;
  text-decoration: none;
}

.fade-in {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.level-badge {
  display: inline-block;
  padding: 8px 16px;
  border-radius: 999px;
  background: #2E7D32;
  color: #fff;
  font-weight: bold;
  margin-top: 10px;
}

.level-image {
  max-width: 260px;
}

.login-buttons {
  display: flex;
  gap: 12px;
}

.login-btn {
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  color: #fff;
  font-weight: bold;
}

.login-btn.google { background: #DB4437; }
.login-btn.microsoft { background: #2F2F2F; }

.fade-visible {
  opacity: 1;
  transform: translateY(0);
}