/* ============================================ */
/* HEADER COMPARTIDO - VirtualGift             */
/* Incluir en todas las páginas con header     */
/* ============================================ */

.header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px;
  padding-top: env(safe-area-inset-top);
  height: calc(62px + env(safe-area-inset-top));
  background: rgba(2,5,21,0.85);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(41,50,68,0.75);
}

/* ============================================ */
/* LOGO                                        */
/* ============================================ */
.logo {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; cursor: default;
}
.logo-image {
  width: 32px; height: 32px; object-fit: contain;
}
.logo-text {
  font-family: 'Inter', sans-serif;
  font-size: 16px; font-weight: 900;
  color: #dcefff; letter-spacing: 2.5px;
}
.logo-studios { color: #8d17fb; }

/* ============================================ */
/* ICONOS DEL HEADER                           */
/* ============================================ */
.header-icons {
  display: flex; align-items: center; gap: 8px;
}

.icon-users,
.icon-coin,
.icon-notification {
  width: 42px; height: 42px; border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(41,50,68,0.75);
  display: flex; align-items: center; justify-content: center;
  position: relative; cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.icon-users:active,
.icon-coin:active,
.icon-notification:active { transform: scale(0.93); }
.icon-users:hover,
.icon-coin:hover,
.icon-notification:hover { border-color: rgba(141,23,251,0.4); background: rgba(141,23,251,0.08); }

/* Página activa */
.icon-active {
  border-color: rgba(141,23,251,0.55) !important;
  background: rgba(141,23,251,0.14) !important;
  box-shadow: 0 0 0 1px rgba(141,23,251,0.25);
}

.icon-users svg,
.icon-notification svg {
  width: 22px; height: 22px; fill: rgba(182,198,217,0.9);
}
.icon-coin svg { width: 28px; height: 28px; }

/* Icono notificaciones — igual que usuario */
.icon-notification svg { fill: rgba(182,198,217,0.9); }

/* Badge de notificaciones */
.notification-badge {
  position: absolute; top: -4px; right: -4px;
  background: #ef4444; color: white;
  font-family: 'Inter', sans-serif;
  font-size: 10px; font-weight: 800;
  min-width: 18px; height: 18px;
  border-radius: 999px; padding: 0 4px;
  display: none; align-items: center; justify-content: center;
  border: 2px solid #020515;
  pointer-events: none;
}

/* ============================================ */
/* NAVEGACIÓN DESKTOP                          */
/* ============================================ */
.header-nav {
  display: none;
}

/* ============================================ */
/* ESPACIADO DEL BODY PARA COMPENSAR HEADER    */
/* Agrega esta clase al contenedor principal   */
/* de cada página: class="page-content"        */
/* ============================================ */
.page-content {
  padding-top: calc(62px + env(safe-area-inset-top) + 24px);
  padding-bottom: calc(30px + env(safe-area-inset-bottom));
  padding-left:  calc(16px + env(safe-area-inset-left));
  padding-right: calc(16px + env(safe-area-inset-right));
}

/* ============================================ */
/* DESKTOP OVERRIDES (769px+)                  */
/* ============================================ */
@media (min-width: 769px) {
  .header {
    height: 72px;
    padding: 0 48px;
    background: rgba(2,5,21,0.92);
  }

  .logo-image { width: 36px; height: 36px; }
  .logo-text  { font-size: 17px; letter-spacing: 3px; }

  /* NAV LINKS */
  .header-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    margin-left: 32px;
  }

  .nav-link {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 10px;
    color: rgba(255,255,255,0.55);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.2px;
    transition: color 0.18s, background 0.18s;
    white-space: nowrap;
    border: 1px solid transparent;
  }
  .nav-link svg {
    width: 16px; height: 16px;
    fill: currentColor;
    flex-shrink: 0;
  }
  .nav-link:hover {
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.06);
  }
  .nav-link--active {
    color: #c084fc;
    background: rgba(141,23,251,0.12);
    border-color: rgba(141,23,251,0.22);
  }
  .nav-link--active:hover {
    color: #c084fc;
    background: rgba(141,23,251,0.18);
  }

  /* HEADER ICONS */
  .header-icons { gap: 10px; }
  .icon-users,
  .icon-coin,
  .icon-notification {
    width: 44px; height: 44px; border-radius: 13px;
  }
  .icon-users svg,
  .icon-notification svg { width: 22px; height: 22px; }
  .icon-coin svg          { width: 30px; height: 30px; }
}
