/* Achievements Section */
#achievementsSection {
  background: #23272b;
  border-radius: 16px;
  padding: 1.5rem 1rem 1rem 1rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.18);
}

/* Achievements Section Grid: 3 columns max */
#achievementsSection .row.g-2 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

/* Small, square achievement cards */
.achievement-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  background: #222e23;
  border-radius: 10px;
  padding: 0.3rem .8rem;
  min-width: 260px;
  max-width: 380px;
  min-height: 70px;
  max-height: 70px;
  width: 100%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  border: 2px solid transparent;
  margin: 0 auto;
  text-align: left;
  gap: 0.7rem;
}

.achievement-card.unlocked {
  border-color: #4b50b8;
  background: linear-gradient(90deg, #5f4b8b 0%, #2e3192 100%);
  color: #fff;
}

.achievement-card.locked {
  border-color: #444;
  background: #222e23;
  color: #888;
  opacity: 0.7;
}

.achievement-badge {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  filter: drop-shadow(0 2px 6px #0004);
}

.achievement-card .achievement-text-area {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.achievement-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.1rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.achievement-desc {
  font-size: 0.82rem;
  opacity: 0.92;
  display: block;
  margin-top: 0.1rem;
  line-height: 1.2;
  width: 100%;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}
@media (max-width: 900px) {
  .achievements-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .achievements-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  #achievementsSection .row.g-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .achievement-card {
    padding: 0.6rem 0.7rem;
  }
}
@media (max-width: 600px) {
  #achievementsSection .row.g-2 {
    grid-template-columns: 1fr;
  }
  .achievement-card {
    width: 100%;
    min-height: 60px;
    padding: 0.4rem 0.5rem;
    gap: 0.5rem;
    margin: 0 auto; /* Remove auto margin */
    box-sizing: border-box;
  }
  .achievement-badge {
    width: 24px;
    height: 24px;
    font-size: 1.1rem;
  }
  .achievement-title {
    font-size: 0.85rem;
  }
  .achievement-desc {
    font-size: 0.7rem;
  }
}

/* Light mode override for achievements section */
body.bg-light #achievementsSection {
  background: #f8f9fa;
  color: #23272b;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.achievement-card.achievement-collapsed {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition: max-height 0.35s cubic-bezier(.4,0,.2,1), opacity 0.25s cubic-bezier(.4,0,.2,1);
}
.achievement-card.achievement-collapsing {
  opacity: 0;
  max-height: 0;
  transition: opacity 0.2s, max-height 0.3s;
  overflow: hidden;
  pointer-events: none;
}
.achievement-card.achievement-expanded {
  opacity: 1;
  max-height: 90px;
  transition: opacity 0.2s, max-height 0.3s;
}