
/* Pestañas de Bitácora (Registros vs Wrapped) */
.bitacora-tabs-nav {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.bitacora-tab-btn {
  background: transparent;
  border: none;
  color: var(--gris, #94a3b8);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.bitacora-tab-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.bitacora-tab-btn.active {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(236, 72, 153, 0.35);
}

.bitacora-tab-btn#bitacora-tab-btn-feed.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  box-shadow: none;
}

/* ==========================================================================
   PLUX WRAPPED — ESTILOS DEL RESUMEN FINAL Y STORIES DE VIAJE
   ========================================================================== */

#pantalla-resumen {
  z-index: 999999 !important;
}

/* Botón de Wrapped en las acciones del Resumen */
.btn-wrapped-hero {
  background: linear-gradient(135deg, #f59e0b, #ec4899, #8b5cf6) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  border: none !important;
  box-shadow: 0 4px 18px rgba(236, 72, 153, 0.4) !important;
  transition: all 0.25s ease !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
}

.btn-wrapped-hero:hover {
  transform: translateY(-2px) scale(1.03) !important;
  box-shadow: 0 6px 24px rgba(236, 72, 153, 0.6) !important;
}

/* Panel Principal de Wrapped en el Resumen */
#resumen-tab-wrapped {
  animation: fadeInWrapped 0.35s ease;
}

@keyframes fadeInWrapped {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero Banner de Wrapped */
.wrapped-hero-banner {
  background: radial-gradient(circle at 10% 20%, rgba(236, 72, 153, 0.15) 0%, rgba(139, 92, 246, 0.12) 50%, rgba(16, 185, 129, 0.08) 100%), #0b1120;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 28px 24px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
}

.wrapped-hero-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(236, 72, 153, 0.06) 0%, transparent 70%);
  pointer-events: none;
  animation: rotateGlow 18s linear infinite;
}

@keyframes rotateGlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.wrapped-hero-info {
  position: relative;
  z-index: 1;
}

.wrapped-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fbbf24;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.wrapped-hero-title {
  font-size: 1.85rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 6px 0;
  letter-spacing: -0.02em;
}

.wrapped-hero-desc {
  color: #94a3b8;
  font-size: 0.95rem;
  margin: 0;
  max-width: 520px;
  line-height: 1.45;
}

.wrapped-hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.btn-launch-stories {
  background: linear-gradient(135deg, #ec4899, #8b5cf6);
  color: #ffffff;
  border: none;
  padding: 13px 22px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px rgba(236, 72, 153, 0.45);
}

.btn-launch-stories:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 28px rgba(236, 72, 153, 0.6);
}

.btn-download-wrapped-card {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 13px 20px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-download-wrapped-card:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* Grilla de Métricas Wrapped */
.wrapped-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.wrapped-card {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.wrapped-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.18);
}

.wrapped-card-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
  display: inline-block;
}

.wrapped-card-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
  color: #94a3b8;
  margin-bottom: 6px;
}

.wrapped-card-val {
  font-size: 1.7rem;
  font-weight: 900;
  color: #ffffff;
  line-height: 1.2;
  margin-bottom: 6px;
}

.wrapped-card-sub {
  font-size: 0.85rem;
  color: #cbd5e1;
  line-height: 1.4;
}

/* Highlight Cards */
.card-archetype {
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(139, 92, 246, 0.2)), #111827;
  border-color: rgba(236, 72, 153, 0.3);
  grid-column: span 2;
}

@media (max-width: 768px) {
  .card-archetype {
    grid-column: span 1;
  }
}

.card-distance {
  border-left: 4px solid #0ea5e9;
}

.card-gem {
  border-left: 4px solid #f59e0b;
}

.card-logros {
  border-left: 4px solid #10b981;
}

.card-vibe {
  border-left: 4px solid #ec4899;
}

/* ==========================================================================
   MODAL INMERSIVO DE STORIES A PANTALLA COMPLETA (ESTILO SPOTIFY WRAPPED)
   ========================================================================== */
#modal-wrapped-stories {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(3, 7, 18, 0.96);
  z-index: 2000000 !important;
  display: none;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  user-select: none;
  backdrop-filter: blur(20px);
}

.wrapped-stories-viewport {
  width: 100%;
  max-width: 440px;
  height: 100%;
  max-height: 840px;
  background: radial-gradient(circle at 50% 15%, #1e1b4b 0%, #0f172a 55%, #020617 100%);
  border-radius: 28px;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

@media (max-width: 500px) {
  .wrapped-stories-viewport {
    max-width: 100%;
    max-height: 100%;
    border-radius: 0;
  }
}

/* Header con barras de progreso */
.stories-header {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stories-progress-bars {
  display: flex;
  gap: 6px;
  width: 100%;
}

.story-progress-item {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.story-progress-fill {
  width: 0%;
  height: 100%;
  background: #ffffff;
  border-radius: 3px;
  transition: width 0.05s linear;
}

.stories-top-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stories-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.stories-close-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.75);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.6rem;
  font-weight: 300;
  line-height: 1;
  opacity: 0.65;
  transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

.stories-close-btn:hover {
  opacity: 1;
  color: #ef4444;
  background: transparent;
  transform: rotate(90deg) scale(1.2);
}

/* Diapositivas */
.stories-slide-container {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px 28px 40px;
  text-align: center;
  box-sizing: border-box;
}

.story-slide {
  position: absolute;
  inset: 0;
  padding: 70px 24px 30px;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  box-sizing: border-box;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.story-slide.active {
  display: flex;
  opacity: 1;
  transform: scale(1);
}

/* Áreas de toque izquierda y derecha */
.story-tap-area {
  position: absolute;
  top: 70px;
  bottom: 0;
  width: 40%;
  z-index: 40;
  cursor: pointer;
}

.story-tap-left {
  left: 0;
}

.story-tap-right {
  right: 0;
  width: 60%;
}

/* Elementos visuales dentro de las historias */
.story-badge-pill {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 16px;
  border-radius: 20px;
  color: #cbd5e1;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: inline-block;
}

.story-giant-emoji {
  font-size: 4.8rem;
  line-height: 1;
  margin-bottom: 18px;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.4));
  animation: floatEmoji 3s ease-in-out infinite alternate;
}

@keyframes floatEmoji {
  from { transform: translateY(0px) rotate(-2deg); }
  to { transform: translateY(-8px) rotate(2deg); }
}

.story-title {
  font-size: 2.1rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 14px 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.story-metric-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 20px;
  width: 100%;
  max-width: 320px;
  margin-bottom: 18px;
  box-sizing: border-box;
}

.story-metric-val {
  font-size: 2.6rem;
  font-weight: 900;
  color: #38bdf8;
  line-height: 1;
  margin-bottom: 6px;
}

.story-metric-lbl {
  color: #94a3b8;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.story-desc {
  font-size: 1.05rem;
  color: #e2e8f0;
  line-height: 1.5;
  max-width: 340px;
  margin: 0 auto;
}

.story-footer-action {
  margin-top: 24px;
  z-index: 45;
}

.story-btn-primary {
  background: linear-gradient(135deg, #10b981, #0ea5e9);
  color: #030712;
  font-weight: 900;
  border: none;
  padding: 13px 26px;
  border-radius: 14px;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.4);
  transition: transform 0.2s ease;
}

.story-btn-primary:hover {
  transform: scale(1.04);
}
