@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
  --bg: #000000;
  --primary: #7C3AED;
  --primary-light: #8A2BE2;
  --primary-dark: #4C1D95;
  --primary-darker: #2E1065;
  --card: #1A1A1A;
  --border: #2A2A2A;
  --placeholder: #A78BFA;
  --text: #FFFFFF;
  --text-muted: #A1A1AA;
  --success: #22C55E;
  --error: #EF4444;
  --radius: 1rem;
}

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

body {
  font-family: 'Poppins', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/* App shell — full width, no phone chrome */
.phone-frame {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
}

.status-bar {
  display: none !important;
}

/* Shared components */
.logo-shield {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-shield .shield {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #7C3AED, #4C1D95);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: #fff;
  position: relative;
  box-shadow: 0 0 20px rgba(124, 58, 237, 0.5);
}

.logo-shield .shield::after {
  content: '';
  position: absolute;
  inset: -4px;
  border: 2px solid #7C3AED;
  border-radius: 14px;
  opacity: 0.4;
}

.logo-text {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.5px;
  background: linear-gradient(90deg, #A78BFA, #7C3AED);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn-primary {
  width: 100%;
  height: 56px;
  background: linear-gradient(135deg, #7C3AED, #6D28D9);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.4);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 25px rgba(124, 58, 237, 0.55);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.input-field {
  width: 100%;
  height: 52px;
  background: #0f0f0f;
  border: 1.5px solid #7C3AED;
  border-radius: 14px;
  padding: 0 16px;
  color: #fff;
  font-size: 15px;
  font-family: 'Poppins', sans-serif;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.input-field::placeholder {
  color: #A78BFA;
  opacity: 0.7;
}

.input-field:focus {
  border-color: #A78BFA;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.25);
}

.input-field.error {
  border-color: #EF4444;
}

.label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #A78BFA;
  margin-bottom: 6px;
}

.card {
  background: #1A1A1A;
  border: 1px solid #2A2A2A;
  border-radius: 16px;
  padding: 16px;
}

.toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #1A1A1A;
  border: 1px solid #7C3AED;
  color: #fff;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.success { border-color: #22C55E; }
.toast.error { border-color: #EF4444; }

/* Bottom Nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 72px;
  background: #0f0f0f;
  border-top: 1px solid #2A2A2A;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-bottom: 8px;
  z-index: 50;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #71717A;
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
  flex: 1;
}

.nav-item.active {
  color: #7C3AED;
}

.nav-item svg {
  width: 22px;
  height: 22px;
}

.nav-fab {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #7C3AED, #4C1D95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -24px;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.5);
  color: #fff;
}

/* Page content area */
.page-content {
  min-height: calc(100vh - 72px);
  overflow-y: auto;
  padding: 0 20px 20px;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 90px;
}

.page-content.no-nav {
  min-height: 100vh;
  padding-bottom: 24px;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.4s ease forwards;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.pulse {
  animation: pulse 2s infinite;
}

/* Select dropdown */
.select-wrapper {
  position: relative;
}

.select-wrapper select {
  appearance: none;
  width: 100%;
  height: 52px;
  background: #0f0f0f;
  border: 1.5px solid #7C3AED;
  border-radius: 14px;
  padding: 0 40px 0 16px;
  color: #fff;
  font-size: 15px;
  font-family: 'Poppins', sans-serif;
  outline: none;
  cursor: pointer;
}

.select-wrapper::after {
  content: '▼';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #A78BFA;
  font-size: 10px;
  pointer-events: none;
}

/* Scrollbar */
.page-content::-webkit-scrollbar {
  width: 4px;
}
.page-content::-webkit-scrollbar-track {
  background: transparent;
}
.page-content::-webkit-scrollbar-thumb {
  background: #7C3AED;
  border-radius: 4px;
}

/* HD Logo */
.logo-img {
  width: 42px;
  height: 46px;
  object-fit: contain;
  display: block;
}
.logo-img.lg {
  width: 72px;
  height: 80px;
}
.logo-img.sm {
  width: 32px;
  height: 36px;
}
.logo-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* extra-hd-polish */
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.phone-frame, .page-content { background:#000; }
.btn-primary {
  background: linear-gradient(135deg, #8B5CF6, #7C3AED) !important;
  box-shadow: 0 10px 28px rgba(124,58,237,0.35);
  border: none;
  letter-spacing: 0.01em;
}
.btn-primary:active { transform: scale(0.98); }
.card, .s-card, .menu-item {
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.input-field:focus {
  box-shadow: 0 0 0 3px rgba(124,58,237,0.25);
}

/* subtle button animations */
.btn-primary, .btn-wallet, .btn-sm, .google-btn, .bottom-nav a, button.btn-primary {
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease, opacity 0.18s ease;
  will-change: transform;
}
.btn-primary:hover, .btn-wallet:hover, .btn-sm:hover, .google-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
}
.btn-primary:active, .btn-wallet:active, .btn-sm:active, .google-btn:active {
  transform: scale(0.97);
  filter: brightness(0.98);
}
.btn-primary {
  animation: mgBtnIn 0.35s ease both;
}
@keyframes mgBtnIn {
  from { opacity: 0.6; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
.bottom-nav a {
  transition: color 0.15s ease, transform 0.15s ease;
}
.bottom-nav a:active {
  transform: scale(0.92);
}
.s-card, .card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.hub button, .method-tab, .tabs button {
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease;
}
.hub button:active, .tabs button:active, .method-tab:active {
  transform: scale(0.98);
}

/* livelier buttons */
.btn-primary {
  background: linear-gradient(135deg, #A78BFA 0%, #7C3AED 45%, #6D28D9 100%) !important;
  box-shadow: 0 8px 24px rgba(124,58,237,0.45), 0 0 0 1px rgba(255,255,255,0.06) inset !important;
  border-radius: 14px !important;
  font-weight: 800 !important;
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.18), transparent 50%);
  pointer-events: none;
}
.btn-primary:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 14px 32px rgba(124,58,237,0.55) !important;
  filter: brightness(1.08);
}
.btn-primary:active {
  transform: scale(0.97);
  box-shadow: 0 4px 12px rgba(124,58,237,0.35) !important;
}
.btn-wallet {
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease !important;
}
.btn-wallet:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}
.btn-wallet.primary, a.btn-wallet.primary {
  background: linear-gradient(135deg, #fff, #EDE9FE) !important;
  color: #5B21B6 !important;
  box-shadow: 0 6px 16px rgba(255,255,255,0.2);
}
.google-btn:hover {
  border-color: #A78BFA !important;
  transform: translateY(-1px);
}
.tabs button.on, .method-tab.active {
  box-shadow: 0 6px 16px rgba(124,58,237,0.35);
}

/* ultra-hd-v2 */
html { scroll-behavior: smooth; }
body {
  background: #000;
  background-image: radial-gradient(ellipse at top, rgba(124,58,237,0.12), transparent 55%);
}


/* Transparent circular logo */
.logo-img, img.logo, img[src*="logo.png"], .crown-logo img, .hero img, .brand-logo {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  border-radius: 50% !important;
  object-fit: cover;
}
.logo-img {
  width: 40px; height: 40px;
}
.logo-img.lg { width: 72px; height: 72px; }
.logo-img.sm { width: 32px; height: 32px; }


/* ===== USER MOBILE-FIRST (not admin) ===== */
html, body { overflow-x: hidden; max-width: 100vw; }
img, video, svg { max-width: 100%; height: auto; }
.phone-frame {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  overflow-x: hidden;
}
.page-content {
  padding-left: 16px;
  padding-right: 16px;
  padding-bottom: 88px;
  max-width: 100%;
  overflow-x: hidden;
}
.bottom-nav {
  max-width: 430px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
}
.input-field, .field, input, select, textarea {
  max-width: 100%;
  font-size: 16px; /* prevent iOS zoom */
}
.btn-primary, .btn-side {
  min-height: 48px;
}
@media (max-width: 430px) {
  .phone-frame { max-width: 100%; }
  h1 { font-size: 1.25rem; }
  .stats-grid, .quick-row { gap: 8px; }
}
@media (min-width: 769px) {
  body:not(.admin-body) {
    background: #000;
  }
  .phone-frame {
    max-width: 430px;
    box-shadow: 0 0 0 1px #1a1a1a, 0 20px 60px rgba(0,0,0,0.5);
  }
}
