/* ═══════════════════════════════════════════════════
   TASK SYSTEM — rozszerzenie stylu Komendy
   ═══════════════════════════════════════════════════ */

.lbn-task {
  --task-hunt: #c4a24a;
  --task-hunt-soft: rgba(196, 162, 74, 0.35);
}

.task-hero-banner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 12px auto 0;
  max-width: 460px;
}

.task-hero-chip {
  display: inline-grid;
  grid-template-columns: 48px 1fr;
  gap: 8px;
  align-items: center;
  min-width: 150px;
  padding: 6px 10px 6px 6px;
  border: 1px solid rgba(196, 162, 74, 0.5);
  background: rgba(0, 0, 0, 0.4);
  animation: task-chip-glow 2.6s ease-in-out infinite;
}

.task-hero-chip:nth-child(2) {
  animation-delay: 0.45s;
}

.task-hero-chip:nth-child(3) {
  animation-delay: 0.9s;
}

.task-hero-chip__ring {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(138, 106, 26, 0.55);
  background: linear-gradient(180deg, #2a2210, #100c08);
  overflow: hidden;
  position: relative;
}

.task-hero-chip__ring::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 80%, rgba(212, 175, 55, 0.28), transparent 65%);
  animation: task-ember 1.8s ease-in-out infinite;
}

.task-hero-chip__ring img {
  width: 48px;
  height: 48px;
  image-rendering: pixelated;
  position: relative;
  z-index: 1;
}

.task-hero-chip__name {
  display: block;
  font-family: "Cinzel", serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #f0e2b8;
}

.task-hero-chip__hint {
  display: block;
  margin-top: 1px;
  font-size: 11px;
  color: var(--ink-soft);
}

.task-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin: 12px 0 4px;
}

.task-jump a {
  display: inline-block;
  padding: 4px 8px;
  border: 1px solid rgba(138, 106, 26, 0.55);
  background: rgba(0, 0, 0, 0.35);
  color: var(--ink-soft);
  text-decoration: none;
  font-family: "Cinzel", serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.task-jump a:hover {
  border-color: rgba(212, 175, 55, 0.75);
  color: var(--gold-bright);
  background: rgba(40, 30, 12, 0.7);
}

.task-tier {
  margin-top: 14px;
  border: 1px solid rgba(138, 106, 26, 0.45);
  background: rgba(0, 0, 0, 0.28);
  scroll-margin-top: 12px;
}

.task-tier__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(138, 106, 26, 0.35);
  background: linear-gradient(90deg, rgba(60, 44, 14, 0.65), rgba(20, 16, 10, 0.4));
}

.task-tier__title {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #f0e2b8;
}

.task-tier__lvl {
  font-family: "Cinzel", serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--gold-bright);
  padding: 3px 8px;
  border: 1px solid rgba(212, 175, 55, 0.45);
  background: rgba(0, 0, 0, 0.35);
}

.task-tier__body {
  padding: 10px 10px 12px;
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 8px;
}

.task-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px 8px;
  border: 1px solid rgba(138, 106, 26, 0.4);
  background: rgba(0, 0, 0, 0.35);
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.2s ease;
}

.task-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--gold), transparent);
  opacity: 0.55;
}

.task-card:hover {
  border-color: rgba(212, 175, 55, 0.65);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.16);
  transform: translateY(-2px);
}

.task-outfit {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(138, 106, 26, 0.5);
  background:
    radial-gradient(circle at 50% 70%, rgba(212, 175, 55, 0.2), transparent 60%),
    rgba(0, 0, 0, 0.45);
  overflow: hidden;
  position: relative;
}

.task-outfit::after {
  content: "";
  position: absolute;
  inset: -20%;
  background: conic-gradient(from 0deg, transparent, rgba(212, 175, 55, 0.16), transparent 40%);
  animation: task-spin 4.5s linear infinite;
  opacity: 0.7;
}

.task-outfit img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  object-position: center center;
  image-rendering: pixelated;
  position: relative;
  z-index: 1;
  animation: task-bob 2.2s ease-in-out infinite;
}

.task-outfit--pumpkin,
.task-hero-chip__ring.task-outfit--pumpkin {
  border-color: rgba(230, 122, 24, 0.7) !important;
  background:
    radial-gradient(circle at 50% 55%, rgba(255, 160, 40, 0.35), transparent 62%),
    rgba(20, 10, 4, 0.75) !important;
  box-shadow: 0 0 12px rgba(230, 122, 24, 0.35);
}

.task-outfit--pumpkin::after {
  background: conic-gradient(from 0deg, transparent, rgba(255, 170, 60, 0.28), transparent 40%);
}

.task-outfit--pumpkin .task-outfit-fx,
.task-hero-chip__ring.task-outfit--pumpkin .task-outfit-fx {
  image-rendering: auto;
  animation: task-pumpkin-float 2s ease-in-out infinite;
  filter: drop-shadow(0 0 5px rgba(255, 160, 50, 0.7));
}

@keyframes task-pumpkin-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.05); }
}

.task-outfit--fire,
.task-hero-chip__ring.task-outfit--fire {
  border-color: rgba(255, 120, 30, 0.75) !important;
  background:
    radial-gradient(circle at 50% 60%, rgba(255, 120, 30, 0.4), transparent 62%),
    rgba(24, 8, 4, 0.8) !important;
  box-shadow: 0 0 12px rgba(255, 100, 20, 0.4);
}

.task-outfit--fire::after {
  background: conic-gradient(from 0deg, transparent, rgba(255, 140, 40, 0.32), transparent 40%);
}

.task-outfit--fire .task-outfit-fx,
.task-hero-chip__ring.task-outfit--fire .task-outfit-fx {
  image-rendering: auto;
  animation: task-pumpkin-float 1.6s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(255, 120, 30, 0.8));
}

.task-card__name {
  margin: 2px 0 0;
  font-family: "Cinzel", serif;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #f0e2b8;
  text-align: center;
  line-height: 1.25;
}

.task-card__count {
  font-size: 12px;
  color: var(--ink-soft);
  text-align: center;
}

.task-card__count strong {
  color: var(--gold-bright);
  font-weight: 700;
}

.task-rewards {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed rgba(138, 106, 26, 0.35);
}

.task-reward {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 4px;
  border: 1px solid rgba(138, 106, 26, 0.45);
  background: rgba(20, 16, 10, 0.55);
  font-size: 12px;
  color: var(--ink-soft);
}

.task-reward img {
  width: 24px;
  height: 24px;
  image-rendering: pixelated;
}

.task-reward strong {
  color: #f0e2b8;
  font-weight: 700;
}

.task-reward--exp {
  border-color: rgba(111, 191, 115, 0.4);
  color: #9ed8a1;
}

.task-reward--exp strong {
  color: #b8efba;
}

.task-reward--note {
  border-color: rgba(212, 175, 55, 0.55);
  align-items: flex-start;
}

.task-reward__note {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--gold-bright);
}

.task-howto {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid rgba(138, 106, 26, 0.4);
  background: rgba(0, 0, 0, 0.3);
}

.task-howto__title {
  margin: 0 0 6px;
  font-family: "Cinzel", serif;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--gold);
}

.task-howto ol {
  margin: 0;
  padding-left: 18px;
  color: var(--ink-soft);
}

.task-howto li + li {
  margin-top: 4px;
}

.task-howto em {
  color: var(--gold-bright);
  font-style: normal;
  font-weight: 700;
}

.task-howto--vip {
  border-color: rgba(212, 175, 55, 0.65);
  background: linear-gradient(180deg, rgba(60, 42, 8, 0.45), rgba(0, 0, 0, 0.35));
}

.task-howto--vip .task-howto__title {
  color: var(--gold-bright);
}

.task-howto--vip a {
  color: var(--gold-bright);
  font-weight: 700;
  text-decoration: underline;
}

.task-howto--vip a:hover {
  color: #fff3c4;
}

.task-guide {
  margin: 14px 0 6px;
  padding: 12px 14px;
  border: 1px solid var(--gold-dark);
  background: rgba(0, 0, 0, 0.28);
  text-align: left;
}

.task-guide__title {
  margin: 0 0 8px;
  font-family: "Cinzel", serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #f0e2b8;
}

.task-guide__p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.task-guide__p--cmd {
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(138, 106, 26, 0.35);
}

.task-guide__p--cmd a {
  color: var(--gold-bright);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(232, 168, 74, 0.45);
}

.task-guide__p--cmd a:hover {
  color: #ffd080;
}

.task-guide__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.task-guide__card {
  padding: 10px 12px;
  border: 1px solid rgba(138, 106, 26, 0.4);
  background: rgba(0, 0, 0, 0.25);
}

.task-guide__card--npc {
  border-color: rgba(196, 162, 74, 0.5);
}

.task-guide__card--lvl {
  border-color: rgba(232, 168, 74, 0.45);
}

.task-guide__card--cmd {
  border-color: rgba(111, 191, 115, 0.4);
}

.task-guide__card--vip {
  border-color: rgba(212, 175, 55, 0.65);
}

.task-guide__card-title {
  margin: 0 0 6px;
  font-family: "Cinzel", serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-bright);
}

.task-guide__list {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ink-soft);
}

.task-guide__list li {
  margin-bottom: 4px;
}

.task-list {
  margin-top: 10px;
}

.task-row--ok {
  border-color: rgba(111, 191, 115, 0.4);
}

.lbn-task code,
.lbn-task .task-guide code,
.lbn-task .cmd-row__ex code,
.task-guide__list code,
.lbn-task .cmd-lead code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-bright);
  background: #000;
  background-color: #000;
  padding: 1px 5px;
  border: 1px solid rgba(138, 106, 26, 0.45);
  border-radius: 0;
}

.task-guide__list code {
  font-size: 11px;
}

.task-note {
  margin: 12px 2px 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

@keyframes task-chip-glow {
  0%, 100% { box-shadow: 0 0 0 rgba(212, 175, 55, 0); }
  50% { box-shadow: 0 0 12px rgba(212, 175, 55, 0.18); }
}

@keyframes task-ember {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.9; }
}

@keyframes task-spin {
  to { transform: rotate(360deg); }
}

@keyframes task-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

@media (max-width: 520px) {
  .task-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-tier__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .task-guide__grid {
    grid-template-columns: 1fr;
  }
}
