.achievement-font {
  font-family: "Comfortaa", sans-serif;
  padding-left: 20px;
}
.achievement-container {
  background: #111;
  text-align: center;
}

.achievement-main-wrapper {
  width: 90%;
  max-width: 900px;
  margin: 3em auto;
}

.achievement-progress-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.achievement-progress-label {
  margin: 0;
}

.achievement-progress-bar-container {
  width: 100%;
  max-width: 400px;
  height: 28px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.achievement-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #06a77d 0%, #04d9a1 100%);
  border-radius: 12px;
  transition: width 0.6s ease;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  min-width: 50px;
  box-shadow: 0 2px 8px rgba(6, 167, 125, 0.4);
}

.achievement-progress-percentage {
  color: white;
  font-weight: 700;
  font-size: 0.85em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

.achievement-badge {
  position: relative;
  /*margin: 1.5em 3em;*/
  width: 4em;
  height: 6.2em;
  border-radius: 10px;
  display: inline-block;
  top: 0;
  transition: all 0.2s ease;
}

.achievement-badge::before,
.achievement-badge::after {
  position: absolute;
  width: inherit;
  height: inherit;
  border-radius: inherit;
  background: inherit;
  content: "";
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
}

.achievement-badge::before {
  transform: rotate(60deg);
}

.achievement-badge::after {
  transform: rotate(-60deg);
}

.achievement-badge:hover {
  top: -4px;
}

.achievement-badge .achievement-circle {
  width: 60px;
  height: 60px;
  position: absolute;
  background: #fff;
  z-index: 10;
  border-radius: 50%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
}

.achievement-badge .achievement-circle i.fa {
  font-size: 2em;
  margin-top: 8px;
  margin-left: 13px;
}

.achievement-badge .achievement-font {
  display: inline-block;
  margin-top: 1em;
}

.achievement-badge .achievement-ribbon {
  position: absolute;
  border-radius: 4px;
  padding: 4px 8px;
  width: auto;
  min-width: 110px;
  max-width: 140px;
  z-index: 11;
  color: #fff;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  height: auto;
  min-height: 26px;
  font-size: 13px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.27);
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.1);
  text-transform: uppercase;
  background: linear-gradient(to bottom right, #555 0%, #333 100%);
  cursor: default;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
}

.achievement-yellow {
  background: linear-gradient(to bottom right, #ffeb3b 0%, #fbc02d 100%);
  color: #ffb300;
}
.achievement-orange {
  background: linear-gradient(to bottom right, #ffc107 0%, #f57c00 100%);
  color: #f68401;
}
.achievement-pink {
  background: linear-gradient(to bottom right, #f48fb1 0%, #d81b60 100%);
  color: #dc306f;
}
.achievement-red {
  background: linear-gradient(to bottom right, #f4511e 0%, #b71c1c 100%);
  color: #c62828;
}
.achievement-purple {
  background: linear-gradient(to bottom right, #ab47bc 0%, #4527a0 100%);
  color: #7127a8;
}
.achievement-teal {
  background: linear-gradient(to bottom right, #4db6ac 0%, #00796b 100%);
  color: #34a297;
}
.achievement-blue {
  background: linear-gradient(to bottom right, #4fc3f7 0%, #2196f3 100%);
  color: #259af3;
}
.achievement-blue-dark {
  background: linear-gradient(to bottom right, #1976d2 0%, #283593 100%);
  color: #1c68c5;
}
.achievement-green {
  background: linear-gradient(to bottom right, #cddc39 0%, #8bc34a 100%);
  color: #7cb342;
}
.achievement-green-dark {
  background: linear-gradient(to bottom right, #4caf50 0%, #1b5e20 100%);
  color: #00944a;
}
.achievement-silver {
  background: linear-gradient(to bottom right, #e0e0e0 0%, #bdbdbd 100%);
  color: #9e9e9e;
}
.achievement-gold {
  background: linear-gradient(to bottom right, #e6ce6a 0%, #b7892b 100%);
  color: #b7892b;
}

.achievement-footer {
  text-align: center;
  margin: 5em auto;
}

.achievement-footer a {
  text-decoration: none;
  display: inline-block;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #111;
  border: 0.5px dashed #f8f8f8;
  color: #999;
  margin: 5px;
}

.achievement-footer a:hover {
  background: #222;
}

.achievement-footer a .achievement-icons {
  margin-top: 12px;
  display: inline-block;
  font-size: 20px;
}

/* Achievement Grid and Card Styles */
.achievement-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 30px;
  justify-items: center;
  padding: 20px;
}

.achievement-card {
  background: var(--cloud-bg2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 200px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.achievement-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-bg);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.05);
}

.achievement-card.locked {
  opacity: 0.5;
  filter: grayscale(100%);
}

.achievement-card.unlocked {
  border-color: rgba(6, 167, 125, 0.3);
}

.achievement-card-info {
  margin-top: 15px;
  text-align: center;
  color: var(--text);
  width: 100%;
  padding-left: 20px;
}

.achievement-card-title {
  font-weight: bold;
  margin-bottom: 8px;
  font-size: 14px;
}

.achievement-card-desc {
  opacity: 0.8;
  font-size: 11px;
  line-height: 1.4;
  margin-bottom: 12px;
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.achievement-card-points {
  color: #06a77d;
  font-weight: 700;
  font-size: 12px;
  margin-top: 10px;
}

.achievement-card-rarity {
  margin-top: 10px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.achievement-card-stats {
  font-size: 10px;
  margin-top: 8px;
  opacity: 0.5;
}

.achievement-card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}

.achievement-card-meta .achievement-card-rarity,
.achievement-card-meta .achievement-card-stats {
  margin-top: 0;
}

/* Mobile/Tablet News Article Layout */
@media (max-width: 768px) {
  .achievement-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 10px;
  }

  .achievement-card {
    max-width: 100%;
    flex-direction: row;
    align-items: flex-start;
    padding: 12px;
    gap: 12px;
  }

  .achievement-card .achievement-badge {
    flex-shrink: 0;
    width: 70px;
    height: 100px;
    margin: 0;
  }

  .achievement-card .achievement-badge .achievement-circle {
    width: 70px;
    height: 70px;
  }

  .achievement-card .achievement-badge .achievement-circle i.fa {
    font-size: 2.2em;
    margin-top: 10px;
    margin-left: 15px;
  }

  .achievement-card .achievement-badge .achievement-ribbon {
    min-width: 70px;
    max-width: 80px;
    font-size: 10px;
    padding: 3px 6px;
    min-height: 22px;
  }

  .achievement-card-info {
    margin-top: 0;
    text-align: left;
    flex: 1;
  }

  .achievement-card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
  }

  .achievement-card-meta {
    flex-direction: row;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 8px;
    font-size: 11px;
    opacity: 0.7;
  }

  .achievement-card-rarity,
  .achievement-card-stats {
    margin-top: 0;
    font-size: 11px;
  }

  .achievement-card-rarity::after {
    content: "•";
    margin-left: 8px;
    opacity: 0.5;
  }

  .achievement-card-desc {
    font-size: 12px;
    line-height: 1.5;
    min-height: auto;
    text-align: left;
    justify-content: flex-start;
    margin-bottom: 6px;
  }

  .achievement-card-points {
    margin-top: 6px;
    font-size: 13px;
  }

  .achievement-card:hover {
    transform: translateY(-2px);
  }

  .achievement-main-wrapper {
    margin: 1em auto;
    width: 95%;
  }

  .achievement-main-wrapper h2 {
    font-size: 1.3rem;
    margin: 15px 0;
  }

  .achievement-stats {
    margin-bottom: 20px;
    font-size: 1rem;
  }

  .achievement-stats p {
    margin: 5px 0;
  }

  .achievement-progress-bar-container {
    max-width: 100%;
    height: 24px;
  }

  .achievement-progress-percentage {
    font-size: 0.75em;
    padding-right: 8px;
  }
}
