:root {
  --bg-main: #08080a;
  --bg-panel: #0f1015;
  --border-fine: rgba(255, 255, 255, 0.06);
  --primary-cobalt: #2f5cff;
  --text-white: #ffffff;
  --text-muted: #858994;
  --text-dim: #4c4f58;
  --accent-green: #10b981;
  --accent-gold: #f59e0b;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  background-color: var(--bg-main);
  color: var(--text-white);
  overflow: hidden;
  letter-spacing: -0.02em;
}

.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  position: relative;
}

.panel-left {
  width: 45%;
  height: 100%;
  background: var(--bg-main);
  border-right: 1px solid var(--border-fine);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px;
  overflow-y: auto;
  z-index: 10;
  position: relative;
}

.panel-right {
  width: 55%;
  height: 100%;
  position: relative;
  background: #050507;
  overflow: hidden;
}

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

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: white;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
}

.brand span {
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.cta-header-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-fine);
  color: white;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.cta-header-btn:hover {
  background: white;
  color: black;
}

.main-content-wrapper {
  margin: auto 0;
  padding: 40px 0;
}

.architecture-toggle {
  display: inline-flex;
  background: var(--bg-panel);
  border: 1px solid var(--border-fine);
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 32px;
}

.arch-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 8px 18px;
  border-radius: 7px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.2s ease;
}

.arch-btn.active {
  background: rgba(255, 255, 255, 0.07);
  color: white;
}

.view-segment {
  display: none;
}
.view-segment.active {
  display: block;
}

.hero-title {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.04em;
  margin-bottom: 16px;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.5;
  margin-bottom: 40px;
  max-width: 90%;
}

.tech-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 40px;
}

.tech-item {
  background: var(--bg-panel);
  border: 1px solid var(--border-fine);
  padding: 20px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.tech-item:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.02);
}

.tech-item.glow-green {
  border-color: var(--accent-green) !important;
  background: rgba(16, 185, 129, 0.08) !important;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.25);
}

.tech-item.glow-gold {
  border-color: var(--accent-gold) !important;
  background: rgba(245, 158, 11, 0.08) !important;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.25);
}

.tech-item.glow-blue {
  border-color: var(--primary-cobalt) !important;
  background: rgba(47, 92, 255, 0.08) !important;
  box-shadow: 0 0 20px rgba(47, 92, 255, 0.25);
}

.tech-item h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tech-item p {
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.45;
}

.action-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.badge-market {
  background: var(--bg-panel);
  border: 1px solid var(--border-fine);
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.badge-market:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.2);
}

.badge-market svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.market-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.market-info .sub { font-size: 9px; color: var(--text-muted); text-transform: uppercase; }
.market-info .main { font-size: 13px; font-weight: 600; }

.panel-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-fine);
  padding-top: 24px;
  font-size: 12px;
  color: var(--text-dim);
}

/* --- MAP CONFIGURATION & OVERLAYS --- */
#map {
  width: 100%;
  height: 100%;
  transition: opacity 0.4s ease;
}

.map-vignette {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  box-shadow: inset 40px 0 80px var(--bg-main), inset -40px 0 80px var(--bg-main);
  z-index: 500;
}

/* Indicador provincia hovered inferior derecha */
.province-hover-badge {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: rgba(15, 16, 21, 0.9);
  border: 1px solid var(--border-fine);
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  z-index: 650;
  pointer-events: none;
  backdrop-filter: blur(10px);
  letter-spacing: 0.02em;
}

.province-hover-badge span {
  color: white;
  font-weight: 700;
  margin-left: 4px;
}

.map-hud {
  position: absolute;
  bottom: 50px;
  right: 30px;
  left: 30px;
  max-width: 760px;
  margin-left: auto;
  background: rgba(15, 16, 21, 0.95);
  border: 1px solid var(--border-fine);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 20px;
  border-radius: 18px;
  z-index: 600;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hud-marketing-pitch {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.4;
}

.hud-marketing-pitch.highlight-sala {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-white);
  background: rgba(47, 92, 255, 0.08);
  border: 1px solid rgba(47, 92, 255, 0.2);
  padding: 12px;
  border-radius: 10px;
}

.hud-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0px;
  color: var(--primary-cobalt);
}

.hud-title:not(:empty) {
  margin-bottom: 10px;
}

/* --- VISTA DUAL IPHONE (PREDICCIÓN AFORO) --- */
.dual-iphone-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 24px;
  z-index: 550;
  padding: 40px;
  background: radial-gradient(circle at center, rgba(47, 92, 255, 0.08) 0%, rgba(5, 5, 7, 0.98) 80%);
  animation: fadeIn 0.4s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.full-iphone {
  width: 250px;
  height: 500px;
  background: #000;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-radius: 36px;
  padding: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8), 0 0 30px rgba(47, 92, 255, 0.2);
  display: flex;
  flex-direction: column;
  position: relative;
}

.full-iphone .notch {
  width: 90px;
  height: 18px;
  background: #111;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  margin: 0 auto 10px auto;
}

.full-iphone .screen {
  background: #0d0e14;
  border-radius: 24px;
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-predict-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px;
}

.event-predict-card .title { font-size: 11px; font-weight: 700; color: white; margin-bottom: 4px; }
.event-predict-card .capacity-bar-bg { width: 100%; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden; margin: 6px 0; }
.event-predict-card .capacity-bar-fill { height: 100%; border-radius: 3px; }
.event-predict-card .prediction-badge { font-size: 9px; font-weight: 700; color: var(--primary-cobalt); display: flex; justify-content: space-between; }

.stat-box {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px;
}
.stat-box .lbl { font-size: 9px; color: var(--text-muted); text-transform: uppercase; }
.stat-box .val { font-size: 18px; font-weight: 800; color: white; margin-top: 2px; }
.stat-box .trend { font-size: 9px; font-weight: 700; color: var(--accent-green); }

/* MOCKUP MOVIL Y GRID CLUBBER */
.clubber-province-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  animation: slideUpFade 0.35s ease forwards;
}

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

.clubber-col-header {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.iphone-frame {
  background: #000000;
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
  max-height: 220px;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.iphone-frame.glow-green { border-color: var(--accent-green); box-shadow: 0 0 25px rgba(16, 185, 129, 0.35); }
.iphone-frame.glow-gold { border-color: var(--accent-gold); box-shadow: 0 0 25px rgba(245, 158, 11, 0.35); }

.iphone-notch {
  width: 40%;
  height: 10px;
  background: #111;
  border-bottom-left-radius: 6px;
  border-bottom-right-radius: 6px;
  margin: 0 auto 8px auto;
}

.iphone-screen {
  background: #0d0e12;
  border-radius: 12px;
  padding: 8px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-card-event {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 8px;
}

.app-card-event .title { font-size: 11px; font-weight: 700; color: white; }
.app-card-event .sub { font-size: 9px; color: var(--text-muted); margin-top: 2px; }
.app-card-event .tag { display: inline-block; background: rgba(16, 185, 129, 0.2); color: var(--accent-green); font-size: 8px; font-weight: 700; padding: 2px 6px; border-radius: 4px; margin-top: 4px; }

.podium-list { display: flex; flex-direction: column; gap: 4px; }
.podium-item { display: flex; justify-content: space-between; align-items: center; background: rgba(255, 255, 255, 0.03); padding: 4px 8px; border-radius: 6px; font-size: 10px; }
.podium-rank { font-weight: 800; color: var(--accent-gold); width: 14px; }
.podium-user { flex: 1; color: white; font-weight: 500; }
.podium-pts { color: var(--accent-gold); font-weight: 700; font-size: 9px; }

.reward-mini-card {
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 6px;
  padding: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.reward-mini-card .name { font-size: 9.5px; font-weight: 600; color: white; }
.reward-mini-card .cost { font-size: 8.5px; color: var(--accent-gold); font-weight: 700; }

/* Estado vacío (provincia real sin datos todavía) */
.empty-province-note {
  padding: 22px 10px;
  text-align: center;
  font-size: 10.5px;
  line-height: 1.4;
  color: var(--text-muted);
}

/* ESTILOS FORMULARIO SALA */
.sala-contact-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-fine);
  padding: 14px;
  border-radius: 12px;
  margin-top: 10px;
}

.sala-contact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.sala-phone-num {
  font-size: 16px;
  font-weight: 800;
  color: var(--primary-cobalt);
}

.sala-email-link {
  color: white;
  text-decoration: underline;
  font-weight: 600;
  font-size: 12px;
}

.sala-input-group {
  display: flex;
  gap: 8px;
}

.sala-input {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border-fine);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  flex: 1;
}

.sala-submit-btn {
  background: var(--primary-cobalt);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}

/* PINS MAPA */
.custom-map-popup .leaflet-popup-content-wrapper {
  background: #000000;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 4px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.7);
}
.custom-map-popup .leaflet-popup-tip { background: #000000; }

.map-pin-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 11px;
  box-shadow: 0 0 12px rgba(0,0,0,0.5);
  border: 2px solid white;
}
.map-pin-badge.green { background: var(--accent-green); box-shadow: 0 0 15px var(--accent-green); }
.map-pin-badge.gold { background: var(--accent-gold); box-shadow: 0 0 15px var(--accent-gold); }
.map-pin-badge.blue { background: var(--primary-cobalt); box-shadow: 0 0 15px var(--primary-cobalt); }

@media (max-width: 1024px) {
  body { overflow-y: auto; overflow-x: hidden; }
  .app-container { flex-direction: column; height: auto; }
  .panel-left { width: 100%; height: auto; padding: 30px 20px; border-right: none; border-bottom: 1px solid var(--border-fine); }
  .panel-right { width: 100%; height: 500px; }
  .map-vignette { box-shadow: inset 0 30px 40px var(--bg-main); }
  .map-hud { bottom: 20px; right: 15px; left: 15px; width: auto; }
  .dual-iphone-container { flex-direction: column; height: auto; position: relative; }
}
