/* ==========================================================================
   DownPortal — Download Gateway (Solid, Clean & Direct)
   ========================================================================== */

.dp-gateway-wrapper {
  max-width: 680px;
  margin: 36px auto 48px;
  padding: 0 16px;
}

.dp-gateway-card {
  background: #ffffff;
  border: 1px solid var(--border-main, #cbd5e1);
  border-radius: var(--radius-sm, 6px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.dp-gateway-top {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-soft, #e2e8f0);
}

.dp-gateway-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary, #0f172a);
  line-height: 1.35;
  margin: 0;
}

.dp-gateway-title a {
  color: inherit;
  text-decoration: none;
}

.dp-gateway-title a:hover {
  color: var(--ui-action, #2563eb);
}

.dp-gateway-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary, #475569);
  font-weight: 600;
}

.dp-host-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 750;
  padding: 2.5px 8px;
  border-radius: 4px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #1e293b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dp-file-size {
  font-weight: 750;
  color: #0f172a;
}

.dp-file-variant {
  color: #64748b;
}

.dp-gateway-action-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
}

.dp-gateway-turnstile-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

.dp-gateway-step-label {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin: 0 0 4px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.dp-gateway-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 32px;
  background: var(--ui-action, #2563eb);
  color: #ffffff !important;
  font-size: 14.5px;
  font-weight: 750;
  border: 1px solid var(--ui-action, #2563eb);
  border-radius: var(--radius-xs, 4px);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.12s ease;
  min-width: 220px;
}

.dp-gateway-btn:hover {
  background: var(--ui-action-hover, #1d4ed8);
  border-color: var(--ui-action-hover, #1d4ed8);
  transform: translateY(-1px);
}

.dp-gateway-btn svg {
  width: 17px;
  height: 17px;
  stroke-width: 2.2;
}

.dp-gateway-pwd {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  font-size: 12.5px;
  color: #475569;
  font-weight: 600;
}

.dp-gateway-pwd code {
  font-family: var(--font-mono, monospace);
  font-size: 13px;
  font-weight: 750;
  color: #0f172a;
  background: #ffffff;
  padding: 2px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
}

.dp-btn-copy-pwd {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  font-size: 11.5px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.12s ease;
}

.dp-btn-copy-pwd:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.dp-gateway-footer {
  padding-top: 14px;
  border-top: 1px solid var(--border-soft, #e2e8f0);
  font-size: 12.5px;
  color: #64748b;
}

.dp-gateway-footer a {
  color: var(--ui-action, #2563eb);
  text-decoration: none;
  font-weight: 650;
}

.dp-gateway-footer a:hover {
  text-decoration: underline;
}

/* VIP Gate / Error State */
.dp-gateway-card.is-vip-locked,
.dp-gateway-card.is-limit-locked {
  text-align: center;
  align-items: center;
}

.dp-gateway-card.is-vip-locked h1,
.dp-gateway-card.is-limit-locked h1 {
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.dp-gateway-card.is-vip-locked p,
.dp-gateway-card.is-limit-locked p {
  font-size: 13.5px;
  color: #475569;
  margin: 0;
  line-height: 1.5;
}

/* SVG Radial Ring Container (Bright & Native Theme Style) */
.dp-gateway-radial-wrap {
  position: relative;
  width: 210px;
  height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px auto 4px;
}

.dp-gateway-radial-svg {
  width: 100%;
  height: 100%;
  padding: 8px;
}

.dp-gateway-radial-track {
  stroke: var(--ui-color-border-soft, #e2e8f0);
  color: var(--ui-color-border-soft, #e2e8f0);
}

.dp-gateway-radial-progress {
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 0.05s linear;
  stroke: var(--ui-action, #2563eb);
  color: var(--ui-action, #2563eb);
}

/* Center Interactive Countdown Button (Light Portal Surface) */
.dp-gateway-radial-btn {
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  background: var(--ui-color-surface, #ffffff);
  border: 1px solid var(--ui-color-border-soft, #e2e8f0);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: default;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 12px;
  color: var(--ui-color-text-strong, #0f172a);
  outline: none;
  font-family: inherit;
  box-shadow: 0 10px 25px -4px rgba(37, 99, 235, 0.08), 0 4px 10px -2px rgba(0, 0, 0, 0.04);
}

.dp-gateway-radial-time {
  font-size: 34px;
  font-weight: 850;
  color: var(--ui-color-text-strong, #0f172a);
  line-height: 1;
  letter-spacing: -0.03em;
  font-family: var(--font-code, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);
  transition: all 0.2s ease;
}

.dp-gateway-radial-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ui-color-text-muted, #64748b);
  line-height: 1.2;
  text-align: center;
  margin-top: 3px;
  transition: color 0.2s ease;
}

.dp-gateway-radial-icon {
  display: inline-flex;
  color: #ffffff;
  margin-bottom: 2px;
}

.dp-gateway-radial-icon svg {
  width: 28px;
  height: 28px;
  stroke-width: 2.5;
}

/* Ready / Finished State (Vibrant Theme Blue Action Button) */
.dp-gateway-radial-wrap.is-ready .dp-gateway-radial-progress {
  stroke: var(--ui-action, #2563eb);
}

.dp-gateway-radial-btn.is-ready {
  background: linear-gradient(135deg, var(--ui-action, #2563eb) 0%, var(--ui-action-hover, #1d4ed8) 100%);
  border-color: transparent;
  color: #ffffff !important;
  cursor: pointer;
  box-shadow: 0 12px 28px -4px rgba(37, 99, 235, 0.45), 0 6px 14px -2px rgba(37, 99, 235, 0.3);
}

.dp-gateway-radial-btn.is-ready:hover {
  background: linear-gradient(135deg, var(--ui-action-hover, #1d4ed8) 0%, #1e40af 100%);
  transform: scale(1.04);
  box-shadow: 0 16px 32px -4px rgba(37, 99, 235, 0.55);
}

.dp-gateway-radial-btn.is-ready:active {
  transform: scale(0.96);
}

.dp-gateway-radial-btn.is-ready .dp-gateway-radial-label {
  color: #eff6ff !important;
  font-weight: 650;
  font-size: 12px;
  opacity: 0.95;
}

.dp-gateway-radial-btn:focus-visible {
  outline: 3px solid var(--ui-action, #2563eb);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .dp-gateway-radial-progress,
  .dp-gateway-radial-btn,
  .dp-gateway-radial-time {
    transition: none !important;
  }
}

/* Big Modern Download Button */
.dp-gateway-download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 270px;
  padding: 14px 32px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff !important;
  font-size: 15.5px;
  font-weight: 750;
  border: none;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.dp-gateway-download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.45);
  background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
}

.dp-gateway-download-btn:active {
  transform: translateY(0);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
}

.dp-gateway-btn-icon {
  display: inline-flex;
  align-items: center;
}

.dp-gateway-btn-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.4;
}

.dp-gateway-btn-size {
  padding: 2px 8px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  margin-left: 2px;
}

/* Waiting for the CAPTCHA to be completed (button disabled, hint label) */
.dp-gateway-radial-btn.is-waiting-captcha {
  border-color: var(--ui-color-primary, #2563eb);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.dp-gateway-radial-btn.is-waiting-captcha .dp-gateway-radial-label {
  color: var(--ui-color-primary, #2563eb);
}

/* Claim error (ring turns red, label shows the failure message) */
.dp-gateway-radial-wrap.is-claim-error .dp-gateway-radial-progress {
  stroke: #b91c1c;
}

.dp-gateway-radial-btn.is-claim-error {
  border-color: #fecaca;
}

.dp-gateway-radial-btn.is-claim-error .dp-gateway-radial-label {
  color: #b91c1c;
}

.dp-gateway-quota {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
}

.dp-gateway-note {
  font-size: 12.5px;
  color: #64748b;
  margin: 0;
}

.dp-gateway-affiliate-disclosure {
  font-size: 11.5px;
  color: #94a3b8;
  margin: 0;
}

@media (max-width: 480px) {
  .dp-gateway-card {
    padding: 20px 18px;
  }
}
