/**
 * achievement-styles.css
 * Mordheim Campaign Manager — Achievement UI Styles
 */

/* ===== ACHIEVEMENT MODAL ===== */

.ach-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 14px;
}

.ach-tab {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-muted, #888);
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Lato', sans-serif;
  white-space: nowrap;
}

.ach-tab:hover { border-color: rgba(201,169,89,0.3); color: var(--text-secondary); }
.ach-tab.active { background: rgba(201,169,89,0.12); border-color: rgba(201,169,89,0.4); color: var(--color-gold, #c9a959); }

.ach-stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.ach-stats-bar .ach-ap { font-family: 'Cinzel', serif; font-weight: 600; color: var(--color-gold); }

/* ===== ACHIEVEMENT GRID ===== */

.ach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 12px;
}

@media (max-width: 500px) {
  .ach-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* ===== ACHIEVEMENT CARD ===== */

.ach-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 14px 10px 12px;
  text-align: center;
  transition: all 0.2s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.ach-card:hover { border-color: rgba(201,169,89,0.25); transform: translateY(-1px); }

.ach-card.locked { opacity: 0.45; }
.ach-card.locked:hover { opacity: 0.65; }

/* Tier Glow für freigeschaltete */
.ach-card.unlocked { opacity: 1; }
.ach-card.unlocked.tier-bronze { border-color: rgba(205,127,50,0.4); box-shadow: 0 0 8px rgba(205,127,50,0.1); }
.ach-card.unlocked.tier-silver { border-color: rgba(192,192,192,0.4); box-shadow: 0 0 8px rgba(192,192,192,0.1); }
.ach-card.unlocked.tier-gold   { border-color: rgba(255,215,0,0.4);  box-shadow: 0 0 12px rgba(255,215,0,0.12); }
.ach-card.unlocked.tier-platinum { border-color: rgba(185,242,255,0.5); box-shadow: 0 0 16px rgba(185,242,255,0.15); }

.ach-card.unique { border-color: rgba(168,85,247,0.3); }
.ach-card.unique.unlocked { border-color: rgba(168,85,247,0.5); box-shadow: 0 0 12px rgba(168,85,247,0.15); }

.ach-card.seasonal { border-color: rgba(20,184,166,0.3); }
.ach-card.seasonal.unlocked { border-color: rgba(20,184,166,0.5); box-shadow: 0 0 10px rgba(20,184,166,0.12); }

.ach-card-img {
  width: 80px;
  height: 80px;
  margin: 0 auto 8px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  overflow: hidden;
}

.ach-card-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }

.ach-card.locked .ach-card-img { filter: grayscale(1) brightness(0.4); }

.ach-card-tier {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}

.ach-card-tier.bronze   { color: #CD7F32; }
.ach-card-tier.silver   { color: #C0C0C0; }
.ach-card-tier.gold     { color: #FFD700; }
.ach-card-tier.platinum { color: #B9F2FF; }
.ach-card-tier.unique   { color: #A855F7; }
.ach-card-tier.seasonal { color: #14B8A6; }

.ach-card-name {
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary, #ddd);
  margin-bottom: 4px;
  line-height: 1.2;
}

.ach-card.locked .ach-card-name { color: var(--text-muted); }

.ach-card-desc {
  font-size: 0.68rem;
  color: var(--text-muted, #888);
  line-height: 1.3;
  margin-bottom: 6px;
}

/* ===== PROGRESS BAR ===== */

.ach-progress {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}

.ach-progress-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease-out;
}

.ach-progress-fill.bronze   { background: #CD7F32; }
.ach-progress-fill.silver   { background: #C0C0C0; }
.ach-progress-fill.gold     { background: #FFD700; }
.ach-progress-fill.platinum { background: #B9F2FF; }

.ach-progress-text {
  font-size: 0.62rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Unlocked Checkmark */
.ach-card .ach-check {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 0.75rem;
}

/* Unlocked Date */
.ach-card-date {
  font-size: 0.6rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ===== HIDDEN ACHIEVEMENT CARD ===== */

.ach-card.hidden-locked .ach-card-img {
  font-size: 1.5rem;
  color: var(--text-muted);
}

/* ===== UNIQUE CLAIMER ===== */

.ach-unique-claimer {
  font-size: 0.62rem;
  color: #A855F7;
  margin-top: 3px;
  font-style: italic;
}

/* ===== UNLOCK ANIMATION ===== */

.ach-unlock-overlay {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 55000;
  animation: gf-fadeIn 0.4s ease-out;
}

.ach-unlock-card {
  text-align: center;
  max-width: 480px;
  width: 94%;
  padding: 44px 34px;
  animation: ach-unlockPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ach-unlock-icon {
  margin-bottom: 20px;
  animation: ach-iconGlow 2s ease-in-out infinite;
}

.ach-unlock-icon img {
  width: 240px;
  height: 240px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 0 50px rgba(201,169,89,0.4), 0 0 100px rgba(201,169,89,0.15);
  border: 2px solid rgba(201,169,89,0.3);
}

.ach-unlock-title {
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.ach-unlock-title.bronze   { color: #CD7F32; }
.ach-unlock-title.silver   { color: #C0C0C0; }
.ach-unlock-title.gold     { color: #FFD700; }
.ach-unlock-title.platinum { color: #B9F2FF; }

.ach-unlock-name {
  font-family: 'Cinzel', serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--color-gold, #c9a959);
  margin-bottom: 8px;
  text-shadow: 0 0 20px rgba(201,169,89,0.3);
}

.ach-unlock-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.ach-unlock-flavor {
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.ach-unlock-flavor::before { content: '\201E'; }
.ach-unlock-flavor::after  { content: '\201C'; }

.ach-unlock-xp {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  color: #4ade80;
  margin-bottom: 20px;
}

.ach-unlock-dismiss {
  padding: 10px 32px;
  border: 1px solid rgba(201,169,89,0.5);
  border-radius: 8px;
  background: rgba(201,169,89,0.1);
  color: var(--color-gold, #c9a959);
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}

.ach-unlock-dismiss:hover { background: rgba(201,169,89,0.2); }

/* ===== SHOWCASE (Dashboard) ===== */

.ach-showcase {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.ach-showcase-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  cursor: pointer;
  transition: all 0.15s;
}

.ach-showcase-item:hover { border-color: rgba(201,169,89,0.3); }

.ach-showcase-item .ach-mini-icon {
  width: 20px;
  height: 20px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  overflow: hidden;
}

.ach-showcase-item .ach-mini-icon img { width: 100%; height: 100%; object-fit: cover; }

/* ===== ANIMATIONS ===== */

@keyframes ach-unlockPop {
  0% { transform: scale(0.3); opacity: 0; }
  60% { transform: scale(1.05); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes ach-iconGlow {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.3) drop-shadow(0 0 12px rgba(201,169,89,0.5)); }
}

/* ===== DETAIL OVERLAY (on card click) ===== */

.ach-detail {
  background: rgba(26,18,8,0.98);
  border: 1px solid rgba(201,169,89,0.3);
  border-radius: 10px;
  padding: 16px;
  margin-top: 10px;
}

.ach-detail-flavor {
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 10px;
}

.ach-detail-flavor::before { content: '\201E'; }
.ach-detail-flavor::after  { content: '\201C'; }

/* Responsive: Unlock-Overlay auf kleinen Screens */
@media (max-width: 480px) {
  .ach-unlock-icon img { width: 160px; height: 160px; }
  .ach-unlock-name { font-size: 1.5rem; }
  .ach-unlock-card { padding: 30px 20px; }
}
