:root {
  --ach-bg: radial-gradient(1400px 900px at 80% -10%, #1a2240 0%, #060913 55%);
  --ach-surface: rgba(10, 18, 32, 0.72);
  --ach-border: rgba(255, 255, 255, 0.08);
  --ach-border-strong: rgba(255, 255, 255, 0.16);
  --ach-text: #f6f7fb;
  --ach-muted: #9aa5c3;
  --ach-success: #5de6c4;
  --ach-lock: rgba(255, 255, 255, 0.05);
  --ach-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  --ach-radius: 20px;
  --ach-glass: saturate(180%) blur(10px);
}

.achievements-page {
  margin: 0;
  min-height: 100dvh;
  color: var(--ach-text);
  background: var(--ach-bg);
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.ach-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: linear-gradient(180deg, rgba(6, 9, 19, 0.92), rgba(6, 9, 19, 0.35));
  border-bottom: 1px solid var(--ach-border);
  backdrop-filter: var(--ach-glass);
  -webkit-backdrop-filter: var(--ach-glass);
}

.ach-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(20px, 4vw, 46px);
  max-width: 1200px;
  margin: 0 auto;
  gap: 14px;
}

.ach-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.ach-brand__logo {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.ach-nav {
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
}

.ach-nav a {
  color: var(--ach-muted);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 12px;
  transition: background 0.18s ease, color 0.18s ease;
}

.ach-nav a:hover,
.ach-nav a:focus {
  color: var(--ach-text);
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

.ach-container {
  max-width: 1200px;
  margin: clamp(24px, 6vw, 40px) auto;
  padding: 0 clamp(18px, 4vw, 40px) clamp(40px, 8vw, 60px);
}

.ach-card {
  background: var(--ach-surface);
  border-radius: var(--ach-radius);
  border: 1px solid var(--ach-border);
  box-shadow: var(--ach-shadow);
  padding: clamp(24px, 5vw, 40px);
  backdrop-filter: var(--ach-glass);
  -webkit-backdrop-filter: var(--ach-glass);
}

.ach-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(18px, 4vw, 30px);
  flex-wrap: wrap;
}

.ach-title {
  margin: 0 0 6px;
  font-size: clamp(24px, 5vw, 36px);
}

.ach-subtitle {
  margin: 0;
  color: var(--ach-muted);
  max-width: 520px;
  line-height: 1.5;
}

.ach-progress {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--ach-border-strong);
  background: rgba(255, 255, 255, 0.08);
  font-size: clamp(18px, 4vw, 28px);
  font-weight: 600;
}

.ach-progress__divider {
  opacity: 0.6;
}

.ach-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: clamp(18px, 4vw, 28px);
}

.ach-summary__pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--ach-border);
  font-size: 0.95rem;
  color: var(--ach-muted);
}

.ach-summary__pill strong {
  color: var(--ach-text);
}

.ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: clamp(16px, 4vw, 26px);
}

.ach-card-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(18px, 4vw, 24px);
  border-radius: 18px;
  border: 1px solid var(--ach-border);
  background: rgba(11, 17, 30, 0.78);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
  min-height: 220px;
}

.ach-card-item[data-unlocked="true"] {
  border-color: rgba(93, 230, 196, 0.7);
  background: linear-gradient(180deg, rgba(93, 230, 196, 0.08) 0%, rgba(11, 17, 30, 0.85) 100%);
}

.ach-card-item[data-unlocked="false"]::after {
  content: '\1F512';
  position: absolute;
  top: 16px;
  right: 18px;
  font-size: 1.3rem;
  color: rgba(255, 255, 255, 0.35);
}

.ach-card-item__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--ach-muted);
}

.ach-card-item__title {
  margin: 0;
  font-size: 1.1rem;
}

.ach-card-item__desc {
  margin: 0;
  color: var(--ach-muted);
  line-height: 1.5;
}

.ach-card-item__status {
  margin-top: auto;
  font-size: 0.9rem;
  color: rgba(93, 230, 196, 0.95);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ach-card-item__status svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.ach-card-item[data-unlocked="false"] .ach-card-item__status {
  color: var(--ach-muted);
}

.ach-empty {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--ach-muted);
}

.ach-footer {
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  padding: clamp(24px, 6vw, 32px);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .ach-card-item {
    min-height: 200px;
  }

  .ach-header__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .ach-progress {
    align-self: flex-start;
  }
}
