/* ═══════════════════════════════════════════════
   DOWNLOAD FLOW — Processing + Turnstile + Locker
   ═══════════════════════════════════════════════ */

/* ── Shared Overlay ── */
.df-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s,
    visibility 0.3s;
  padding: 16px;
}
.df-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ═══════════════════════════════
   STAGE 1 — Download Processing
   ═══════════════════════════════ */
.df-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  padding: 32px 28px;
  text-align: center;
  transform: scale(0.88) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: "Outfit", system-ui, sans-serif;
  color: #0f172a;
}
.df-overlay.active .df-card {
  transform: scale(1) translateY(0);
}

/* File icon pulse */
.df-file-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  position: relative;
}
.df-file-icon-inner {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: linear-gradient(135deg, #10b981, #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: dfIconPulse 2s ease-in-out infinite;
}
.df-file-icon-inner ion-icon {
  font-size: 34px;
  color: #fff;
}
@keyframes dfIconPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 0 0 12px rgba(16, 185, 129, 0);
  }
}

.df-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 2px;
}
.df-subtitle {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 20px;
}

/* File info pill */
.df-file-info {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: #f1f5f9;
  border-radius: 20px;
  font-size: 12px;
  color: #475569;
  margin-bottom: 20px;
}
.df-file-info .dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #94a3b8;
}

/* Progress bar */
.df-progress-wrap {
  margin-bottom: 12px;
}
.df-progress-track {
  height: 8px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
  position: relative;
}
.df-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #10b981, #34d399);
  border-radius: 99px;
  transition: width 0.4s ease;
  position: relative;
}
.df-progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.35) 50%,
    transparent 100%
  );
  animation: dfShimmer 1.5s infinite;
}
@keyframes dfShimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}
.df-progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #64748b;
  margin-top: 6px;
}
.df-progress-pct {
  font-weight: 600;
  color: #10b981;
}

/* Steps */
.df-steps {
  text-align: left;
  margin: 18px 0 16px;
}
.df-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 13.5px;
  color: #94a3b8;
  transition: color 0.3s;
}
.df-step.active {
  color: #0f172a;
}
.df-step.done {
  color: #10b981;
}
.df-step-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #e2e8f0;
  transition: background 0.3s;
}
.df-step.active .df-step-badge {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
}
.df-step.active .df-step-badge::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: dfDotPulse 1s ease-in-out infinite;
}
@keyframes dfDotPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}
.df-step.done .df-step-badge {
  background: linear-gradient(135deg, #10b981, #059669);
}
.df-step.done .df-step-badge::after {
  content: "✓";
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}
.df-step-text {
  flex: 1;
}

.df-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 4px;
}
.df-secure ion-icon {
  font-size: 13px;
  color: #10b981;
}

/* ═══════════════════════════════
   STAGE 2 — Turnstile Verification
   ═══════════════════════════════ */
.df-verify-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  padding: 28px 24px;
  text-align: center;
  transform: scale(0.88) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: "Outfit", system-ui, sans-serif;
  color: #0f172a;
}
.df-overlay.active .df-verify-card {
  transform: scale(1) translateY(0);
}
.df-verify-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-radius: 16px;
}
.df-verify-icon ion-icon {
  font-size: 30px;
  color: #f59e0b;
}
.df-verify-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}
.df-verify-sub {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 20px;
}

/* Fake turnstile widget */
.df-turnstile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #f8fafc;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  transition:
    border-color 0.2s,
    background 0.2s;
  margin-bottom: 18px;
}
.df-turnstile:hover {
  border-color: #cbd5e1;
}
.df-turnstile.verified {
  border-color: #10b981;
  background: #f0fdf4;
}
.df-turnstile-check {
  width: 24px;
  height: 24px;
  border: 2px solid #cbd5e1;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.25s;
  position: relative;
}
.df-turnstile.verified .df-turnstile-check {
  background: #10b981;
  border-color: #10b981;
}
.df-turnstile-checkmark {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  opacity: 0;
  transform: scale(0);
  transition: all 0.25s;
}
.df-turnstile.verified .df-turnstile-checkmark {
  opacity: 1;
  transform: scale(1);
}
.df-turnstile-check .df-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid #e2e8f0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: dfSpin 0.6s linear infinite;
}
.df-turnstile.verifying .df-turnstile-check {
  border-color: #3b82f6;
}
.df-turnstile.verifying .df-turnstile-check .df-spinner {
  display: block;
}
.df-turnstile.verifying .df-turnstile-checkmark {
  display: none;
}
@keyframes dfSpin {
  to {
    transform: rotate(360deg);
  }
}

.df-turnstile-label {
  flex: 1;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  color: #334155;
}
.df-turnstile-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.df-turnstile-brand img {
  height: 16px;
  opacity: 0.6;
}
.df-turnstile-brand small {
  font-size: 9px;
  color: #94a3b8;
}
.df-turnstile-brand small a {
  color: #94a3b8;
  text-decoration: none;
}

.df-verify-footer {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 12px;
}
.df-verify-footer .cf-brand {
  font-weight: 600;
  color: #f48120;
}

/* ═══════════════════════════════
   STAGE 3 — Offers Locker
   ═══════════════════════════════ */
.df-locker-overlay {
  position: fixed;
  inset: 0;
  z-index: 9100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s,
    visibility 0.3s;
  padding: 16px;
  gap: 14px;
}
.df-locker-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Progress steps above card */
.df-locker-steps {
  display: flex;
  align-items: center;
  gap: 0;
}
.df-locker-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.df-locker-step .step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  background: #334155;
  transition: background 0.3s;
}
.df-locker-step.done .step-dot {
  background: linear-gradient(135deg, #10b981, #059669);
}
.df-locker-step.active .step-dot {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  animation: dfDotPulse 1.2s ease-in-out infinite;
}
.df-locker-step span {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}
.df-locker-step.done span {
  color: #10b981;
}
.df-locker-step.active span {
  color: #fff;
}
.df-locker-line {
  width: 40px;
  height: 2px;
  background: #334155;
  margin: 0 4px;
  margin-bottom: 18px;
  transition: background 0.3s;
}
.df-locker-line.done {
  background: #10b981;
}

/* Locker card */
.df-locker-card {
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transform: scale(0.88) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: "Outfit", system-ui, sans-serif;
  color: #0f172a;
}
.df-locker-overlay.active .df-locker-card {
  transform: scale(1) translateY(0);
}

.df-locker-header {
  padding: 24px 24px 16px;
  text-align: center;
}
.df-locker-gif {
  width: 80px;
  height: 80px;
  border-radius: 16px;
  object-fit: cover;
  margin-bottom: 10px;
}
.df-locker-header h2 {
  font-size: 23px;
  font-weight: 700;
  margin-bottom: 4px;
}
.df-locker-header p {
  font-size: 16px;
  color: #64748b;
}
.df-locker-header p b {
  color: #0f172a;
}

/* Offers area */
.df-offers-wrap {
  padding: 0 20px 20px;
}
.df-offers-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 4px 10px;
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 700;
  color: #92400e;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}
.df-offers-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f59e0b;
  animation: dfStatusPulse 1.5s ease-in-out infinite;
}
@keyframes dfStatusPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.df-offers-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Offer card */
.df-offer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  text-decoration: none;
  color: #0f172a;
  transition:
    border-color 0.2s,
    box-shadow 0.2s,
    transform 0.15s;
}
.df-offer:hover {
  border-color: #10b981;
  box-shadow: 0 2px 12px rgba(16, 185, 129, 0.12);
  transform: translateY(-1px);
}
.df-offer-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, #10b981, #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.df-offer-icon ion-icon {
  font-size: 20px;
  color: #fff;
}
.df-offer-body {
  flex: 1;
  min-width: 0;
}
.df-offer-name {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.df-offer-desc {
  font-size: 11.5px;
  color: #64748b;
}
.df-offer-badge {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  flex-shrink: 0;
}
.df-offer-badge.hot {
  background: #fee2e2;
  color: #dc2626;
}
.df-offer-badge.easy {
  background: #d1fae5;
  color: #059669;
}
.df-offer-arrow {
  color: #94a3b8;
  font-size: 18px;
  flex-shrink: 0;
}

/* Skeleton */
.df-offer-skeleton {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.df-skeleton-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #f1f5f9;
  border-radius: 12px;
  animation: dfSkeletonPulse 1.5s ease-in-out infinite;
}
.df-skeleton-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #e2e8f0;
  flex-shrink: 0;
}
.df-skeleton-lines {
  flex: 1;
}
.df-skeleton-line {
  height: 10px;
  background: #e2e8f0;
  border-radius: 4px;
  margin-bottom: 6px;
}
.df-skeleton-line:last-child {
  width: 60%;
  margin-bottom: 0;
}
@keyframes dfSkeletonPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Footer */
.df-locker-footer {
  padding: 12px 20px 16px;
  border-top: 1px solid #f1f5f9;
  text-align: center;
}
.df-locker-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 12px;
  color: #64748b;
  margin-bottom: 8px;
}
.df-locker-timer ion-icon {
  font-size: 14px;
}
.df-locker-timer .timer-val {
  font-weight: 700;
  color: #ef4444;
  font-variant-numeric: tabular-nums;
}
.df-locker-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 11px;
  color: #94a3b8;
}
.df-locker-trust span {
  display: flex;
  align-items: center;
  gap: 3px;
}
.df-locker-trust ion-icon {
  font-size: 13px;
  color: #10b981;
}

/* Social proof below card */
.df-locker-social {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: #94a3b8;
}
.df-locker-social .live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  animation: dfLivePulse 2s ease-in-out infinite;
}
@keyframes dfLivePulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
}
.df-locker-social strong {
  color: #fff;
}

/* Shake animation */
.df-locker-card.shake {
  animation: dfShake 0.5s ease-in-out;
}
@keyframes dfShake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
}

/* ═══════════════════════════════
   STAGE 4 — Success
   ═══════════════════════════════ */
.df-success-state {
  display: none;
  text-align: center;
}
.df-success-state.active {
  display: block;
}
.df-success-badge {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, #10b981, #059669);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: dfSuccessPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.df-success-badge ion-icon {
  font-size: 32px;
  color: #fff;
}
@keyframes dfSuccessPop {
  0% {
    transform: scale(0);
  }
  100% {
    transform: scale(1);
  }
}

.df-success-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  color: #0f172a;
}
.df-success-sub {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 20px;
}
.df-success-file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  margin-bottom: 16px;
  text-align: left;
}
.df-success-file-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #10b981, #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.df-success-file-icon ion-icon {
  font-size: 18px;
  color: #fff;
}
.df-success-file-info {
  flex: 1;
}
.df-success-file-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #0f172a;
}
.df-success-file-size {
  font-size: 11.5px;
  color: #64748b;
}

.df-success-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
.df-success-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}
.df-success-download ion-icon {
  font-size: 20px;
}

.df-success-note {
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.df-success-note ion-icon {
  font-size: 13px;
  color: #10b981;
}

/* ── Coming Soon state (no-APK games) ── */
.df-coming-soon {
  display: none;
  text-align: center;
}
.df-coming-soon.active {
  display: block;
}

.df-cs-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: dfSuccessPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.df-cs-icon ion-icon {
  font-size: 34px;
  color: #fff;
}

.df-cs-title {
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}
.df-cs-sub {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 20px;
  line-height: 1.5;
}

.df-cs-features {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.df-cs-feat {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  font-size: 13px;
  color: #334155;
  text-align: left;
}
.df-cs-feat ion-icon {
  font-size: 18px;
  color: #3b82f6;
  flex-shrink: 0;
}

.df-cs-signup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 0.15s,
    box-shadow 0.15s;
}
.df-cs-signup:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.35);
}
.df-cs-signup ion-icon {
  font-size: 20px;
}

.df-cs-notify {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-size: 11.5px;
  color: #94a3b8;
}
.df-cs-notify ion-icon {
  font-size: 14px;
  color: #3b82f6;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 480px) {
  .df-card,
  .df-verify-card {
    padding: 24px 20px;
  }
  .df-locker-card {
    border-radius: 16px;
  }
  .df-locker-header {
    padding: 20px 16px 12px;
  }
  .df-offers-wrap {
    padding: 0 14px 16px;
  }
  .df-locker-footer {
    padding: 10px 14px 14px;
  }
  .df-file-icon-inner {
    width: 60px;
    height: 60px;
    border-radius: 14px;
  }
  .df-file-icon-inner ion-icon {
    font-size: 28px;
  }
  .df-title {
    font-size: 18px;
  }
  .df-locker-line {
    width: 28px;
  }
}
@media (max-width: 360px) {
  .df-card,
  .df-verify-card {
    padding: 20px 16px;
  }
  .df-verify-btn {
    font-size: 13px;
    padding: 10px;
  }
  .df-offer {
    padding: 10px 12px;
  }
  .df-offer-icon {
    width: 34px;
    height: 34px;
  }
}
