/* ============================================================
   QCT ESPORTZ — TASKS PAGE
   tasks.css | Design System v4.0
============================================================ */


/* ── Page wrapper ── */
.tasks-container {
  padding: 0 0 24px;
  animation: fadeUp 0.4s var(--ease-smooth) both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ============================================================
   SECTION HEADERS
============================================================ */

.tasks-section-head {
  padding-left: 14px;
  position: relative;
  margin: 20px 0 14px;
}

.tasks-section-head::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--orange), var(--teal));
  box-shadow: 0 0 8px rgba(255,165,0,0.35);
}

.tasks-section-label {
  font-family: var(--font-label);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--teal-bright);
  line-height: 1;
  margin-bottom: 2px;
}

.tasks-section-title {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 1px;
  color: var(--text-primary);
  line-height: 1;
}


/* ============================================================
   TASK BLOCK — AD WATCH HERO CARD
============================================================ */

.task-block {
  position: relative;
  background: var(--grad-card);
  border: 1px solid rgba(255,165,0,0.15);
  border-radius: var(--radius-xl);
  padding: 24px 20px 20px;
  margin-bottom: 16px;
  overflow: hidden;
  text-align: center;
  box-shadow: var(--shadow-lg), 0 0 40px rgba(255,165,0,0.05);
  transition: border-color var(--transition-base),
              box-shadow var(--transition-base);
}

/* Tricolor top stripe */
.task-block-stripe {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    var(--orange) 0%,
    var(--teal-bright) 50%,
    var(--neon) 100%
  );
  box-shadow: 0 0 12px rgba(255,165,0,0.35);
}

/* Corner glow */
.task-block-glow {
  position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px;
  background: radial-gradient(circle,
    rgba(255,165,0,0.07) 0%,
    transparent 70%
  );
  pointer-events: none;
}

/* Gold-win flash animation */
@keyframes goldFlash {
  0%, 100% { border-color: rgba(255,165,0,0.15); }
  40%       { border-color: var(--orange); box-shadow: var(--glow-orange-md), var(--shadow-lg); }
}

.task-block.gold-win {
  animation: goldFlash 0.7s ease-in-out 2;
}


/* ── Progress circle ── */
.progress-circle {
  width: 148px; height: 148px;
  margin: 8px auto 20px;
  border-radius: 50%;
  background: rgba(2,2,7,0.75);
  border: 4px solid rgba(255,165,0,0.20);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: var(--shadow-lg),
              inset 0 0 28px rgba(0,0,0,0.55),
              0 0 24px rgba(255,165,0,0.08);
  transition: border-color var(--transition-base),
              box-shadow var(--transition-base);
}

/* Outer rotating ring */
.progress-circle-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1.5px dashed rgba(255,165,0,0.12);
  animation: rotateSlow 20s linear infinite;
}

/* Ambient glow behind circle */
.progress-circle::before {
  content: '';
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  background: conic-gradient(
    var(--orange) 0deg,
    var(--teal-bright) 120deg,
    var(--neon) 240deg,
    var(--orange) 360deg
  );
  opacity: 0.10;
  filter: blur(12px);
  z-index: -1;
  animation: rotateSlow 8s linear infinite;
}

@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Counter text */
#progressText {
  font-family: var(--font-display);
  font-size: 36px;
  letter-spacing: 0px;
  color: var(--orange);
  text-shadow: 0 0 20px rgba(255,165,0,0.50);
  position: relative;
  z-index: 1;
  line-height: 1;
}


/* ── Rate info row ── */
.task-rate-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 18px;
}

.task-rate-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 8px;
}

.trb-value {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1;
}

.trb-label {
  font-family: var(--font-label);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-dim);
}

.task-rate-box.orange .trb-value { color: var(--orange);     text-shadow: 0 0 12px rgba(255,165,0,0.40); }
.task-rate-box.teal   .trb-value { color: var(--teal-bright); text-shadow: 0 0 12px rgba(0,196,232,0.35); }
.task-rate-box.neon   .trb-value { color: var(--neon);        text-shadow: 0 0 12px rgba(170,255,68,0.35); }

.task-rate-divider {
  width: 1px; height: 40px;
  background: var(--border-subtle);
  flex-shrink: 0;
}


/* ── Web mode notice ── */
.web-mode-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255,165,0,0.07);
  border: 1px solid rgba(255,165,0,0.22);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 16px;
  text-align: left;
}

.wmn-icon { font-size: 24px; flex-shrink: 0; margin-top: 1px; }

.wmn-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.wmn-text strong {
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 0.3px;
}

.wmn-text span {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}


/* ── Watch Ad / Claim buttons ── */
.task-btn {
  width: 100%;
  height: 50px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--grad-orange);
  color: var(--void-00);
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: var(--glow-orange-sm), 0 4px 16px rgba(0,0,0,0.35);
  transition: box-shadow var(--transition-fast),
              transform var(--transition-fast) var(--ease-snap),
              opacity var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

/* Shine sweep */
.task-btn::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.20), transparent);
  transition: left 0.4s var(--ease-smooth);
  pointer-events: none;
}

.task-btn:hover::after { left: 150%; }

.task-btn:hover {
  box-shadow: var(--glow-orange-md), 0 6px 24px rgba(0,0,0,0.4);
}

.task-btn:active { transform: scale(0.97); }

.task-btn:disabled {
  background: rgba(255,255,255,0.06);
  color: var(--text-dim);
  box-shadow: none;
  cursor: not-allowed;
  border: 1px solid var(--border-subtle);
}

.task-btn:disabled::after { display: none; }
.task-btn:disabled:hover { box-shadow: none; transform: none; }


/* Claim button — green */
.claim-btn {
  margin-top: 10px;
  background: linear-gradient(135deg, #34D399, #059669);
  color: #fff;
  box-shadow: 0 0 20px rgba(52,211,153,0.30), 0 4px 16px rgba(0,0,0,0.35);
}

.claim-btn:hover {
  box-shadow: 0 0 32px rgba(52,211,153,0.50), 0 6px 24px rgba(0,0,0,0.4);
}

/* Hidden utility */
.hidden { display: none !important; }


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

.limit-box {
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 4px;
}

.limit-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.limit-label {
  font-family: var(--font-label);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-dim);
}

.limit-count {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.limit-count strong {
  color: var(--orange);
  text-shadow: 0 0 12px rgba(255,165,0,0.35);
}

.limit-sep { margin: 0 4px; opacity: 0.4; }

/* Progress bar track */
.limit-bar {
  height: 6px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,0.06);
  overflow: hidden;
  margin-bottom: 10px;
}

/* Fill — animated width set by JS */
.limit-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--orange), var(--teal-bright));
  box-shadow: 0 0 8px rgba(255,165,0,0.35);
  transition: width 0.6s var(--ease-smooth);
}

.limit-hint {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.6;
}


/* ============================================================
   TASKS LIST (admin tasks + history shared)
============================================================ */

.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
}

/* ── Admin task item ── */
.task-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255,255,255,0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px;
  position: relative;
  overflow: hidden;
  transition: background var(--transition-fast),
              border-color var(--transition-fast),
              transform var(--transition-fast);
  animation: slideInUp 0.3s var(--ease-snap) both;
}

/* Left orange accent */
.task-item::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--orange), var(--teal));
  box-shadow: 0 0 6px rgba(255,165,0,0.25);
  border-radius: 1px 0 0 1px;
}

.task-item:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,165,0,0.15);
  transform: translateX(3px);
}

.task-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.task-item-icon {
  font-size: 24px;
  flex-shrink: 0;
  width: 40px; height: 40px;
  background: rgba(255,165,0,0.08);
  border: 1px solid rgba(255,165,0,0.18);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.task-item-info { min-width: 0; }

.task-item-title {
  font-family: var(--font-label);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.task-item-desc {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.task-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.task-item-reward {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--orange);
  text-shadow: 0 0 10px rgba(255,165,0,0.35);
  white-space: nowrap;
}

.task-submit-btn {
  padding: 6px 14px;
  height: 30px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255,165,0,0.30);
  background: rgba(255,165,0,0.10);
  color: var(--orange);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition-fast),
              border-color var(--transition-fast),
              box-shadow var(--transition-fast);
  -webkit-tap-highlight-color: transparent;
}

.task-submit-btn:hover {
  background: rgba(255,165,0,0.18);
  border-color: rgba(255,165,0,0.50);
  box-shadow: var(--glow-orange-sm);
}

.task-submit-btn:active { transform: scale(0.94); }


/* ── Task history row ── */
.task-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  animation: slideInUp 0.3s var(--ease-snap) both;
}

.thr-left { flex: 1; min-width: 0; }

.thr-title {
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.thr-reward {
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--text-dim);
}

/* Status chips */
.thr-status {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.thr-status.approved { background: rgba(52,211,153,0.12); color: var(--success); border: 1px solid rgba(52,211,153,0.25); }
.thr-status.pending  { background: rgba(255,165,0,0.10);  color: var(--orange);  border: 1px solid rgba(255,165,0,0.25); }
.thr-status.rejected { background: rgba(255,34,68,0.10);  color: #FF4466;        border: 1px solid rgba(255,34,68,0.25); }


/* ── Skel row ── */
.task-item.skel-row {
  pointer-events: none;
  border-color: rgba(255,255,255,0.04);
}

.task-item.skel-row::before { display: none; }

.task-skel-icon {
  width: 40px !important; height: 40px !important;
  border-radius: var(--radius-md) !important;
  flex-shrink: 0;
}


/* ============================================================
   EMPTY STATE
============================================================ */

.tasks-empty {
  text-align: center;
  padding: 36px 20px;
}

.tasks-empty-icon {
  font-size: 40px;
  opacity: 0.25;
  margin-bottom: 10px;
}

.tasks-empty-text {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.7;
}


/* ============================================================
   SKELETON
============================================================ */

.skel {
  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.04) 0%,
    rgba(255,255,255,0.09) 50%,
    rgba(255,255,255,0.04) 100%
  );
  background-size: 200% 100%;
  animation: skelPulse 1.6s ease-in-out infinite;
  border-radius: var(--radius-sm);
  display: block;
}

.skel-line      { height: 13px; }
.skel-line.w-60 { width: 60%; }
.skel-line.w-50 { width: 50%; }
.skel-line.w-40 { width: 40%; }
.skel-line.w-35 { width: 35%; }
.skel-line.w-15 { width: 60px; }

@keyframes skelPulse {
  0%   { background-position:  200% center; }
  100% { background-position: -200% center; }
}

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ============================================================
   RESPONSIVE
============================================================ */

@media (max-width: 360px) {
  #progressText       { font-size: 28px; }
  .progress-circle    { width: 128px; height: 128px; }
  .trb-value          { font-size: 18px; }
}

@media (min-width: 768px) {
  .progress-circle  { width: 168px; height: 168px; }
  #progressText     { font-size: 42px; }
  .task-btn         { max-width: 400px; margin-left: auto; margin-right: auto; }
  .task-item        { padding: 16px; }
}
