/* =====================================================
   SAATDURUM — ROZET VE BAŞARI SİSTEMİ (BADGES & ACHIEVEMENTS)
   Theme Studio & Liquid Glass Integrated — 2026 Edition
   ===================================================== */

/* ── ROZET PANELİ & GÖRÜNÜM KAPSAYICILARI ── */
.badges-view-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.badges-header-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 14px);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.badges-header-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.badges-trophy-avatar {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--accent-dim, rgba(245, 158, 11, 0.12));
  border: 1.5px solid var(--accent, rgba(245, 158, 11, 0.3));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
  box-shadow: 0 4px 16px var(--accent-glow, rgba(245, 158, 11, 0.2));
}

.badges-header-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-p);
  letter-spacing: -0.3px;
}

.badges-header-subtitle {
  font-size: 12px;
  color: var(--text-s);
  margin-top: 2px;
  max-width: 480px;
  line-height: 1.4;
}

.badges-header-stats {
  display: flex;
  align-items: center;
  gap: 10px;
}

.badges-stat-chip {
  background: var(--bg-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 10px);
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.badges-stat-chip-val {
  font-size: 16px;
  font-weight: 800;
  color: var(--accent);
  font-family: var(--font-mono, monospace);
}

.badges-stat-chip-lbl {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-s);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ── KONTROL ALANI: ARAMA, DURUM VE KATEGORİ SEÇİCİ ── */
.badges-controls-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.badges-search-box {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.badges-search-box svg {
  position: absolute;
  left: 12px;
  color: var(--text-s);
  pointer-events: none;
}

.badges-search-input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border-radius: var(--radius-sm, 10px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-p);
  font-size: 13px;
  outline: none;
  transition: all 0.2s ease;
}

.badges-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim, rgba(11, 214, 168, 0.15));
}

.badges-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.badges-filter-bar::-webkit-scrollbar {
  display: none;
}

.badges-filter-pill {
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-s);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  touch-action: manipulation;
}

.badges-filter-pill:hover {
  background: var(--bg-card-hv, rgba(255,255,255,0.08));
  color: var(--text-p);
  border-color: var(--border-hv, rgba(255,255,255,0.2));
}

.badges-filter-pill.active {
  background: var(--accent);
  color: var(--accent-text, #ffffff);
  border-color: var(--accent);
  font-weight: 700;
  box-shadow: 0 2px 10px var(--accent-glow, rgba(0,0,0,0.2));
}

.badges-filter-count {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  color: inherit;
}
.badges-filter-pill.active .badges-filter-count {
  background: rgba(255, 255, 255, 0.25);
}

/* ── KATEGORİ YATAY SCROLL BAR ── */
.badge-cat-scroll-row {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.badge-cat-scroll-row::-webkit-scrollbar {
  display: none;
}

.badge-cat-pill {
  padding: 5px 12px;
  border-radius: 8px;
  background: var(--bg-mid);
  border: 1px solid var(--border);
  color: var(--text-s);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  touch-action: manipulation;
}

.badge-cat-pill:hover {
  color: var(--text-p);
  border-color: var(--accent);
}

.badge-cat-pill.active {
  background: var(--accent-dim, rgba(11, 214, 168, 0.15));
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 700;
}

/* ── KATEGORİ GRUBU & BAŞLIKLARI ── */
.badges-category-group {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.badges-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 2px;
}

.badges-category-title {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-s);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.badges-category-progress-pill {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim, rgba(255,255,255,0.08));
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

/* ── ROZET GRID VE KART TASARIMI ── */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

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

@media (max-width: 360px) {
  .badges-grid {
    grid-template-columns: 1fr;
  }
}

.badge-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 12px);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  touch-action: manipulation;
}

.badge-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hv, rgba(255,255,255,0.25));
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.badge-card.unlocked {
  border-color: var(--badge-rarity-color, var(--accent));
  box-shadow: 0 4px 14px var(--badge-rarity-glow, rgba(0,0,0,0.1));
}

.badge-card.locked {
  opacity: 0.72;
  filter: grayscale(35%);
}

.badge-card.locked:hover {
  opacity: 0.95;
  filter: grayscale(0%);
}

.badge-card.secret.locked {
  background: repeating-linear-gradient(
    45deg,
    var(--bg-card),
    var(--bg-card) 10px,
    var(--bg-mid) 10px,
    var(--bg-mid) 20px
  );
}

.badge-featured-indicator {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 13px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
  z-index: 2;
}

.badge-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.badge-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--badge-rarity-glow, rgba(255,255,255,0.06));
  border: 1.5px solid var(--badge-rarity-color, var(--border));
  color: var(--badge-rarity-color, var(--text-p));
  transition: transform 0.2s ease;
}

.badge-card:hover .badge-icon-wrap {
  transform: scale(1.06);
}

.badge-lock-overlay {
  position: absolute;
  bottom: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--bg-deep, #000);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  color: var(--text-s);
}

.badge-rarity-pill {
  font-size: 9.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 7px;
  border-radius: 6px;
  border: 1px solid transparent;
}

/* ── NADİRLİK RENK VE IŞILTI PALETLERİ ── */
.rarity-common {
  --badge-rarity-color: #94a3b8;
  --badge-rarity-glow: rgba(148, 163, 184, 0.16);
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.3);
}

.rarity-rare {
  --badge-rarity-color: #06b6d4;
  --badge-rarity-glow: rgba(6, 182, 212, 0.18);
  background: rgba(6, 182, 212, 0.1);
  color: #06b6d4;
  border-color: rgba(6, 182, 212, 0.35);
}

.rarity-epic {
  --badge-rarity-color: #a855f7;
  --badge-rarity-glow: rgba(168, 85, 247, 0.22);
  background: rgba(168, 85, 247, 0.12);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.4);
}

.rarity-legendary {
  --badge-rarity-color: #eab308;
  --badge-rarity-glow: rgba(234, 179, 8, 0.25);
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.2) 0%, rgba(249, 115, 22, 0.15) 100%);
  color: #fde047;
  border-color: rgba(234, 179, 8, 0.5);
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.18);
}

.badge-card-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.badge-card-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-p);
  line-height: 1.3;
}

.badge-card-desc {
  font-size: 11.5px;
  color: var(--text-s);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── İLERLEME ÇUBUĞU ── */
.badge-progress-wrap {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.badge-progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-s);
}

.badge-progress-track {
  width: 100%;
  height: 5px;
  background: var(--bg-mid);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.badge-progress-bar {
  height: 100%;
  background: var(--badge-rarity-color, var(--accent));
  border-radius: 4px;
  transition: width 0.4s ease;
}

.badge-card.unlocked .badge-earned-tag {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--badge-rarity-color, var(--accent));
}

.badges-empty-state {
  text-align: center;
  padding: 40px 20px;
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--text-s);
}

/* ═════════════════════════════════════════════════════
   🏆 PROFİL SAYFASI: BAŞARI KİTAPLIĞI & VİTRİN WIDGET'I
   ═════════════════════════════════════════════════════ */
.prof-badges-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 14px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  position: relative;
  overflow: hidden;
}

.prof-badges-widget-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.prof-badges-widget-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-p);
  display: flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.prof-badges-view-all-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 6px;
  touch-action: manipulation;
  transition: all 0.2s ease;
}

.prof-badges-view-all-btn:hover {
  background: var(--accent-dim, rgba(11, 214, 168, 0.12));
}

/* ── BAŞARI KİTAPLIĞI RAF ŞERİDİ (BOOKSHELF / PLAQUE SHOWCASE) ── */
.prof-badges-shelf {
  position: relative;
  background: var(--bg-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 12px);
  padding: 14px 10px 18px 10px;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.15);
}

.prof-badges-shelf::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(180deg, var(--border) 0%, rgba(0,0,0,0.25) 100%);
  border-bottom-left-radius: var(--radius-sm, 12px);
  border-bottom-right-radius: var(--radius-sm, 12px);
}

.prof-badges-chips-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
  gap: 8px;
  align-items: end;
}

@media (max-width: 480px) {
  .prof-badges-chips-row {
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
  }
}

.prof-badge-plaque-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  touch-action: manipulation;
}

.prof-badge-plaque-item:hover {
  transform: translateY(-4px) scale(1.04);
}

.prof-badge-plaque-medal {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--badge-rarity-glow, rgba(255,255,255,0.08));
  border: 2px solid var(--badge-rarity-color, var(--accent));
  color: var(--badge-rarity-color, var(--accent));
  box-shadow: 0 4px 12px var(--badge-rarity-glow, rgba(0,0,0,0.2));
}

.plaque-star-pin {
  position: absolute;
  top: -5px;
  right: -5px;
  font-size: 11px;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

.prof-badge-plaque-name {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-p);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 72px;
  line-height: 1.2;
}

.prof-badge-plaque-tier {
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  padding: 1px 4px;
  border-radius: 4px;
}

.prof-badges-empty-shelf {
  grid-column: 1 / -1;
  text-align: center;
  padding: 16px 12px;
  color: var(--text-s);
}

/* ── ROZET DETAY MODALI ── */
.badge-detail-dialog {
  max-width: 420px !important;
  text-align: center;
}

.badge-detail-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 10px 0 16px 0;
}

.badge-detail-big-icon {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  background: var(--badge-rarity-glow, rgba(245, 158, 11, 0.15));
  border: 2.5px solid var(--badge-rarity-color, var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--badge-rarity-color, var(--accent));
  box-shadow: 0 8px 24px var(--badge-rarity-glow, rgba(0,0,0,0.25));
  animation: pulseBig 2.5s infinite ease-in-out;
}

@keyframes pulseBig {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.badge-detail-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-p);
}

.badge-detail-category-tag {
  font-size: 11px;
  color: var(--text-s);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-detail-desc {
  font-size: 13px;
  color: var(--text-s);
  line-height: 1.5;
  background: var(--bg-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  text-align: left;
}

.badge-detail-status-box {
  background: var(--bg-mid);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

/* ── KUTLAMA MODALI (CELEBRATION POPUP) ── */
.badge-celebrate-dialog {
  max-width: 380px !important;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: var(--bg-mid) !important;
  border: 1.5px solid var(--accent) !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 24px var(--accent-glow) !important;
  animation: popIn 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.badge-celebrate-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.badge-celebrate-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
}

.badge-celebrate-header-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-dim);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 12px;
  border-radius: 20px;
}

.badge-celebrate-icon-box {
  width: 80px;
  height: 80px;
  border-radius: 24px;
  background: var(--accent-dim);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  box-shadow: 0 0 32px var(--accent-glow);
  margin: 6px 0;
}

.badge-celebrate-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-p);
  letter-spacing: -0.3px;
}

.badge-celebrate-desc {
  font-size: 13px;
  color: var(--text-s);
  line-height: 1.5;
  max-width: 300px;
}

.badge-celebrate-actions {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
}

.badge-celebrate-actions button {
  flex: 1;
}

/* ── BİLDİRİM KUTUSU ROZET KAZANIMI STİLLERİ ── */
.notif-item.is-badge-notif {
  background: rgba(11, 214, 168, 0.04);
  border-left: 3px solid var(--accent);
}

.notif-icon-box.notif-icon-badge {
  background: var(--accent-dim, rgba(11, 214, 168, 0.12));
  border-color: rgba(11, 214, 168, 0.3);
}
