/* 任务模块公共样式：沿用背包页的深色点阵卡片风格 */

body {
  background: #161616;
  color: #ffffff;
}

.app-wrap {
  background: #161616;
}

.app-wrap::before {
  display: none;
}

.ti-card {
  position: relative;
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background-color: #353535;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.07) 1px, transparent 0);
  background-size: 10px 10px;
  color: #ffffff;
}

.ti-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.ti-card-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.ti-muted {
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
}

/* ---------- 按钮 ---------- */
.ti-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.ti-btn:active {
  transform: scale(0.95);
}

.ti-btn-primary {
  background: linear-gradient(180deg, #9e6cff, #7d4dff);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(125, 77, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.ti-btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.ti-btn-done,
.ti-btn[disabled] {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.4);
  box-shadow: none;
  cursor: default;
}

.ti-btn-block {
  width: 100%;
  height: 46px;
  border-radius: 16px;
  font-size: 16px;
}

.ti-btn-pulse {
  animation: ti-pulse 1.6s ease-in-out infinite;
}

@keyframes ti-pulse {
  0%, 100% { box-shadow: 0 6px 16px rgba(125, 77, 255, 0.4), 0 0 0 0 rgba(158, 108, 255, 0.55); }
  50% { box-shadow: 0 6px 16px rgba(125, 77, 255, 0.4), 0 0 0 6px rgba(158, 108, 255, 0); }
}

/* ---------- 道具格子 ---------- */
.ti-thumb {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background-color: #282828;
  background-position: center;
  background-size: cover;
  overflow: hidden;
}

.ti-thumb-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ti-thumb-exp {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.ti-thumb-count {
  position: absolute;
  right: 0;
  bottom: 0;
  padding: 1px 5px;
  border-top-left-radius: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
}

.ti-thumb-lg {
  width: 72px;
  height: 72px;
  border-radius: 16px;
}

.ti-thumb-lg .ti-thumb-count {
  font-size: 12px;
  padding: 2px 7px;
}

/* ---------- 奖励弹窗 ---------- */
.ti-modal[hidden] {
  display: none;
}

.ti-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.ti-modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(6, 7, 18, 0.8);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.ti-modal-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(320px, calc(100vw - 32px));
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 30px 18px 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 0, rgba(158, 108, 255, 0.35), transparent 60%),
    #1a1a1a;
  transform: translate(-50%, -46%) scale(0.92);
  opacity: 0;
  transition: transform 0.24s cubic-bezier(0.2, 1.4, 0.4, 1), opacity 0.2s ease;
}

.ti-modal.is-open .ti-modal-mask {
  opacity: 1;
}

.ti-modal.is-open .ti-modal-panel {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.ti-modal-ribbon {
  position: absolute;
  top: -14px;
  padding: 6px 22px;
  border-radius: 999px;
  background: linear-gradient(180deg, #9e6cff, #7d4dff);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.1em;
  box-shadow: 0 6px 16px rgba(125, 77, 255, 0.45);
}

.ti-modal-title {
  font-size: 18px;
  font-weight: 800;
}

.ti-modal-sub {
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
}

.ti-modal-sub:empty {
  display: none;
}

.ti-modal-items {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin: 6px 0 8px;
}

.ti-modal-item {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 80px;
}

.ti-modal-item-name {
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  color: rgba(255, 255, 255, 0.86);
}

.ti-modal-ok {
  width: 100%;
  height: 42px;
  border-radius: 14px;
}

/* ---------- toast ---------- */
.ti-toast {
  position: fixed;
  left: 50%;
  top: 40%;
  z-index: 80;
  padding: 10px 18px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.82);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  transform: translate(-50%, 0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.ti-toast.is-leave {
  opacity: 0;
  transform: translate(-50%, -12px);
}

/* ---------- 进度条 ---------- */
.ti-progress {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.ti-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7d4dff, #c79bff);
  transition: width 0.4s ease;
}
