/* ==========================================================================
   BAYARIN DOMAIN - SINGLE PAGE MODERN DESIGN
   ========================================================================== */

:root {
  --bg-dark: #090d16;
  --bg-card: #111726;
  --bg-input: #192238;
  --border-color: #23304c;
  --border-focus: #38bdf8;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-faint: #64748b;

  --accent-cyan: #38bdf8;
  --accent-blue: #3b82f6;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;

  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-full: 9999px;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
  padding: 24px;
}

/* Background Ambient Glow */
.glow-bg {
  position: fixed;
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.15) 0%, rgba(139, 92, 246, 0.08) 50%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(80px);
  z-index: 0;
}

.page-wrapper {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
}

/* Main Card */
.card-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(56, 189, 248, 0.08);
  backdrop-filter: blur(12px);
}

/* Brand Header */
.brand-header {
  text-align: center;
  margin-bottom: 28px;
}
.brand-icon {
  width: 54px;
  height: 54px;
  background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(14, 165, 233, 0.35);
}
.brand-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.gradient-text {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Form */
.domain-form {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}
.input-wrapper input {
  width: 100%;
  background: var(--bg-input);
  border: 2px solid var(--border-color);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  padding: 14px 40px 14px 18px;
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.2s ease;
}
.input-wrapper input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.2);
  background: #1e2942;
}
.btn-clear {
  position: absolute;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--text-faint);
  font-size: 1rem;
  cursor: pointer;
}
.btn-clear:hover {
  color: var(--text-primary);
}

/* TLD Pills */
.btn-tld-pill {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-tld-pill:hover {
  color: var(--text-primary);
  border-color: var(--accent-cyan);
}
.btn-tld-pill.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.35);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}
.btn-primary:active {
  transform: translateY(0);
}
.btn-block {
  width: 100%;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* API Note */
.api-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-faint);
  margin-bottom: 24px;
}
.dot {
  width: 7px;
  height: 7px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent-emerald);
}

/* Result Card */
.result-card {
  background: rgba(16, 185, 129, 0.05);
  border: 2px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 20px;
  animation: fadeIn 0.3s ease forwards;
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.12);
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.status-badge {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}
.source-badge {
  font-size: 0.75rem;
  color: var(--text-faint);
  font-family: var(--font-mono);
}

.result-domain {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 14px;
  word-break: break-all;
}

.price-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 20px;
}
.price-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 4px;
}
.price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.price-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--accent-emerald);
}
.price-period {
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.result-desc {
  font-size: 0.82rem;
  color: var(--text-faint);
  margin-top: 6px;
}

/* Button Pembayaran */
.btn-payment {
  width: 100%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-size: 1.05rem;
  padding: 16px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
}
.btn-payment:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.55);
}
.btn-payment:active {
  transform: translateY(0);
}

/* Unavailable Card */
.unavailable-card {
  background: rgba(244, 63, 94, 0.06);
  border: 1px solid rgba(244, 63, 94, 0.3);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  animation: fadeIn 0.3s ease forwards;
}
.unavail-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(244, 63, 94, 0.2);
  color: var(--accent-rose);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}
.unavail-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.unavail-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* ==========================================================================
   MODAL PEMBAYARAN
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal-backdrop.show {
  display: flex;
}
.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 440px;
  max-height: calc(100dvh - 32px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
  animation: scaleUp 0.25s ease forwards;
  margin: auto;
}
@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}
.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
}
.btn-close-modal {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 1rem;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.btn-close-modal:hover {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border-color: var(--accent-rose);
}
.modal-body {
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.order-summary-box {
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 20px;
}
.summary-item {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.9rem;
}
.summary-item .label { color: var(--text-secondary); }
.summary-item .val { font-weight: 600; }
.price-highlight { color: var(--accent-emerald) !important; font-size: 1.05rem; }

.qris-wrapper {
  background: #ffffff;
  color: #0f172a;
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  margin-bottom: 20px;
}
.qris-badge {
  font-size: 0.75rem;
  font-weight: 900;
  color: #dc2626;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.qr-image {
  width: 200px;
  height: 200px;
  display: block;
  margin: 0 auto 10px;
}
.qr-helper {
  font-size: 0.78rem;
  color: #64748b;
  line-height: 1.3;
}

.btn-emerald {
  background: var(--accent-emerald);
  color: #ffffff;
}
.btn-emerald:hover {
  filter: brightness(1.1);
}

/* Success View */
.success-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  font-size: 1.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px auto 16px;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.25);
}
.success-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 6px;
}
.success-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.success-ref {
  background: var(--bg-input);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--accent-cyan);
  margin-bottom: 24px;
}

/* ==========================================================================
   TELEGRAM AUTH & USER PROFILE STYLES
   ========================================================================== */

.telegram-icon-wrap {
  background: linear-gradient(135deg, #2AABEE 0%, #229ED9 100%) !important;
  box-shadow: 0 8px 24px rgba(34, 158, 217, 0.4) !important;
}

.auth-box {
  background: rgba(25, 34, 56, 0.5);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  margin-top: 8px;
}

.auth-instruction {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

.step-num {
  width: 24px;
  height: 24px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  font-weight: 700;
  font-size: 0.8rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-code-wrapper {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 20px;
}

.auth-code-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-faint);
  margin-bottom: 6px;
}

.auth-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-code-val {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--accent-cyan);
  letter-spacing: 0.08em;
}

.btn-copy-code {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
}
.btn-copy-code:hover {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
}

.btn-telegram {
  background: #229ED9;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(34, 158, 217, 0.35);
  margin-bottom: 16px;
}
.btn-telegram:hover {
  background: #1d8bc0;
  box-shadow: 0 6px 22px rgba(34, 158, 217, 0.5);
  transform: translateY(-1px);
}

.auth-waiting-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 6px 0;
}

.status-pulse-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
  animation: pulse-glow 1.8s infinite ease-in-out;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.3; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.25); box-shadow: 0 0 14px var(--accent-cyan); }
}

/* User Profile Bar on Main App Card */
.user-profile-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(25, 34, 56, 0.6);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  margin-bottom: 24px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(34, 158, 217, 0.2);
  border: 1px solid rgba(34, 158, 217, 0.4);
  color: #229ED9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.user-meta {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.user-tag {
  font-size: 0.75rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.user-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-mydomains {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: var(--accent-cyan);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-mydomains:hover {
  background: rgba(56, 189, 248, 0.22);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

.btn-logout {
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.25);
  color: var(--accent-rose);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-logout:hover {
  background: rgba(244, 63, 94, 0.2);
  border-color: var(--accent-rose);
}

/* My Domains List in Modal */
.my-domains-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 4px;
}
.my-domain-item {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  transition: all 0.2s ease;
}
.my-domain-item:hover {
  border-color: rgba(56, 189, 248, 0.4);
}
.my-domain-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.my-domain-title {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  word-break: break-all;
}
.my-domain-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}
.my-domain-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}
.badge-pending {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
.badge-paid {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}
.badge-processing {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}
.badge-completed {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}
.badge-cancelled {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.35);
}
.my-domain-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}
.btn-pay-now {
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
  color: #ffffff;
  border: none;
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-pay-now:hover {
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}
.my-domains-empty {
  text-align: center;
  padding: 32px 16px;
  color: var(--text-secondary);
}
.my-domains-empty .empty-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
}
.my-domains-empty p {
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.telegram-notify-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(34, 158, 217, 0.12);
  border: 1px solid rgba(34, 158, 217, 0.3);
  color: #38bdf8;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  margin-bottom: 18px;
}

.payment-waiting-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(25, 34, 56, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin-top: 16px;
  text-align: center;
}

.waiting-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Helpers */
.font-mono { font-family: var(--font-mono); }
.text-faint { color: var(--text-faint); }
.text-center { text-align: center; }

/* ==========================================================================
   COMPREHENSIVE MOBILE RESPONSIVE SYSTEM
   ========================================================================== */

/* Tablets & Mobile Devices (<= 640px) */
@media (max-width: 640px) {
  body {
    padding: 16px 12px;
    align-items: flex-start;
    min-height: 100dvh;
  }
  
  .page-wrapper {
    max-width: 100%;
    margin: auto;
  }

  /* Card */
  .card-container {
    padding: 24px 18px;
    border-radius: var(--radius-md);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.45);
  }

  /* Header */
  .brand-header {
    margin-bottom: 20px;
  }
  .brand-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    border-radius: var(--radius-sm);
  }
  .brand-title {
    font-size: 1.55rem;
  }
  .brand-subtitle {
    font-size: 0.85rem;
    line-height: 1.45;
  }

  /* User Profile Bar on Mobile */
  .user-profile-bar {
    padding: 8px 12px;
    margin-bottom: 18px;
  }
  .user-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.85rem;
  }
  .user-name {
    font-size: 0.82rem;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .user-tag {
    font-size: 0.72rem;
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .user-actions {
    gap: 6px;
  }
  .btn-mydomains {
    padding: 4px 8px;
    font-size: 0.72rem;
  }
  .btn-logout {
    padding: 4px 8px;
    font-size: 0.72rem;
  }

  /* Form */
  .domain-form {
    flex-direction: column;
    gap: 10px;
  }
  .input-wrapper input {
    font-size: 16px !important; /* Critical: stops iOS Safari auto-zoom */
    padding: 13px 40px 13px 16px;
    border-radius: var(--radius-sm);
  }
  .btn-clear {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
  }
  .btn-primary {
    width: 100%;
    min-height: 48px;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
  }

  /* Telegram Auth Gate */
  .auth-box {
    padding: 18px 14px;
  }
  .btn-telegram {
    min-height: 48px;
    font-size: 0.95rem;
    padding: 12px 16px;
  }
  .auth-waiting-status {
    font-size: 0.8rem;
    line-height: 1.4;
  }

  /* Results Card */
  .result-card {
    padding: 18px 14px;
    margin-top: 16px;
  }
  .result-domain {
    font-size: 1.4rem;
    word-break: break-all;
    margin-bottom: 10px;
  }
  .price-section {
    padding: 12px 14px;
    margin-bottom: 16px;
  }
  .price-value {
    font-size: 1.55rem;
  }
  .price-period {
    font-size: 0.82rem;
  }
  .btn-payment {
    min-height: 48px;
    font-size: 0.95rem;
  }

  /* Unavailable Card */
  .unavailable-card {
    padding: 16px 14px;
    gap: 12px;
  }
  .unavail-title {
    font-size: 1.1rem;
    word-break: break-all;
  }
  .unavail-desc {
    font-size: 0.82rem;
  }

  /* Modal on Mobile */
  .modal-backdrop {
    padding: 10px;
    align-items: flex-end;
  }
  .modal-card {
    max-width: 100%;
    max-height: 92dvh;
    border-radius: var(--radius-md) var(--radius-md) var(--radius-md) var(--radius-md);
  }
  .modal-header {
    padding: 14px 16px;
  }
  .modal-title {
    font-size: 1.05rem;
  }
  .modal-body {
    padding: 16px 14px;
  }
  .order-summary-box {
    padding: 12px 14px;
    margin-bottom: 14px;
  }
  .summary-item {
    font-size: 0.82rem;
  }
  .price-highlight {
    font-size: 0.95rem !important;
  }
  .qris-wrapper {
    padding: 14px 10px;
    margin-bottom: 14px;
  }
  .qr-image {
    width: 100%;
    max-width: 190px;
    height: auto;
    aspect-ratio: 1/1;
    margin: 0 auto 8px;
  }
  .qr-helper {
    font-size: 0.74rem;
  }
  .payment-waiting-box {
    padding: 10px 12px;
    margin-top: 12px;
    gap: 8px;
  }
  .waiting-text {
    font-size: 0.78rem;
    line-height: 1.35;
  }
  .telegram-notify-badge {
    font-size: 0.75rem;
    padding: 6px 10px;
    line-height: 1.35;
  }
}

/* Small Smartphone Screens (<= 380px, e.g. iPhone SE, Galaxy A) */
@media (max-width: 380px) {
  body {
    padding: 10px 8px;
  }
  .card-container {
    padding: 18px 12px;
    border-radius: 14px;
  }
  .brand-title {
    font-size: 1.32rem;
  }
  .brand-icon {
    width: 42px;
    height: 42px;
  }
  .user-name, .user-tag {
    max-width: 115px;
  }
  .result-domain {
    font-size: 1.22rem;
  }
  .price-value {
    font-size: 1.38rem;
  }
  .qr-image {
    max-width: 165px;
  }
}

/* Landscape Phones or Short Viewports (<= 680px height) */
@media (max-height: 680px) {
  body {
    align-items: flex-start;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .modal-backdrop {
    align-items: flex-start;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .modal-card {
    max-height: calc(100dvh - 20px);
  }
}

