:root {
  --bg-dark: #040711;
  --bg-card: rgba(13, 20, 36, 0.75);
  --bg-card-hover: rgba(18, 28, 52, 0.95);
  --border-subtle: rgba(56, 189, 248, 0.22);
  --border-glow: rgba(0, 210, 255, 0.45);
  --brand-cyan: #00d2ff;
  --brand-blue: #0284c7;
  --brand-whatsapp: #25d366;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 2.5rem 1.25rem 2rem;
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Fondo ambiental tecnológico */
.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(56, 189, 248, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(56, 189, 248, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 30%, black 40%, transparent 80%);
}

.ambient-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(0, 210, 255, 0.16) 0%, rgba(2, 132, 199, 0.06) 50%, transparent 75%);
  filter: blur(90px);
}

.ambient-glow-bottom {
  position: absolute;
  width: 500px;
  height: 500px;
  bottom: -200px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(37, 211, 102, 0.08) 0%, transparent 70%);
  filter: blur(100px);
}

/* Contenedor Principal */
.tree-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Cabecera del Perfil */
.profile-header {
  text-align: center;
  margin-bottom: 2.25rem;
  width: 100%;
}

.logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.1rem 1.85rem;
  background: linear-gradient(135deg, rgba(8, 14, 30, 0.9), rgba(4, 7, 17, 0.95));
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 24px;
  backdrop-filter: blur(16px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 210, 255, 0.2);
  margin-bottom: 1.25rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.7), 0 0 40px rgba(0, 210, 255, 0.35);
}

.logo-img {
  height: 56px;
  width: auto;
  display: block;
  filter: drop-shadow(0 0 18px rgba(0, 210, 255, 0.4));
}

.brand-title {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
  color: #fff;
}

.brand-tagline {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--brand-cyan);
  letter-spacing: 0.03em;
  margin-bottom: 0.85rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.82rem;
  color: #e2e8f0;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 0.4rem 1rem;
  border-radius: 9999px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* Lista de Enlaces */
.links-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.link-card {
  display: flex;
  align-items: center;
  gap: 1.15rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 1.15rem 1.35rem;
  text-decoration: none;
  color: var(--text-main);
  backdrop-filter: blur(14px);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.link-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.link-card:hover {
  transform: translateY(-3px) scale(1.01);
  border-color: var(--border-glow);
  background: var(--bg-card-hover);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 25px rgba(0, 210, 255, 0.18);
}

/* Estilo Especial: WhatsApp Destacado */
.link-card.featured-whatsapp {
  background: linear-gradient(135deg, rgba(8, 36, 20, 0.85), rgba(4, 18, 12, 0.95));
  border: 1px solid rgba(37, 211, 102, 0.4);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 30px rgba(37, 211, 102, 0.15);
}

.link-card.featured-whatsapp:hover {
  border-color: #25d366;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.6), 0 0 35px rgba(37, 211, 102, 0.35);
}

.link-icon-box {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.link-card:hover .link-icon-box {
  transform: scale(1.08);
}

.icon-whatsapp {
  background: rgba(37, 211, 102, 0.18);
  border: 1px solid rgba(37, 211, 102, 0.4);
  color: #25d366;
}

.icon-web {
  background: rgba(2, 132, 199, 0.2);
  border: 1px solid rgba(0, 210, 255, 0.4);
  color: #00d2ff;
}

.icon-email {
  background: rgba(168, 85, 247, 0.18);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #c084fc;
}

.icon-phone {
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.link-info {
  flex: 1;
  min-width: 0;
}

.link-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.link-desc {
  font-size: 0.86rem;
  color: #cbd5e1;
  line-height: 1.42;
  white-space: normal;
  word-break: normal;
}

.link-arrow {
  color: var(--text-dim);
  transition: transform 0.25s ease, color 0.25s ease;
  flex-shrink: 0;
}

.link-card:hover .link-arrow {
  color: var(--brand-cyan);
  transform: translateX(4px);
}

.link-card.featured-whatsapp:hover .link-arrow {
  color: #25d366;
}

/* Botón de Copiar y Compartir */
.quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  width: 100%;
  margin-top: 1.75rem;
}

.btn-action-pill {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.25s ease;
  text-decoration: none;
}

.btn-action-pill:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  border-color: var(--border-glow);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(4, 7, 17, 0.95);
  border: 1px solid var(--brand-cyan);
  color: #fff;
  font-size: 0.88rem;
  padding: 0.75rem 1.4rem;
  border-radius: 9999px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 210, 255, 0.3);
  backdrop-filter: blur(12px);
  pointer-events: none;
  opacity: 0;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

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

/* Footer */
footer {
  position: relative;
  z-index: 10;
  text-align: center;
  margin-top: 2.5rem;
  font-size: 0.82rem;
  color: var(--text-dim);
}

footer a {
  color: var(--brand-cyan);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}
