 /* <!-- ================================================================
       ESTILOS
  ================================================================ --> */

    /* Texto dorado animado */
    .gold-glow-text {
      position: relative;
      background: linear-gradient(90deg, #F5C451, #F0A714, #F5C451);
      background-size: 200%;
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      animation: goldShine 3.5s linear infinite;
    }
    @keyframes goldShine {
      0% { background-position: 200% 0; }
      100% { background-position: -200% 0; }
    }

    :root { --font-sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, "Noto Sans"; }
    html { font-family: var(--font-sans); }
    .card { background:#12121A; border:1px solid rgba(255,255,255,.08); border-radius:16px; }
    .pill { font-size:.7rem; padding:.2rem .55rem; border-radius:.5rem; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12); }
    .stat { background: rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.08); padding:.35rem .5rem; border-radius:.5rem; font-size:.75rem; }
    .stat b { display:block; font-size:.95rem; }
    .cta { display:block; text-align:center; padding:.6rem .9rem; border-radius:.75rem; font-weight:700 }
    .chip { font-size:.68rem; padding:.2rem .5rem; border-radius:.5rem; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.1) }
    .chip[aria-disabled="true"] { opacity:.45; cursor:not-allowed; }
    .stake-10 { box-shadow: 0 0 24px rgba(117,230,255,.35); border-color: rgba(117,230,255,.45); }
    .stake-9  { box-shadow: 0 0 24px rgba(108,79,249,.35);  border-color: rgba(108,79,249,.45); }
    .stake-8  { box-shadow: 0 0 24px rgba(245,196,81,.28);  border-color: rgba(245,196,81,.40); }
    .stake-7  { box-shadow: 0 0 24px rgba(199,206,214,.20); border-color: rgba(199,206,214,.35); }
    .badge-10 { background:linear-gradient(135deg,#75E6FF,#42C7E8); color:#0B0B10; }
    .badge-9  { background:linear-gradient(135deg,#8E7CFF,#6C4FF9); color:#0B0B10; }
    .badge-8  { background:linear-gradient(135deg,#F5C451,#F0A714); color:#0B0B10; }
    .badge-7  { background:linear-gradient(135deg,#D6DEE6,#B7C0CA); color:#0B0B10; }

    .flip-card {
      border-radius: 16px;
      overflow: hidden;
      perspective: 1000px;
      transform-style: preserve-3d;
    }
    .flip-inner {
      border-radius: inherit;
      position: relative;
      min-height: 360px;
      transform-style: preserve-3d;
      transition: transform .7s ease;
      will-change: transform;
    }
    .flip-front, .flip-back {
      border-radius: inherit;
      backface-visibility: hidden;
      -webkit-backface-visibility: hidden;
      position: absolute;
      inset: 0;
    }
    #modalCompra .shadow-glow {
      box-shadow: 0 0 16px 0 #8E7CFF99, 0 0 32px 0 #F5C45177;
    }
    @media (max-width: 520px) {
      #modalCompra .absolute.right-2\.5.top-2 {
        width: 44px; height: 44px; font-size: 2.2rem;
        top: 7px; right: 8px;
        background: rgba(0,0,0,0.63);
        color: #FFD700;
        border: 1.5px solid #FFD700;
      }
    }
    body { background-color:#0B0B10; }

    /* Animaciones notificaciones */
    @keyframes notif-shake {
      0%, 100% { transform: rotate(0);}
      10% { transform: rotate(-16deg);}
      20% { transform: rotate(14deg);}
      30% { transform: rotate(-12deg);}
      40% { transform: rotate(8deg);}
      50% { transform: rotate(-7deg);}
      60% { transform: rotate(6deg);}
      70% { transform: rotate(-4deg);}
      80% { transform: rotate(2deg);}
      90% { transform: rotate(-2deg);}
    }
    .notif-shake { animation: notif-shake 1s cubic-bezier(.36,.07,.19,.97) infinite; }
    @keyframes fadeInUp {
      from { opacity:0; transform: translateY(24px);}
      to   { opacity:1; transform: translateY(0);}
    }
    .animate-fadeInUp { animation: fadeInUp 0.4s;}

    html { height: 100%; }
    body { background-color: #0B0B10; min-height: 100vh; display: flex; flex-direction: column; }
    main { flex: 1; }

    /* Footer */
    .footer-betflip {
      background: #0B0B10;
      color: rgba(255,255,255,0.75);
      text-align: center;
      border-top: 1px solid rgba(255,255,255,0.08);
      padding-top: 2rem;
      padding-bottom: 2rem;
      font-family: "Inter", system-ui, -apple-system, sans-serif;
      position: relative;
    }
    .footer-bar {
      height: 3px;
      background: linear-gradient(90deg, #8E7CFF, #6C4FF9, #F5C451, #8E7CFF);
      background-size: 300% 100%;
      animation: gradientMove 6s ease infinite;
      border-radius: 2px;
    }
    @keyframes gradientMove {
      0% { background-position: 0% 50%; }
      50% { background-position: 100% 50%; }
      100% { background-position: 0% 50%; }
    }
    .footer-container { max-width: 800px; margin: 0 auto; padding: 1.5rem 1rem 0; }
    .footer-links {
      display: flex; justify-content: center; flex-wrap: wrap;
      gap: 1.2rem; font-size: 0.9rem; margin-bottom: 1.5rem;
    }
    .footer-links a { color: rgba(255,255,255,0.65); transition: all 0.3s ease; }
    .footer-links a:hover { color: #F5C451; text-shadow: 0 0 6px rgba(245,196,81,0.3); }
    .footer-socials { display: flex; justify-content: center; gap: 1.5rem; font-size: 1.2rem; margin-bottom: 1rem; }
    .footer-socials a { color: #8E7CFF; transition: all 0.3s ease; }
    .footer-socials a:hover { color: #F5C451; transform: translateY(-3px); text-shadow: 0 0 8px rgba(245,196,81,0.4); }


    /* ── Buscador flips.html ──────────────────────────────────────────── */
#flip-search-dropdown li {
  padding: .55rem 1rem;
  font-size: .82rem;
  cursor: pointer;
  color: rgba(255,255,255,.82);
  border-bottom: 1px solid rgba(255,255,255,.05);
  display: flex;
  align-items: center;
  gap: .5rem;
  transition: background .15s;
}
#flip-search-dropdown li:last-child { border-bottom: none; }
#flip-search-dropdown li:hover,
#flip-search-dropdown li[aria-selected="true"] {
  background: rgba(108,79,249,.22);
  color: #fff;
}
#flip-search-dropdown li mark {
  background: none;
  color: #F5C451;
  font-weight: 700;
}
#flip-search-dropdown li .tag {
  margin-left: auto;
  font-size: .68rem;
  padding: .1rem .45rem;
  border-radius: .4rem;
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.45);
  white-space: nowrap;
}
/* ── Chips sort activos ──────────────────────────────────────────── */
.chip[data-sort].sort-active {
  background: rgba(108,79,249,.22);
  border-color: rgba(108,79,249,.55);
  color: #fff;
}


/* ── 
<!-- Estilos del widget -->s──────────────────────────────────────────── */


/* ── Variables (hereda el sistema de diseño BetFlipAI) ── */
:root {
  --bf-chat-bg: #0d0d14;
  --bf-chat-surface: #13131f;
  --bf-chat-border: rgba(139, 92, 246, 0.18);
  --bf-chat-purple: #8b5cf6;
  --bf-chat-purple-glow: rgba(139, 92, 246, 0.35);
  --bf-chat-gold: #f59e0b;
  --bf-chat-text: #e2e8f0;
  --bf-chat-text-muted: #64748b;
  --bf-chat-bubble-user: linear-gradient(135deg, #7c3aed, #6d28d9);
  --bf-chat-bubble-bot: #1a1a2e;
  --bf-chat-radius: 18px;
  --bf-chat-panel-w: 360px;
  --bf-chat-panel-h: 520px;
}
 
/* ── FAB ── */
.bf-chat-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;      /* ← derecha */
  left: unset;      /* ← quitar izquierda */
  width: 32px;      /* ← más pequeño (era 58px) */
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed 0%, #5b21b6 100%);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #dfef03;
  box-shadow: 0 4px 24px rgba(139, 92, 246, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}
.bf-chat-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 32px rgba(139, 92, 246, 0.7);
}
.bf-chat-fab:active { transform: scale(0.96); }
 
/* Pulso animado */
.bf-chat-fab__pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(139, 92, 246, 0.4);
  animation: bf-pulse 2.5s ease-out infinite;
  pointer-events: none;
}
@keyframes bf-pulse {
  0%   { transform: scale(1);   opacity: 0.8; }
  70%  { transform: scale(1.4); opacity: 0; }
  100% { transform: scale(1.4); opacity: 0; }
}
 
/* ── Panel ── */
.bf-chat-panel {
  position: fixed;
  bottom: 88px;
  right: 28px;      /* ← derecha */
  left: unset;
  z-index: 9999;
  width: var(--bf-chat-panel-w);
  height: var(--bf-chat-panel-h);
  background: var(--bf-chat-bg);
  border: 1px solid var(--bf-chat-border);
  border-radius: var(--bf-chat-radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 0 1px rgba(139,92,246,0.1);
  transform-origin: bottom left;
  animation: bf-panel-in 0.28s cubic-bezier(0.34,1.56,0.64,1);
}
.bf-chat-panel[hidden] { display: none !important; }
 
@keyframes bf-panel-in {
  from { transform: scale(0.85) translateY(20px); opacity: 0; }
  to   { transform: scale(1)    translateY(0);    opacity: 1; }
}
 
/* Header */
.bf-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(90deg, #1a0a3e 0%, #130d2e 100%);
  border-bottom: 1px solid var(--bf-chat-border);
  flex-shrink: 0;
}
.bf-chat-header__avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(139,92,246,0.5);
}
.bf-chat-header__info { flex: 1; }
.bf-chat-header__name {
  display: block;
  font-size: 14px; font-weight: 700;
  color: var(--bf-chat-text);
  letter-spacing: 0.3px;
}
.bf-chat-header__status {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; color: var(--bf-chat-text-muted);
}
.bf-chat-header__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34,197,94,0.7);
  animation: bf-blink 2s ease-in-out infinite;
}
@keyframes bf-blink {
  0%,100% { opacity: 1; } 50% { opacity: 0.4; }
}
.bf-chat-header__close {
  background: none; border: none; cursor: pointer;
  color: var(--bf-chat-text-muted); padding: 4px;
  border-radius: 6px; transition: color 0.15s, background 0.15s;
  display: flex;
}
.bf-chat-header__close:hover { color: #fff; background: rgba(255,255,255,0.08); }
 
/* Área de mensajes */
.bf-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}
.bf-chat-messages::-webkit-scrollbar { width: 4px; }
.bf-chat-messages::-webkit-scrollbar-track { background: transparent; }
.bf-chat-messages::-webkit-scrollbar-thumb { background: rgba(139,92,246,0.25); border-radius: 4px; }
 
/* Burbujas */
.bf-msg {
  display: flex;
  flex-direction: column;
  max-width: 82%;
  animation: bf-msg-in 0.22s ease;
}
@keyframes bf-msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.bf-msg--user { align-self: flex-end; align-items: flex-end; }
.bf-msg--bot  { align-self: flex-start; align-items: flex-start; }
 
.bf-msg__bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--bf-chat-text);
  word-break: break-word;
}
.bf-msg--user .bf-msg__bubble {
  background: var(--bf-chat-bubble-user);
  border-bottom-right-radius: 4px;
}
.bf-msg--bot .bf-msg__bubble {
  background: var(--bf-chat-bubble-bot);
  border: 1px solid var(--bf-chat-border);
  border-bottom-left-radius: 4px;
}
.bf-msg__time {
  font-size: 10px; color: var(--bf-chat-text-muted);
  margin-top: 3px; padding: 0 4px;
}
 
/* Typing indicator */
.bf-typing .bf-msg__bubble {
  display: flex; align-items: center; gap: 5px;
  padding: 12px 16px;
}
.bf-typing-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--bf-chat-purple);
  animation: bf-typing 1.2s ease-in-out infinite;
}
.bf-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.bf-typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes bf-typing {
  0%,80%,100% { transform: scale(0.8); opacity: 0.4; }
  40%          { transform: scale(1.2); opacity: 1; }
}
 
/* Input area */
.bf-chat-input-area {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--bf-chat-border);
  background: var(--bf-chat-surface);
  flex-shrink: 0;
}
.bf-chat-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--bf-chat-border);
  border-radius: 12px;
  padding: 10px 14px;
  color: var(--bf-chat-text);
  font-size: 13.5px;
  line-height: 1.5;
  resize: none;
  outline: none;
  max-height: 120px;
  overflow-y: auto;
  transition: border-color 0.2s;
  font-family: inherit;
}
.bf-chat-input::placeholder { color: var(--bf-chat-text-muted); }
.bf-chat-input:focus { border-color: var(--bf-chat-purple); }
 
.bf-chat-send {
  width: 40px; height: 40px; flex-shrink: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 2px 12px rgba(139,92,246,0.4);
}
.bf-chat-send:disabled {
  opacity: 0.35; cursor: not-allowed;
  box-shadow: none;
}
.bf-chat-send:not(:disabled):hover {
  transform: scale(1.06);
  box-shadow: 0 4px 16px rgba(139,92,246,0.6);
}
 
/* Footer */
.bf-chat-footer {
  text-align: center;
  font-size: 10px;
  color: var(--bf-chat-text-muted);
  padding: 6px 14px 10px;
  background: var(--bf-chat-surface);
  flex-shrink: 0;
}
.bf-chat-footer strong { color: var(--bf-chat-purple); }
 
/* ── Responsive ── */
@media (max-width: 420px) {
  .bf-chat-panel {
    left: 12px;
    right: 12px;
    bottom: 80px;
  }
  .bf-chat-fab {
    right: 16px;    /* ← derecha */
    left: unset;
    bottom: 20px;
  }
}

.bf-chat-panel {
  /* reemplaza height fija por max-height */
  height: auto;
  max-height: min(520px, calc(100dvh - 120px));  /* dvh respeta el teclado en iOS */
}

@media (max-width: 420px) {
  .bf-chat-panel {
    left: 8px;
    right: 8px;
    bottom: 80px;
    max-height: calc(100dvh - 100px);
  }

  /* Evita que iOS haga zoom al tocar el textarea */
  .bf-chat-input {
    font-size: 16px !important;
  }
}