/* =========================================================
   AxisVPN Mini App - Top-Up & Wallet Hub Screen Design
   ========================================================= */

.topup-screen-container {
  min-height: 100%;
  padding: calc(16px + var(--tg-total-safe-top, 0px)) 18px calc(90px + var(--tg-safe-bottom, 0px)) 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: fadeInTopup 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Header Navigation Bar */
.topup-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.topup-back-btn {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: var(--surface-white);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-subtle);
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.topup-back-btn:hover {
  transform: scale(1.06);
  border-color: var(--brand-purple);
  color: var(--brand-purple);
}

.topup-back-btn:active {
  transform: scale(0.94);
}

.topup-header-title-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.topup-header-title {
  font-size: 1.12rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.2;
}

.topup-header-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}

.topup-history-btn {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: var(--surface-white);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-subtle);
  transition: all 0.22s ease;
}

.topup-history-btn:hover {
  color: var(--brand-purple);
  border-color: var(--brand-purple);
  transform: scale(1.06);
}

/* =========================================================
   WALLET BALANCE HERO CARD (Purple / Midnight Gradient)
   ========================================================= */
.topup-balance-card {
  border-radius: 24px;
  padding: 22px 20px;
  background: 
    radial-gradient(ellipse 90% 70% at 85% 15%, rgba(167, 139, 250, 0.35) 0%, transparent 60%),
    radial-gradient(ellipse 70% 60% at 10% 90%, rgba(109, 40, 217, 0.45) 0%, transparent 70%),
    linear-gradient(145deg, #1E1035 0%, #351368 50%, #5B21B6 100%);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 16px 36px -6px rgba(91, 33, 182, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  color: #FFFFFF;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.topup-balance-card::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(216, 180, 254, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.topup-balance-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.topup-balance-label-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topup-balance-icon-pill {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #DDD6FE;
}

.topup-balance-lbl {
  font-size: 0.8rem;
  font-weight: 700;
  color: #E9D5FF;
}

.topup-balance-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  backdrop-filter: blur(8px);
}

.topup-balance-main {
  position: relative;
  z-index: 2;
}

.topup-balance-val {
  font-size: 2.1rem;
  font-weight: 900;
  letter-spacing: -0.5px;
  color: #FFFFFF;
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

.topup-balance-currency {
  font-size: 0.95rem;
  font-weight: 800;
  color: #DDD6FE;
  margin-right: 6px;
}

.topup-balance-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 12px;
  position: relative;
  z-index: 2;
  font-size: 0.74rem;
  color: #C4B5FD;
}

.topup-balance-footer-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* =========================================================
   PRESET AMOUNTS SELECTOR (Quick Chips)
   ========================================================= */
.topup-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.topup-section-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.topup-section-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-purple);
  box-shadow: 0 0 8px var(--brand-purple);
}

.topup-presets-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.topup-preset-chip {
  background: var(--surface-white);
  border: 1.5px solid var(--border-subtle);
  border-radius: 16px;
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  box-shadow: var(--shadow-subtle);
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  user-select: none;
}

.topup-preset-chip:hover {
  transform: translateY(-2px);
  border-color: var(--brand-purple);
  box-shadow: 0 8px 20px -4px rgba(109, 40, 217, 0.18);
}

.topup-preset-chip:active {
  transform: scale(0.95);
}

.topup-preset-chip.is-active {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.08) 0%, rgba(91, 33, 182, 0.15) 100%);
  border-color: var(--brand-purple);
  box-shadow: 0 0 0 1px var(--brand-purple), 0 8px 24px -4px rgba(124, 58, 237, 0.25);
}

.topup-preset-amount {
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--text-primary);
  line-height: 1.1;
}

.topup-preset-sub {
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--text-muted);
}

.topup-preset-tag {
  position: absolute;
  top: -8px;
  font-size: 0.58rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 8px;
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.35);
  white-space: nowrap;
}

/* =========================================================
   PAYMENT METHOD CARDS (Shetab & Crypto)
   ========================================================= */
.topup-methods-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.topup-method-card {
  background: var(--surface-white);
  border: 1.5px solid var(--border-subtle);
  border-radius: 20px;
  padding: 18px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  cursor: pointer;
  box-shadow: var(--shadow-subtle);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.topup-method-card:hover {
  transform: translateY(-2px);
  border-color: var(--brand-purple);
  box-shadow: 0 12px 28px -4px rgba(109, 40, 217, 0.15);
}

.topup-method-card:active {
  transform: scale(0.98);
}

/* Method Card Left: Icon Badge & Content */
.topup-method-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.topup-method-icon-box {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.topup-method-card.is-shetab .topup-method-icon-box {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.12) 0%, rgba(91, 33, 182, 0.22) 100%);
  color: var(--brand-purple);
  border: 1px solid rgba(124, 58, 237, 0.25);
}

.topup-method-card.is-crypto .topup-method-icon-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12) 0%, rgba(5, 150, 105, 0.22) 100%);
  color: #10B981;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.topup-method-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.topup-method-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topup-method-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
}

.topup-method-badge-pill {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
}

.topup-method-card.is-shetab .topup-method-badge-pill {
  background: rgba(124, 58, 237, 0.1);
  color: var(--brand-purple);
  border: 1px solid rgba(124, 58, 237, 0.2);
}

.topup-method-card.is-crypto .topup-method-badge-pill {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.topup-method-desc {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
  line-height: 1.35;
}

.topup-method-pills-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  flex-wrap: wrap;
}

.topup-feature-tag {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--surface-frost);
  padding: 2px 6px;
  border-radius: 6px;
}

/* Arrow Button on Method Card */
.topup-method-action {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--surface-frost);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.topup-method-card:hover .topup-method-action {
  background: var(--brand-purple);
  color: #FFFFFF;
  transform: translateX(-3px);
}

/* =========================================================
   TRUST AND SECURITY PILLS STRIP
   ========================================================= */
.topup-trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 2px;
}

.topup-trust-item {
  background: var(--surface-white);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  box-shadow: var(--shadow-subtle);
}

.topup-trust-icon {
  font-size: 1.1rem;
}

.topup-trust-text {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--text-secondary);
}

/* =========================================================
   FAQ & HELP ACCORDION SECTION
   ========================================================= */
.topup-faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.topup-faq-item {
  background: var(--surface-white);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  box-shadow: var(--shadow-subtle);
  transition: all 0.2s ease;
}

.topup-faq-item:hover {
  border-color: rgba(124, 58, 237, 0.3);
}

.topup-faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-primary);
  gap: 8px;
}

.topup-faq-a {
  font-size: 0.73rem;
  color: var(--text-muted);
  line-height: 1.45;
  padding-top: 4px;
  border-top: 1px solid var(--border-subtle);
}

/* Responsive Overrides */
@media (max-width: 380px) {
  .topup-presets-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .topup-balance-val {
    font-size: 1.8rem;
  }
}
