/* ==========================================================================
   Trome Digital - Direct Contact & Social Biolink
   Minimalist, Ultra-Direct, High-Conversion
   ========================================================================== */

:root {
  /* Light Theme (Clean, arctic-cyan & deep midnight navy) */
  --bg-body: #F2F7FB;
  --bg-card: #FFFFFF;
  --bg-card-hover: #EBF4FA;
  
  --color-ink: #08152C;
  --color-ink-muted: #516888;
  --color-border: #D4E2F0;
  --color-border-hover: rgba(12, 109, 214, 0.45);

  --color-primary: #0C6DD6;
  --color-accent: #28CBD0;
  --color-wsp: #25D366;
  --color-wsp-dark: #128C7E;

  --shadow-card: 0 4px 16px -2px rgba(8, 21, 44, 0.06), 0 2px 6px -1px rgba(8, 21, 44, 0.03);
  --shadow-hover: 0 12px 28px -4px rgba(12, 109, 214, 0.16), 0 4px 10px -2px rgba(8, 21, 44, 0.05);
  
  --radius-btn: 18px;
  --radius-full: 9999px;
  --font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  /* Dark Theme (Exact deep midnight navy & glowing cyan from the new Llama logo) */
  --bg-body: #071022;
  --bg-card: #0D1C38;
  --bg-card-hover: #13284E;
  
  --color-ink: #EDF5FC;
  --color-ink-muted: #88A2C4;
  --color-border: rgba(72, 214, 216, 0.14);
  --color-border-hover: rgba(72, 214, 216, 0.5);

  --color-primary: #38D2D6;
  --color-accent: #1E88E5;

  --shadow-card: 0 6px 22px rgba(0, 0, 0, 0.38);
  --shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.55), 0 0 20px rgba(40, 203, 208, 0.14);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-body);
  color: var(--color-ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  transition: background-color 0.25s ease, color 0.25s ease;
  overflow-x: hidden;
  position: relative;
}

/* Ambient glow accents (Cyan & Ocean Blue from the Llama circuit aura) */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  max-width: 900px;
  height: 440px;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.glow-orb-1 {
  position: absolute;
  top: -90px;
  left: 18%;
  width: 390px;
  height: 390px;
  background: radial-gradient(circle, rgba(40, 203, 208, 0.24) 0%, transparent 70%);
  filter: blur(60px);
  border-radius: 50%;
}

.glow-orb-2 {
  position: absolute;
  top: 10px;
  right: 15%;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(12, 109, 214, 0.22) 0%, transparent 70%);
  filter: blur(55px);
  border-radius: 50%;
}

/* Container */
.app-container {
  width: 100%;
  max-width: 520px;
  padding: 24px 18px 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  z-index: 1;
}

/* Top Utility Nav */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.location-badge {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-ink-muted);
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  padding: 5px 12px;
  border-radius: var(--radius-full);
}

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

.icon-btn-subtle {
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  color: var(--color-ink);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: var(--transition);
}

.icon-btn-subtle:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Profile Header (Clean & Direct with the new Llamita mascot) */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 2px;
}

.avatar-ring {
  width: 104px;
  height: 104px;
  border-radius: 26px;
  padding: 3px;
  background: linear-gradient(135deg, #4AD6D8 0%, #1E88E5 55%, #0D254C 100%);
  box-shadow: 0 12px 30px -4px rgba(40, 203, 208, 0.35), 0 4px 14px rgba(8, 21, 44, 0.3);
  margin-bottom: 14px;
  display: grid;
  place-items: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.avatar-ring:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 16px 36px -4px rgba(40, 203, 208, 0.48), 0 6px 18px rgba(8, 21, 44, 0.35);
}

.avatar-circle {
  width: 100%;
  height: 100%;
  border-radius: 23px;
  background: #071022;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-name {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--color-ink);
  margin-bottom: 3px;
  line-height: 1.1;
}

.brand-gradient {
  background: linear-gradient(135deg, #4AD6D8 0%, #26A9D4 50%, #1B6FD2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.profile-handle {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-ink-muted);
  margin-bottom: 12px;
}

/* Availability Pill */
.availability-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.3);
  color: #15803D;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8125rem;
  font-weight: 700;
}

[data-theme="dark"] .availability-pill {
  color: #4ADE80;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--color-wsp);
  box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.25);
}

/* Direct Action Buttons List */
.direct-links-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

/* Action Button: Big, Touch-Friendly, Clear */
.action-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  min-height: 74px;
  border-radius: var(--radius-btn);
  background: var(--bg-card);
  border: 1.5px solid var(--color-border);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: var(--color-ink);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  width: 100%;
  text-align: left;
}

.action-btn:hover {
  transform: translateY(-3px);
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-hover);
}

.action-btn:active {
  transform: scale(0.985);
}

/* Featured WhatsApp Card */
.action-btn.action-whatsapp.featured {
  border-color: rgba(37, 211, 102, 0.4);
  background: linear-gradient(135deg, var(--bg-card) 75%, rgba(37, 211, 102, 0.08) 100%);
}

.action-btn.action-whatsapp:hover {
  border-color: var(--color-wsp);
}

.btn-icon-wrapper {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #FFFFFF;
}

.whatsapp-bg {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

.web-bg {
  background: linear-gradient(135deg, #28CBD0 0%, #0C6DD6 100%);
  box-shadow: 0 4px 14px rgba(12, 109, 214, 0.32);
}

.instagram-bg {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
  box-shadow: 0 4px 14px rgba(225, 48, 108, 0.3);
}

.contact-bg {
  background: linear-gradient(135deg, #1E3558 0%, #071328 100%);
  box-shadow: 0 4px 12px rgba(7, 19, 40, 0.28);
}

.btn-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

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

.btn-main-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--color-ink);
}

.btn-subtitle {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Badges */
.pill-badge {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.pill-green {
  background: rgba(37, 211, 102, 0.15);
  color: #16A34A;
}

.pill-blue {
  background: rgba(40, 203, 208, 0.15);
  color: #0C6DD6;
}

.pill-pink {
  background: rgba(225, 48, 108, 0.12);
  color: #E1306C;
}

.pill-gray {
  background: rgba(100, 116, 139, 0.15);
  color: var(--color-ink-muted);
}

[data-theme="dark"] .pill-green { color: #4ADE80; }
[data-theme="dark"] .pill-blue { color: #48D6D8; }

.btn-chevron {
  color: var(--color-ink-muted);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.action-btn:hover .btn-chevron {
  color: var(--color-primary);
  transform: translateX(4px);
}

/* Footer */
.app-footer {
  text-align: center;
  margin-top: 10px;
  padding-top: 18px;
  border-top: 1px solid var(--color-border);
}

.app-footer p {
  font-size: 0.825rem;
  color: var(--color-ink-muted);
}

/* Modal Simple QR */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(7, 16, 34, 0.72);
  backdrop-filter: blur(6px);
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  width: 100%;
  max-width: 360px;
  background: var(--bg-card);
  border: 1px solid var(--color-border);
  border-radius: 24px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-hover);
}

.modal-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-top h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--color-ink);
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: var(--color-ink-muted);
  cursor: pointer;
  line-height: 1;
}

#qrcode-box {
  background: #FFFFFF;
  padding: 14px;
  border-radius: 14px;
  display: grid;
  place-items: center;
}

#qrcode-box img, #qrcode-box canvas {
  border-radius: 6px;
}

.qr-label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-primary);
}

.btn-full {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #28CBD0 0%, #0C6DD6 100%);
  color: #FFFFFF;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(12, 109, 214, 0.3);
}

/* Toast */
.toast-box {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-pill {
  background: #0F172A;
  color: #FFFFFF;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  animation: fadeIn 0.2s ease;
}

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

/* Mobile optimizations */
@media (max-width: 420px) {
  .app-container {
    padding: 18px 12px 36px;
  }
  .action-btn {
    padding: 14px 16px;
    min-height: 68px;
  }
  .btn-icon-wrapper {
    width: 44px;
    height: 44px;
  }
  .btn-main-title {
    font-size: 0.98rem;
  }
}
