/* ═══════════════════════════════════════════════════
   TASKS — задания
═══════════════════════════════════════════════════ */

.task-item {
  position: relative;
  overflow: hidden;
  background: rgba(12, 12, 20, 0.92);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  padding: 12px 13px;
  margin-bottom: 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 4px 16px rgba(0,0,0,.32);
  transition: opacity .4s ease, filter .4s ease;
}
.task-item::before {
  content: '';
  position: absolute;
  top: -6px; left: 16%; right: 16%; height: 10px;
  border-radius: 999px;
  filter: blur(6px);
  opacity: .5;
  pointer-events: none;
}
.task-item[data-cat="subscribe"] {
  background: linear-gradient(150deg, rgba(95,245,223,.07) 0%, rgba(12,12,20,.95) 100%);
  border-color: rgba(95,245,223,.24);
}
.task-item[data-cat="subscribe"]::before { background: linear-gradient(90deg, #5FF5DF, #5BB8FF); }
.task-item[data-cat="invite"] {
  background: linear-gradient(150deg, rgba(255,200,58,.07) 0%, rgba(12,12,20,.95) 100%);
  border-color: rgba(255,200,58,.24);
}
.task-item[data-cat="invite"]::before { background: linear-gradient(90deg, #FFD75A, #FFB200); }

/* Затемняем только контент (не сам бейдж «Выполнено» — иначе он тоже
   посереет и станет незаметным, filter/opacity красят всё поддерево). */
.task-item.done { pointer-events: none; }
.task-item.done .task-content {
  opacity: .38;
  filter: grayscale(.7);
}

.task-done-badge {
  display: none;
  position: absolute;
  top: 10px; right: 10px;
  align-items: center; gap: 4px;
  background: rgba(0,229,160,.14);
  border: 1px solid rgba(0,229,160,.4);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 10px; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase;
  color: #00E5A0;
  box-shadow: 0 0 14px rgba(0,229,160,.22);
  z-index: 2;
}
.task-done-badge svg { width: 11px; height: 11px; flex-shrink: 0; }
.task-item.done .task-done-badge { display: flex; }

.task-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 9px;
}

/* ── Иконка-медальон — тот же приём, что у достижений: кольцо-градиент
   вокруг иконки вместо голого значка ─────────────────────────────── */
.task-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid transparent;
  background:
    linear-gradient(#16131f, #16131f) padding-box,
    conic-gradient(from 200deg, currentColor, transparent 75%) border-box;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 2px 10px rgba(0,0,0,.35);
}
.task-icon svg { width: 20px; height: 20px; }
.task-item[data-cat="subscribe"] .task-icon { color: #5FF5DF; }
.task-item[data-cat="invite"]    .task-icon { color: #FFD75A; }
.task-item[data-cat="subscribe"] .task-icon svg { filter: drop-shadow(0 0 6px rgba(95,245,223,.55)); }
.task-item[data-cat="invite"]    .task-icon svg { filter: drop-shadow(0 0 6px rgba(255,200,58,.55)); }

.task-main { flex: 1; min-width: 0; }

.task-header {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 3px;
}
.task-title {
  font-family: var(--ld-font-display, 'Unbounded', sans-serif);
  font-size: 12px; font-weight: 800; font-style: italic;
  color: #fff; letter-spacing: .02em;
}
.task-reward-badge {
  display: flex; align-items: center; gap: 3px;
  background: rgba(255,200,58,.15);
  border: 1px solid rgba(255,200,58,.3);
  border-radius: 20px; padding: 2px 8px;
  font-size: 12px; font-weight: 800;
  color: var(--ld-star, #FFC83A);
  white-space: nowrap; flex-shrink: 0;
}
.task-desc {
  font-size: 11px; color: rgba(255,255,255,.45); line-height: 1.35;
}
.task-progress-wrap {
  display: flex; align-items: center; gap: 6px; margin-bottom: 9px;
}
.task-progress-bar {
  flex: 1; height: 3px; background: rgba(255,255,255,.09); border-radius: 4px; overflow: hidden;
}
.task-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #5FF5DF, #A98BFF);
  border-radius: 4px; transition: width .4s ease;
}
.task-progress-label {
  font-size: 10px; color: rgba(95,245,223,.6); white-space: nowrap;
  font-weight: 700;
}
.task-btn {
  position: relative;
  overflow: hidden;
  width: 100%; padding: 10px;
  border: none; border-radius: 999px;
  background: var(--ld-holo, linear-gradient(120deg,#5FF5DF,#5BB8FF,#A98BFF));
  color: var(--ld-on-holo, #0d0f1a);
  font-family: var(--ld-font-display, 'Unbounded', sans-serif);
  font-weight: 800; font-style: italic;
  font-size: 12px; letter-spacing: .06em;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(95,245,223,.25);
  transition: transform .1s, opacity .15s;
  -webkit-tap-highlight-color: transparent;
}
.task-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.5) 50%, transparent 60%);
  background-size: 220% 100%;
  animation: task-btn-shine 2.8s ease-in-out infinite;
}
@keyframes task-btn-shine {
  0%   { background-position: 130% 0; }
  60%, 100% { background-position: -30% 0; }
}
.task-btn:active { transform: scale(.97); }
.task-btn.done {
  background: rgba(0,229,160,.12);
  color: #00E5A0;
  box-shadow: none;
  font-style: normal;
  cursor: default;
  border: 1px solid rgba(0,229,160,.25);
}
.task-btn.done::after { animation: none; content: none; }
