/* Main Styles for Vibes App */

:root {
  --primary-color: #95a5a6;
  --secondary-color: #ff6b6b;
  --background-color: #121212;
  --surface-color: #1e1e1e;
  --on-surface-color: #e1e1e1;
  --on-background-color: #ffffff;
  --success-color: #4CAF50;
  --warning-color: #FFC107;
  --error-color: #F44336;
}

body {
  font-family: 'Space Grotesk', 'Inter', 'Roboto', sans-serif;
  background-color: var(--background-color);
  color: var(--on-background-color);
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Custom Components */

.vibe-card {
  background-color: var(--surface-color);
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease;
}

.vibe-card:hover {
  transform: translateY(-5px);
}

.credit-badge {
  background-color: var(--primary-color);
  color: white;
  border-radius: 20px;
  padding: 0.25rem 0.75rem;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.avatar-container {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background-color: #4a4a4a;
}

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

.plan-category {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 16px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-right: 0.5rem;
}

.category-food { background-color: #4CAF50; color: white; }
.category-drinks { background-color: #2196F3; color: white; }
.category-music { background-color: #9C27B0; color: white; }
.category-culture { background-color: #FF9800; color: white; }
.category-sports { background-color: #F44336; color: white; }

/* SISTEMA DE LAYOUT ADAPTATIVO CON TARJETAS FIJAS 315x500px - ALINEADO CON SEARCH */
.plans-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px; /* Separación uniforme de 20px */
  justify-content: center; /* Cards centradas para móvil */
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
}

/* DESKTOP: Alineación consistente para todas las filas (completas e incompletas) */
@media (min-width: 769px) {
  .plans-grid {
    justify-content: flex-start; /* Todas las filas alineadas a la izquierda */
    margin-left: 75px; /* Compensar el ancho del filtro lateral + padding */
    max-width: calc(1200px - 75px); /* Ajustar ancho máximo */
  }
}

/* SISTEMA DE LAYOUT PARA TARJETAS DE GRUPOS DE AMIGOS - CENTRADO */
.profiles-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px; /* Separación uniforme de 20px */
  justify-content: center; /* Cards centradas */
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Tarjetas con tamaño fijo 315px de ancho */
.plan-grid-item, .profile-grid-item {
  width: 315px;
  flex: 0 0 315px; /* No crecen ni se encogen */
  height: 500px;
  box-sizing: border-box;
}

/* Legacy Plan List - para compatibilidad */
.plan-list {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.plan-list .plan-item {
  flex: 0 0 auto;
  width: 33.333333%;
  padding: 0 15px;
  margin-bottom: 30px;
}

/* Credit Transaction History */
.transaction-item {
  padding: 12px;
  border-bottom: 1px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.transaction-amount {
  font-weight: bold;
}

.transaction-amount.positive {
  color: var(--success-color);
}

.transaction-amount.negative {
  color: var(--error-color);
}

/* Carousel Indicators - Vibes Style */
.carousel-indicators {
  margin-bottom: 1rem;
}

.carousel-indicators [data-bs-target] {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background-color: rgba(255, 255, 255, 0.3);
  margin: 0 4px;
  transition: all 0.3s ease;
}

.carousel-indicators .active {
  background: linear-gradient(45deg, #bdc3c7, #2c3e50, #95a5a6, #34495e, #ecf0f1);
  background-size: 300% 300%;
  animation: gradient-shift 2s ease infinite;
  transform: scale(1.2);
  box-shadow: 0 0 15px rgba(189, 195, 199, 0.6);
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.carousel-indicators [data-bs-target]:hover {
  background-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.1);
}

/* Estilos específicos para el carrusel del modal VHS */
#vhsCarousel .carousel-indicators {
  margin-bottom: 1rem;
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

#vhsCarousel .carousel-indicators [data-bs-target] {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background-color: rgba(255, 255, 255, 0.3);
  margin: 0 4px;
  transition: all 0.3s ease;
}

#vhsCarousel .carousel-indicators .active {
  background: linear-gradient(45deg, #bdc3c7, #2c3e50, #95a5a6, #34495e, #ecf0f1);
  background-size: 300% 300%;
  animation: gradient-shift 2s ease infinite;
  transform: scale(1.3);
  box-shadow: 0 0 15px rgba(189, 195, 199, 0.8);
}

#vhsCarousel .carousel-indicators [data-bs-target]:hover {
  background-color: rgba(255, 255, 255, 0.7);
  transform: scale(1.15);
}

/* Estilos para el indicador de estado de actividad en friend cards */
.activity-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 5px;
  transition: all 0.3s ease;
}

.activity-indicator.active {
  background-color: #22c55e !important; /* Verde vivo */
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.6) !important;
  animation: pulse-green 2s ease-in-out infinite;
}

.activity-indicator.inactive {
  background-color: #6b7280; /* Gris neutro */
}

.profile-status {
  display: flex;
  align-items: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
}

.profile-status.active {
  color: #22c55e !important;
}

.profile-status.inactive {
  color: #6b7280;
}

/* Animación de pulso para el indicador activo */
@keyframes pulse-green {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

/* ============================================================
   RADAR SOCIAL — Fullscreen modal en móvil + stats lado a lado
   ============================================================ */
@media (max-width: 768px) {
  /* --- Modales marcados con .modal-vibes-full --- */
  .modal.modal-vibes-full {
    --bs-modal-width: 100vw !important; /* pisa el ancho del tema */
  }
  .modal.modal-vibes-full .modal-dialog {
    margin: 0 !important;
    max-width: none !important;
    width: 100vw !important;
    height: 100dvh !important;        /* iOS friendly: usar dvh */
    transform: none !important;        /* quita traducciones Bootstrap */
  }
  .modal.modal-vibes-full .modal-content {
    width: 100vw !important;
    height: 100dvh !important;
    border-radius: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
  }
  .modal.modal-vibes-full .modal-body {
    overflow-y: auto !important;
    max-height: 100dvh !important;
  }
  .modal-backdrop.show {
    width: 100vw !important;
    height: 100dvh !important;
  }
  /* Si el body añade .modal-open y tus cards tenían hover con transform, neutralízalo */
  .modal-open .profile-card { transform: none !important; }

  /* --- Friend Cards: stats uno al lado del otro REDUCIDOS EN MÓVIL --- */
  .profile-card .profile-stats-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  .profile-card .profile-stats-container .stats-row {
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: stretch;
  }
  .profile-card .profile-stats-container .stat-pill {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(3px);
    color: #fff;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
  }
  .profile-card .profile-stats-container .stat-pill i { font-size: 0.85rem; opacity: 0.9; }
  .profile-card .profile-stats-container .stat-number { font-weight: 700; font-size: 0.95rem; }
  .profile-card .profile-stats-container .stat-label { opacity: 0.7; font-size: 0.7rem; }
}
