/* dopamine.css — Guerra de Facciones + Modal de Check-in + modales MTX
   Solo anima transform/opacity (compositor, 60 FPS). Sin overflow horizontal. */

/* ============ GUERRA DE FACCIONES ============ */
.faction-war {
  --fw-pol: #38BDF8;
  --fw-cri: #FF2A4B;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: linear-gradient(180deg, rgba(11, 14, 20, 0.98), rgba(17, 22, 34, 0.98));
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-family: 'Rajdhani', sans-serif;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.6px;
  color: #F8FAFC;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}
.faction-war * { box-sizing: border-box; }
.fw-side { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex-shrink: 0; }
.fw-side strong { font-size: 15px; font-variant-numeric: tabular-nums; }
.fw-side-pol strong { color: var(--fw-pol); }
.fw-side-cri strong { color: var(--fw-cri); }

.fw-meter {
  position: relative;
  flex: 1 1 120px;
  min-width: 80px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
  display: flex;
}
.fw-fill { display: block; height: 100%; transition: width 0.6s cubic-bezier(.2,.8,.2,1); will-change: width; }
.fw-fill-pol { background: linear-gradient(90deg, #0EA5E9, var(--fw-pol)); box-shadow: 0 0 12px rgba(56, 189, 248, 0.5); }
.fw-fill-cri { background: linear-gradient(90deg, var(--fw-cri), #BE123C); box-shadow: 0 0 12px rgba(255, 42, 75, 0.5); }
.faction-war.fw-lead-pol .fw-side-pol { text-shadow: 0 0 10px rgba(56, 189, 248, 0.6); }
.faction-war.fw-lead-cri .fw-side-cri { text-shadow: 0 0 10px rgba(255, 42, 75, 0.6); }

.fw-meta { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; }
.fw-time, .fw-champ, .fw-mine {
  font-size: 11px; font-weight: 700; letter-spacing: 0.4px;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.06); color: #94A3B8; white-space: nowrap;
}
.fw-champ { background: rgba(255, 215, 0, 0.12); color: #FFD700; }
.fw-mine.is-pol { background: rgba(56, 189, 248, 0.14); color: var(--fw-pol); }
.fw-mine.is-cri { background: rgba(255, 42, 75, 0.14); color: var(--fw-cri); }
.fw-pick {
  font: inherit; font-size: 12px; cursor: pointer;
  padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(124, 58, 237, 0.5);
  background: rgba(124, 58, 237, 0.18); color: #E9D5FF;
  transition: transform 0.18s ease, background 0.18s ease;
}
.fw-pick:hover { background: #7C3AED; color: #fff; transform: translateY(-1px); }
.fw-pick:focus-visible, .mtxm-cta:focus-visible, .fp-side:focus-visible, .mtxm-close:focus-visible {
  outline: 2px solid #00F0FF; outline-offset: 2px;
}
.faction-war [hidden] { display: none !important; }

@media (max-width: 680px) {
  .faction-war { flex-wrap: wrap; gap: 6px 10px; padding: 7px 10px; font-size: 12px; }
  .fw-meter { order: 3; flex: 1 1 100%; }
  .fw-side-pol { order: 1; }
  .fw-side-cri { order: 2; margin-left: auto; }
  .fw-meta { order: 4; flex: 1 1 100%; justify-content: space-between; flex-wrap: wrap; }
}

/* ============ MODALES MTX ============ */
.mtxm-overlay {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  background: rgba(5, 7, 12, 0.82);
  animation: mtxmFade 0.18s ease-out both;
}
.mtxm-card {
  position: relative;
  width: 100%; max-width: 440px; max-height: 92vh; overflow-y: auto; overflow-x: hidden;
  padding: 24px 20px 20px;
  border-radius: 20px;
  background: radial-gradient(120% 80% at 50% 0%, rgba(124, 58, 237, 0.22), transparent 60%), #111622;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 40px rgba(124, 58, 237, 0.18);
  color: #F8FAFC;
  font-family: 'Inter', system-ui, sans-serif;
  animation: mtxmPop 0.22s cubic-bezier(.2,.9,.3,1.1) both;
}
.mtxm-close {
  position: absolute; top: 10px; right: 10px; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: transparent; color: #94A3B8; font-size: 18px; cursor: pointer;
}
.mtxm-close:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.mtxm-title { margin: 0 36px 6px 0; font-family: 'Rajdhani', sans-serif; font-weight: 800; font-size: 22px; letter-spacing: 0.4px; }
.mtxm-sub { margin: 0 0 14px; color: #94A3B8; font-size: 13.5px; line-height: 1.5; }
.mtxm-foot { margin: 12px 0 0; color: #64748B; font-size: 12px; text-align: center; }
.mtxm-msg { min-height: 18px; margin: 10px 0 0; font-size: 13px; color: #94A3B8; text-align: center; }
.mtxm-msg.is-ok { color: #00FF88; font-weight: 600; }
.mtxm-msg.is-err { color: #FF6B83; }
.mtxm-input {
  width: 100%; margin: 0 0 12px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(255, 255, 255, 0.04);
  color: #F8FAFC; font-size: 16px; /* 16px evita zoom en iOS */
}
.mtxm-input:focus { outline: none; border-color: #00F0FF; box-shadow: 0 0 0 3px rgba(0, 240, 255, 0.18); }
.mtxm-cta {
  width: 100%; min-height: 48px; margin-top: 14px; border: 0; border-radius: 14px; cursor: pointer;
  font-family: 'Rajdhani', sans-serif; font-weight: 800; font-size: 17px; letter-spacing: 0.8px;
  color: #0B0E14; background: linear-gradient(135deg, #FFD700, #FFB800);
  box-shadow: 0 8px 24px rgba(255, 215, 0, 0.28);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.mtxm-cta:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(255, 215, 0, 0.4); }
.mtxm-cta:active:not(:disabled) { transform: scale(0.98); }
.mtxm-cta:disabled { cursor: default; background: rgba(255, 255, 255, 0.08); color: #94A3B8; box-shadow: none; }
.mtxm-link { display: block; margin-top: 12px; text-align: center; color: #38BDF8; font-size: 13px; text-decoration: none; }
.mtxm-link:hover { text-decoration: underline; }

/* ---- selector de bando ---- */
.fp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fp-side {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 18px 10px; min-height: 44px; border-radius: 16px; cursor: pointer; color: #F8FAFC;
  font-family: 'Rajdhani', sans-serif; border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.fp-side strong { font-size: 18px; letter-spacing: 1px; }
.fp-side small { color: rgba(248, 250, 252, 0.7); font-family: 'Inter', sans-serif; font-size: 12px; }
.fp-ico { font-size: 34px; line-height: 1; }
.fp-policia { background: linear-gradient(160deg, rgba(14, 165, 233, 0.28), rgba(14, 165, 233, 0.06)); border-color: rgba(56, 189, 248, 0.4); }
.fp-criminal { background: linear-gradient(160deg, rgba(255, 42, 75, 0.28), rgba(255, 42, 75, 0.06)); border-color: rgba(255, 42, 75, 0.4); }
.fp-policia:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(56, 189, 248, 0.3); }
.fp-criminal:hover { transform: translateY(-3px); box-shadow: 0 10px 30px rgba(255, 42, 75, 0.3); }

/* ---- calendario check-in ---- */
.ci-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 4px 0 10px; }
.ci-day {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  aspect-ratio: 1 / 1; border-radius: 10px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 15px; line-height: 1;
}
.ci-n { font-size: 10px; color: #64748B; font-weight: 700; }
.ci-day.is-done { background: rgba(16, 185, 129, 0.16); border-color: rgba(16, 185, 129, 0.45); }
.ci-day.is-done .ci-n { color: #34D399; }
.ci-day.is-big { border-color: rgba(124, 58, 237, 0.55); background: rgba(124, 58, 237, 0.14); }
.ci-day.is-supreme { border-color: rgba(255, 215, 0, 0.7); background: rgba(255, 215, 0, 0.12); }
.ci-day.is-today { border-color: #FFD700; box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.35); animation: ciPulse 1.6s ease-in-out infinite; }
.ci-prize { min-height: 20px; margin: 0; text-align: center; font-weight: 600; font-size: 14px; color: #FFD700; }
.ci-card.ci-win { animation: ciWin 0.5s cubic-bezier(.2,.9,.3,1.2); }

/* CTA del ticker cuando hay recompensa pendiente */
.ticker-cta-btn.is-ready { animation: ciPulse 1.6s ease-in-out infinite; }

/* ---- BUCLE 6: BARRA DE PULSO STREAM EN VIVO ---- */
.stream-live-pulse-bar {
  background: linear-gradient(90deg, #05070B 0%, #110B22 50%, #05070B 100%);
  border-bottom: 1px solid rgba(168, 85, 247, 0.35);
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.15);
  padding: 6px 14px;
  position: relative;
  z-index: 99;
}
.slpb-link {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  max-width: 1200px; margin: 0 auto; text-decoration: none; font-size: 13px; font-weight: 600; color: #F8FAFC;
}
.slpb-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #EF4444;
  box-shadow: 0 0 10px #EF4444; animation: ciPulse 1.2s ease-in-out infinite;
}
.slpb-badge {
  background: rgba(239, 68, 68, 0.2); border: 1px solid rgba(239, 68, 68, 0.5);
  color: #FCA5A5; font-size: 11px; padding: 2px 7px; border-radius: 6px; font-weight: 700;
}
.slpb-title { color: #E2E8F0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slpb-cta {
  color: #00F0FF; font-size: 12px; font-weight: 700; text-transform: uppercase;
  background: rgba(0, 240, 255, 0.12); border: 1px solid rgba(0, 240, 255, 0.3);
  padding: 3px 10px; border-radius: 6px; transition: all 0.2s ease;
}
.slpb-link:hover .slpb-cta { background: #00F0FF; color: #080B12; box-shadow: 0 0 12px rgba(0, 240, 255, 0.5); }

/* ---- BUCLE 3: RADAR BADIMO & VOLATILIDAD TERMINAL ---- */
.badimo-radar-terminal {
  background: rgba(11, 14, 20, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 20px 0 28px;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 0 1px 1px rgba(255, 255, 255, 0.05);
}
.br-header {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 12px; margin-bottom: 14px;
}
.br-brand { display: flex; align-items: center; gap: 8px; }
.br-dot-live {
  width: 9px; height: 9px; border-radius: 50%; background: #00FF88;
  box-shadow: 0 0 10px #00FF88; animation: ciPulse 1.4s ease-in-out infinite;
}
.br-tagline { font-size: 13px; font-weight: 800; color: #F8FAFC; letter-spacing: 0.8px; }
.br-subtag { font-size: 11px; color: #64748B; font-weight: 600; text-transform: uppercase; }

/* Ticker de Volatilidad */
.calc-market-radar-strip {
  display: flex; align-items: center; gap: 12px;
  background: rgba(11, 14, 20, 0.7);
  border: 1px solid rgba(0, 240, 255, 0.18);
  border-radius: 10px;
  padding: 8px 14px;
  margin: 12px 0 16px;
  backdrop-filter: blur(8px);
}
.cmr-label { display: flex; align-items: center; gap: 7px; white-space: nowrap; }

.br-vol-track {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 14px;
  scrollbar-width: thin; scrollbar-color: rgba(0, 240, 255, 0.3) transparent;
}
.br-vol-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 5px 12px; border-radius: 8px; font-size: 12px; white-space: nowrap;
}
.br-vol-name { font-weight: 700; color: #F8FAFC; }
.br-vol-val { color: #94A3B8; }
.br-vol-delta { font-weight: 700; }
.chip-up .br-vol-delta { color: #00FF88; }
.chip-down .br-vol-delta { color: #EF4444; }

/* Tarjetas de Leaks */
.br-feed { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.br-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px; padding: 12px 14px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.br-card:hover { transform: translateY(-2px); border-color: rgba(0, 240, 255, 0.3); }
.br-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.br-tag {
  font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 4px;
  background: rgba(254, 231, 92, 0.15); color: #FEE75C; border: 1px solid rgba(254, 231, 92, 0.4);
}
.br-title { font-size: 13px; font-weight: 700; color: #F1F5F9; margin: 0; line-height: 1.3; }
.br-desc { font-size: 12px; color: #94A3B8; margin: 0 0 8px; line-height: 1.4; }
.br-impact {
  background: rgba(0, 240, 255, 0.06); border-left: 2px solid #00F0FF;
  padding: 4px 8px; border-radius: 0 6px 6px 0; font-size: 11px;
}
.br-imp-tag { color: #00F0FF; font-weight: 800; }
.br-imp-text { color: #E2E8F0; }

/* ---- BUCLE 5: CALCULADORA FLEXING & RECOMENDACIÓN TÁCTICA ---- */
.btn-trade-flex-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 10px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 215, 0, 0.08));
  border: 1px solid #FFD700;
  color: #FFD700;
  font-weight: 800;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.25);
  animation: ciPulse 1.8s ease-in-out infinite;
  transition: all 0.2s ease;
}
.btn-trade-flex-cta:hover {
  background: #FFD700; color: #080B12; box-shadow: 0 0 25px rgba(255, 215, 0, 0.6);
}
.verdict-lose-advice {
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  font-size: 12px;
  color: #FCA5A5;
  line-height: 1.4;
}

@keyframes mtxmFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mtxmPop { from { opacity: 0; transform: translateY(14px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes ciPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
@keyframes ciWin { 0% { transform: scale(1); } 40% { transform: scale(1.04); } 100% { transform: scale(1); } }

@media (max-width: 380px) { .ci-grid { grid-template-columns: repeat(5, 1fr); } }

@media (prefers-reduced-motion: reduce) {
  .mtxm-overlay, .mtxm-card, .ci-day.is-today, .ticker-cta-btn.is-ready, .ci-card.ci-win, .slpb-dot, .br-dot-live { animation: none !important; }
  .fw-fill, .fp-side, .mtxm-cta, .fw-pick, .br-card { transition: none !important; }
}
