/* =====================
   YAMZZ PAYMENT - CSS
   Nebula Spaceship Theme
   ===================== */

:root {
  --bg: #04050f;
  --surface: rgba(8, 12, 35, 0.85);
  --surface2: rgba(12, 18, 50, 0.6);
  --primary: #00d4ff;
  --primary-glow: rgba(0, 212, 255, 0.25);
  --accent: #bf5fff;
  --accent-glow: rgba(191, 95, 255, 0.2);
  --success: #00ffb3;
  --success-glow: rgba(0, 255, 179, 0.2);
  --error: #ff4d6d;
  --error-glow: rgba(255, 77, 109, 0.2);
  --warning: #ffb347;
  --text: #e8f4ff;
  --text-dim: rgba(180, 210, 255, 0.55);
  --border: rgba(0, 212, 255, 0.18);
  --border-accent: rgba(191, 95, 255, 0.3);
  --font-display: 'Orbitron', monospace;
  --font-body: 'Exo 2', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
}

/* ---- STARFIELD CANVAS ---- */
#starfield {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---- NEBULA OVERLAY ---- */
.nebula-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 15% 20%, rgba(100, 20, 200, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 75%, rgba(0, 180, 255, 0.12) 0%, transparent 55%),
    radial-gradient(ellipse 40% 60% at 50% 50%, rgba(180, 0, 255, 0.06) 0%, transparent 70%);
}

/* ---- HEADER ---- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 28px;
  background: rgba(4, 5, 15, 0.7);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  box-shadow: 0 0 16px var(--primary-glow);
}

.logo-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--text);
}

.logo-accent {
  color: var(--primary);
  text-shadow: 0 0 12px var(--primary);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--success);
  opacity: 0.7;
}

.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ---- MAIN / PAGES ---- */
.main {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 90px 16px 32px;
}

.page {
  width: 100%;
  max-width: 440px;
  animation: fadeUp 0.5s cubic-bezier(.22,1,.36,1);
}

.page.hidden { display: none !important; }

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

/* ---- CARD ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  backdrop-filter: blur(24px);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
  opacity: 0.6;
}

.glow-card {
  box-shadow:
    0 0 40px rgba(0, 212, 255, 0.08),
    0 20px 60px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

/* ---- CARD HEADER ---- */
.card-header {
  text-align: center;
  margin-bottom: 28px;
}

.card-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0,212,255,0.15), rgba(191,95,255,0.15));
  border: 1px solid var(--border-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  color: var(--primary);
  margin: 0 auto 16px;
  box-shadow: 0 0 24px var(--primary-glow);
}

.card-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--text);
  margin-bottom: 6px;
}

.card-sub {
  font-size: 13px;
  color: var(--text-dim);
  letter-spacing: 1px;
}

/* ---- FORM ---- */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.input-wrap {
  display: flex;
  align-items: center;
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 20px var(--primary-glow);
}

.input-prefix {
  padding: 14px 14px 14px 18px;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--primary);
  font-weight: 600;
  border-right: 1px solid var(--border);
  background: rgba(0,212,255,0.05);
  white-space: nowrap;
}

.form-input {
  flex: 1;
  padding: 14px 18px;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
}

.form-input::placeholder { color: var(--text-dim); font-weight: 300; font-size: 13px; }
.form-input::-webkit-outer-spin-button,
.form-input::-webkit-inner-spin-button { -webkit-appearance: none; }

/* ---- CHIPS ---- */
.amount-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.chip {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid var(--border-accent);
  background: rgba(191,95,255,0.08);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.2s;
}

.chip:hover {
  background: rgba(191,95,255,0.2);
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  transform: translateY(-1px);
}

/* ---- BUTTONS ---- */
.btn-primary {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 3px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(0,212,255,0.3), 0 0 40px rgba(191,95,255,0.2);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.4s;
}

.btn-primary:hover::before { left: 100%; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0,212,255,0.4), 0 0 60px rgba(191,95,255,0.3); }
.btn-primary:active { transform: translateY(0); }

.btn-text, .btn-loader {
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
}

.btn-loader.hidden, .btn-text.hidden { display: none !important; }

.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.btn-secondary {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(0,212,255,0.05);
}

.btn-download {
  flex: 1;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border-accent);
  background: rgba(191,95,255,0.08);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.25s;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  position: relative;
  overflow: hidden;
}

.dl-icon {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: rgba(191,95,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  transition: transform 0.3s cubic-bezier(.34,1.56,.64,1);
}

.btn-download:hover {
  background: rgba(191,95,255,0.18);
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-1px);
}

.btn-download:hover .dl-icon {
  transform: translateY(2px);
}

.btn-download:active { transform: translateY(0); }

.btn-download.downloading .dl-icon {
  animation: bounce-dl 0.6s ease;
}

@keyframes bounce-dl {
  0% { transform: translateY(0); }
  40% { transform: translateY(4px); }
  70% { transform: translateY(-2px); }
  100% { transform: translateY(0); }
}

/* QR Placeholder */
.qr-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #f0f4ff;
  border-radius: 8px;
  color: #aab;
  font-family: var(--font-body);
  font-size: 12px;
}

.qr-placeholder i { font-size: 24px; color: var(--primary); opacity: 0.6; }

/* ---- ERROR MSG ---- */
.error-msg {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--error-glow);
  border: 1px solid rgba(255,77,109,0.3);
  color: var(--error);
  font-size: 13px;
}

.error-msg.hidden { display: none !important; }

/* ---- ORDER BADGE ---- */
.order-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 20px;
  background: rgba(191,95,255,0.1);
  border: 1px solid var(--border-accent);
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--accent);
  margin-bottom: 12px;
}

.amount-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.amount-label {
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--text-dim);
}

.amount-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 900;
  color: var(--text);
  text-shadow: 0 0 20px rgba(0,212,255,0.3);
}

/* ---- QR WRAPPER ---- */
.qr-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px 0;
}

.qr-frame {
  position: relative;
  width: 220px; height: 220px;
  padding: 12px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 0 40px rgba(0,212,255,0.2), 0 0 80px rgba(191,95,255,0.1);
}

.qr-corner {
  position: absolute;
  width: 20px; height: 20px;
  border-color: var(--primary);
  border-style: solid;
  z-index: 2;
}
.qr-corner.tl { top: -2px; left: -2px; border-width: 3px 0 0 3px; border-radius: 4px 0 0 0; }
.qr-corner.tr { top: -2px; right: -2px; border-width: 3px 3px 0 0; border-radius: 0 4px 0 0; }
.qr-corner.bl { bottom: -2px; left: -2px; border-width: 0 0 3px 3px; border-radius: 0 0 0 4px; }
.qr-corner.br { bottom: -2px; right: -2px; border-width: 0 3px 3px 0; border-radius: 0 0 4px 0; }

.qr-image {
  width: 100%; height: 100%;
  border-radius: 8px;
  object-fit: contain;
}

.qr-scan-line {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  box-shadow: 0 0 10px var(--primary);
  animation: scan 2.5s ease-in-out infinite;
}

@keyframes scan {
  0% { top: 0; opacity: 0.8; }
  100% { top: 100%; opacity: 0.2; }
}

.qr-brand {
  margin-top: 12px;
  font-size: 11px;
  color: var(--text-dim);
  display: flex; align-items: center; gap: 6px;
  letter-spacing: 0.5px;
}

/* ---- TIMER ---- */
.timer-section {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(255,179,71,0.06);
  border: 1px solid rgba(255,179,71,0.2);
  margin-bottom: 16px;
}

.timer-icon { color: var(--warning); font-size: 18px; }

.timer-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.timer-label {
  font-family: var(--font-display);
  font-size: 8px;
  letter-spacing: 2px;
  color: var(--text-dim);
}

.timer-value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--warning);
  letter-spacing: 2px;
  text-shadow: 0 0 12px rgba(255,179,71,0.4);
}

.timer-bar-wrap {
  width: 100%;
  height: 3px;
  background: rgba(255,179,71,0.15);
  border-radius: 2px;
  position: absolute;
  bottom: 0; left: 0;
  overflow: hidden;
}

.timer-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--warning), var(--error));
  width: 100%;
  border-radius: 2px;
  transition: width 1s linear;
}

.timer-section { position: relative; overflow: hidden; }

/* ---- STATUS ---- */
.status-section {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.status-pulse {
  position: relative;
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
}

.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  position: relative; z-index: 1;
}

.pulse-ring {
  position: absolute;
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  animation: pulse-anim 1.5s ease-out infinite;
  opacity: 0;
}

@keyframes pulse-anim {
  0% { transform: scale(0.5); opacity: 0.8; }
  100% { transform: scale(1.5); opacity: 0; }
}

.status-text {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--text-dim);
}

/* ---- ACTION ROW ---- */
.action-row {
  display: flex;
  gap: 12px;
}

/* ---- RESULT CARDS ---- */
.result-card {
  text-align: center;
}

.result-icon {
  position: relative;
  width: 80px; height: 80px;
  margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 44px;
}

.icon-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid currentColor;
  animation: ring-pulse 2s ease-out infinite;
  opacity: 0.4;
}

@keyframes ring-pulse {
  0% { transform: scale(1); opacity: 0.4; }
  100% { transform: scale(1.4); opacity: 0; }
}

.success-icon { color: var(--success); }
.failed-icon { color: var(--error); }

.success-card { border-color: rgba(0,255,179,0.2); box-shadow: 0 0 40px rgba(0,255,179,0.08), 0 20px 60px rgba(0,0,0,0.5); }
.failed-card { border-color: rgba(255,77,109,0.2); box-shadow: 0 0 40px rgba(255,77,109,0.08), 0 20px 60px rgba(0,0,0,0.5); }

.result-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 3px;
  margin-bottom: 8px;
}

.result-sub {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.result-details {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 24px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

.result-row:last-child { border-bottom: none; }

.result-row span:first-child {
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: 1px;
}

.result-row span:last-child {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 1px;
}

.badge-success {
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(0,255,179,0.12);
  border: 1px solid rgba(0,255,179,0.3);
  color: var(--success) !important;
  font-size: 9px !important;
  letter-spacing: 2px !important;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 480px) {
  .card { padding: 22px 18px; }
  .amount-value { font-size: 22px; }
  .qr-frame { width: 180px; height: 180px; }
}
