/* frontend/public/css/tasks.css */
/* 80s / Early 90s Synthwave Neon Arcade Missions & Offerwalls Stylesheet */

.tasks-layout *,
.tasks-layout *::before,
.tasks-layout *::after,
.offerwall-modal *,
.offerwall-modal *::before,
.offerwall-modal *::after {
  box-sizing: border-box;
}

.tasks-layout {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 14px 14px 108px 14px;
  color: #ffffff;
  overflow: visible;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* =========================================================
   1. TOP ARCADE CYCLE COINS HUD BAR
   ========================================================= */

.tasks-hud-bar {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(16, 8, 36, 0.92);
  border: 1.5px solid #00f0ff;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.25);
}

.hud-label {
  font-family: monospace, sans-serif;
  font-size: 0.76rem;
  font-weight: 900;
  color: #00f0ff;
  letter-spacing: 1px;
}

.hud-coins-pill {
  font-family: monospace, sans-serif;
  font-size: 0.96rem;
  font-weight: 900;
  color: #fde047;
  text-shadow: 0 0 8px rgba(253, 224, 71, 0.55);
}

/* =========================================================
   2. THE DAILY 5 PROGRESS MARQUEE CARD
   ========================================================= */

.progress-card {
  position: relative;
  width: 100%;
  background: radial-gradient(circle at 50% 20%, #2a0a4e 0%, #0d0620 75%, #070312 100%);
  border: 2px solid #ff007f;
  border-radius: 20px;
  padding: 16px 14px;
  margin-bottom: 16px;
  text-align: center;
  box-shadow: 0 0 22px rgba(255, 0, 127, 0.3), inset 0 0 16px rgba(0, 240, 255, 0.12);
  overflow: hidden;
}

.progress-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.mission-tag {
  font-family: monospace, sans-serif;
  font-size: 0.68rem;
  font-weight: 900;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(0, 240, 255, 0.14);
  border: 1px solid #00f0ff;
  color: #00f0ff;
  letter-spacing: 1px;
}

.progress-text {
  font-family: monospace, sans-serif;
  font-size: 1.05rem;
  font-weight: 900;
  color: #fde047;
  text-shadow: 0 0 8px rgba(253, 224, 71, 0.6);
}

.progress-card h2 {
  font-family: monospace, sans-serif;
  font-size: 1.75rem;
  font-weight: 900;
  margin: 0 0 4px 0;
  color: #ffffff;
  letter-spacing: 2px;
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.65), 0 3px 0 #000000;
}

.progress-card h2 span {
  color: #ff007f;
  text-shadow: 0 0 14px rgba(255, 0, 127, 0.85), 0 3px 0 #000000;
}

.progress-sub {
  font-family: monospace, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  color: #cbd5e1;
  margin: 0 0 12px 0;
  letter-spacing: 0.4px;
  line-height: 1.35;
}

.progress-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: rgba(7, 3, 18, 0.9);
  border: 1.5px solid rgba(0, 240, 255, 0.4);
  overflow: hidden;
  padding: 1px;
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #00f0ff 0%, #ff007f 55%, #fde047 100%);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.8);
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

/* 1.5X Hyper Unlocked Banner */
.multiplier-active {
  display: none;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(255, 0, 127, 0.3), rgba(253, 224, 71, 0.25));
  border: 1.5px solid #fde047;
  box-shadow: 0 0 16px rgba(253, 224, 71, 0.4);
  cursor: pointer;
}

.multiplier-active.active,
.multiplier-active.show {
  display: block;
}

.multiplier-active h3 {
  margin: 0 0 2px 0;
  font-family: monospace, sans-serif;
  font-size: 0.95rem;
  font-weight: 900;
  color: #fde047;
}

.multiplier-active p {
  margin: 0;
  font-family: monospace, sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  color: #ffffff;
}

/* =========================================================
   3. SEQUENTIAL DAILY 5 TASK LIST
   ========================================================= */

.task-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  margin-bottom: 24px;
}

.task-item {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(16, 8, 36, 0.92);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
  transition: transform 0.12s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.task-item.active-task {
  border-color: #00f0ff;
  background: linear-gradient(145deg, rgba(28, 12, 54, 0.96), rgba(9, 5, 20, 0.98));
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.3);
}

.task-item.completed,
.task-item.done {
  border-color: rgba(0, 255, 102, 0.55);
  background: rgba(3, 38, 22, 0.35);
}

.task-item.locked {
  opacity: 0.52;
}

.task-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.task-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  background: #090514;
  border: 1.5px solid rgba(0, 240, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.task-item.completed .task-icon {
  border-color: #00ff66;
}

.task-text {
  min-width: 0;
  flex: 1;
  text-align: left;
}

.task-text h4 {
  margin: 0 0 3px 0;
  font-family: monospace, sans-serif;
  font-size: 0.82rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: break-word;
}

.task-text p {
  margin: 0;
  font-family: monospace, sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  color: #fde047;
  line-height: 1.25;
  white-space: normal;
}

.task-item.completed .task-text p {
  color: #00ff66;
}

/* 3D Arcade Cabinet Action Button */
.task-btn {
  flex-shrink: 0;
  min-width: 82px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 2px solid #fde047;
  background: linear-gradient(180deg, #ff007f 0%, #be185d 100%);
  color: #ffffff;
  font-family: monospace, sans-serif;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 4px 0 #701a75, 0 0 12px rgba(255, 0, 127, 0.45);
  transition: transform 0.08s ease, box-shadow 0.08s ease;
  white-space: nowrap;
}

.task-btn:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #701a75;
}

.task-btn.completed,
.task-btn.done {
  border-color: #00ff66;
  background: rgba(0, 255, 102, 0.16);
  color: #00ff66;
  box-shadow: none;
  cursor: default;
}

.task-btn.is-locked {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: #94a3b8;
  box-shadow: none;
  cursor: not-allowed;
}

/* =========================================================
   4. DAILY 5 PUZZLE VAULT (2-TOP, 1-CENTER, 2-BOTTOM HUB) & OFFERWALLS
   ========================================================= */

.offerwalls-section {
  width: 100%;
  margin-bottom: 24px;
}

#dailyPuzzleSection {
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(160deg, rgba(24, 10, 48, 0.94) 0%, rgba(11, 6, 24, 0.96) 100%);
  border: 1.5px solid rgba(0, 240, 255, 0.38);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(0, 240, 255, 0.14);
}

/* Symmetrical 5-Card Hub Layout: 2 Top Corners, 1 Center Card, 2 Bottom Corners */
#dailyPuzzleGrid.daily-puzzle-hub-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

#dailyPuzzleGrid.daily-puzzle-hub-grid .arcade-empty-state {
  grid-column: 1 / -1;
}

#dailyPuzzleGrid.daily-puzzle-hub-grid .arcade-game-card {
  grid-column: span 2;
}

/* Top-Left & Top-Right Corners */
#dailyPuzzleGrid.daily-puzzle-hub-grid .arcade-game-card:nth-child(1) {
  grid-column: 1 / 3;
}

#dailyPuzzleGrid.daily-puzzle-hub-grid .arcade-game-card:nth-child(2) {
  grid-column: 3 / 5;
}

/* Center Spotlight Card (Same uniform proportions as corner cards) */
#dailyPuzzleGrid.daily-puzzle-hub-grid .arcade-game-card:nth-child(3) {
  grid-column: 2 / 4;
  border-color: rgba(0, 240, 255, 0.55);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65), 0 0 14px rgba(0, 240, 255, 0.22);
}

/* Bottom-Left & Bottom-Right Corners */
#dailyPuzzleGrid.daily-puzzle-hub-grid .arcade-game-card:nth-child(4) {
  grid-column: 1 / 3;
}

#dailyPuzzleGrid.daily-puzzle-hub-grid .arcade-game-card:nth-child(5) {
  grid-column: 3 / 5;
}

.daily-puzzle-hall-cta {
  margin-top: 14px;
  width: 100%;
}

.daily-puzzle-hall-cta .arcade-view-all-hall-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.16) 0%, rgba(255, 0, 127, 0.22) 100%);
  border: 1.5px solid #00f0ff;
  color: #fde047;
  font-family: monospace, sans-serif;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-decoration: none;
  text-align: center;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 0 12px rgba(0, 240, 255, 0.2);
  transition: transform 0.1s ease, border-color 0.2s ease;
}

.daily-puzzle-hall-cta .arcade-view-all-hall-link:active {
  transform: translateY(2px);
}

.offerwalls-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
}

.offerwalls-header h3 {
  margin: 0;
  font-family: monospace, sans-serif;
  font-size: 0.92rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 0.6px;
}

.instant-badge {
  font-family: monospace, sans-serif;
  font-size: 0.66rem;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(0, 255, 102, 0.14);
  border: 1px solid #00ff66;
  color: #00ff66;
  white-space: nowrap;
}

.offerwalls-sub {
  margin: 0 0 12px 0;
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.4;
}

.offerwall-providers-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.offerwall-provider-card {
  min-width: 0;
  padding: 13px 11px;
  border-radius: 16px;
  background: linear-gradient(160deg, rgba(28, 12, 54, 0.95), rgba(9, 5, 20, 0.98));
  border: 1.5px solid rgba(0, 240, 255, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.6);
  transition: transform 0.1s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.offerwall-provider-card:active {
  transform: scale(0.96);
}

.offerwall-provider-card.accent-pink { border-color: rgba(255, 0, 127, 0.55); }
.offerwall-provider-card.accent-green { border-color: rgba(0, 255, 102, 0.55); }
.offerwall-provider-card.accent-gold { border-color: rgba(253, 224, 71, 0.55); }

.provider-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.provider-icon {
  font-size: 1.55rem;
}

.provider-badge {
  font-family: monospace, sans-serif;
  font-size: 0.62rem;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(0, 240, 255, 0.14);
  color: #00f0ff;
  text-transform: uppercase;
  white-space: nowrap;
}

.provider-name {
  font-family: monospace, sans-serif;
  font-weight: 900;
  font-size: 0.82rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.provider-cta {
  font-family: monospace, sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  color: #fde047;
  margin-top: 2px;
}

/* =========================================================
   5. BUILT-IN S2S SANDBOX TEST BAY
   ========================================================= */

.sandbox-card {
  display: none;
  width: 100%;
  padding: 15px 14px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(16, 8, 36, 0.95), rgba(7, 3, 18, 0.98));
  border: 1.5px dashed #00f0ff;
  box-shadow: 0 0 18px rgba(0, 240, 255, 0.18);
}

.sandbox-card.is-visible {
  display: block;
}

.sandbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.sandbox-title {
  font-family: monospace, sans-serif;
  font-weight: 900;
  font-size: 0.82rem;
  color: #00f0ff;
  letter-spacing: 0.6px;
}

.sandbox-badge {
  font-family: monospace, sans-serif;
  font-size: 0.64rem;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(0, 240, 255, 0.15);
  color: #00f0ff;
}

.sandbox-sub {
  margin: 0 0 12px 0;
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.4;
}

.sandbox-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sandbox-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1.5px solid rgba(0, 240, 255, 0.4);
  background: #070312;
  color: #ffffff;
  font-family: monospace, sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
}

.sandbox-fire-btn {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 2px solid #fde047;
  background: linear-gradient(90deg, #00f0ff 0%, #00ff66 100%);
  color: #000000;
  font-family: monospace, sans-serif;
  font-weight: 900;
  font-size: 0.82rem;
  letter-spacing: 0.8px;
  cursor: pointer;
  box-shadow: 0 4px 0 #059669;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.sandbox-fire-btn:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 1px 0 #059669;
}

.sandbox-result-box {
  display: none;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(0, 255, 102, 0.35);
  font-family: monospace, sans-serif;
  font-size: 0.7rem;
  color: #00ff66;
  word-break: break-word;
  white-space: pre-wrap;
}

.sandbox-result-box.is-visible {
  display: block;
}

.sandbox-result-box.is-error {
  border-color: #f43f5e;
  color: #fb7185;
}

/* =========================================================
   6. FULL-SCREEN OFFERWALL IFRAME MODAL
   ========================================================= */

.offerwall-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99995;
  background: #070312;
  flex-direction: column;
}

.offerwall-modal.is-open {
  display: flex;
}

.offerwall-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #120726;
  border-bottom: 2px solid #00f0ff;
}

.offerwall-modal-meta {
  min-width: 0;
  flex: 1;
}

.offerwall-modal-title {
  font-family: monospace, sans-serif;
  font-weight: 900;
  font-size: 0.92rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.offerwall-modal-subid {
  font-family: monospace, sans-serif;
  font-size: 0.66rem;
  color: #00ff66;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.offerwall-close-btn {
  flex-shrink: 0;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1.5px solid #ff007f;
  background: rgba(255, 0, 127, 0.18);
  color: #ffffff;
  font-family: monospace, sans-serif;
  font-weight: 900;
  font-size: 0.75rem;
  cursor: pointer;
}

.offerwall-iframe-wrapper {
  flex: 1;
  width: 100%;
  position: relative;
  overflow-y: auto;
  background: #090514;
}

.offerwall-live-iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #090514;
}

/* Interactive Preview Cards Inside Modal */
.preview-wall-container {
  padding: 16px;
  color: #ffffff;
  max-width: 440px;
  margin: 0 auto;
}

.preview-subid-banner {
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid #00f0ff;
  margin-bottom: 14px;
  font-family: monospace, sans-serif;
  font-size: 0.75rem;
  color: #cffafe;
  line-height: 1.45;
}

.preview-offers-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.preview-offer-row {
  padding: 13px;
  border-radius: 14px;
  background: rgba(20, 10, 44, 0.95);
  border: 1.5px solid rgba(255, 0, 127, 0.45);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.preview-offer-copy {
  min-width: 0;
  flex: 1;
}

.preview-offer-title {
  font-family: monospace, sans-serif;
  font-weight: 900;
  font-size: 0.85rem;
  color: #ffffff;
}

.preview-offer-desc {
  font-size: 0.74rem;
  color: #94a3b8;
  margin-top: 3px;
}

.modal-sim-offer-btn {
  flex-shrink: 0;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1.5px solid #fde047;
  background: #00ff66;
  color: #000000;
  font-family: monospace, sans-serif;
  font-weight: 900;
  font-size: 0.75rem;
  cursor: pointer;
  white-space: nowrap;
}