/* ════════════════════════════════════════════════════════════════
   MINES ANALYTICS - Stylesheet
   ════════════════════════════════════════════════════════════════ */

:root {
  --bg: #0b0f1a;
  --card: #12182b;
  --accent: #6cf2c2;
  --accent2: #5aa2ff;
  --danger: #fb7185;
  --text: #e8ebf1;
  --muted: #9aa4bf;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: Inter, system-ui, sans-serif; }
html, body { width: 100%; overflow-x: hidden; }
body { background: var(--bg); color: var(--text); }
a { color: inherit; text-decoration: none; }

/* ── Login card ── */
#loginCard {
  display: block !important;
  position: fixed;
  inset: 0;
  z-index: 9999 !important;
  opacity: 1;
  pointer-events: auto;
  transition: opacity 0.3s ease;
}
#loginCard:empty { display: none !important; }
#loginCard.hidden { opacity: 0 !important; pointer-events: none !important; z-index: -1 !important; }

/* ── Mines container ── */
.mines-container {
  display: none;
  opacity: 0;
  max-width: 420px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 16px 100px;
}
.mines-container h1 {
  text-align: center;
  font-size: 24px;
  margin-bottom: 6px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.mines-container.active {
  display: block;
  opacity: 1;
  animation: fadeIn 0.4s ease-out;
}

/* ── Subtitle ── */
.bot-subtitle {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 24px;
}
.subtitle-live {
  color: var(--danger);
  font-size: 12px;
  animation: blink 1.4s infinite;
}

/* ── Card ── */
.bot-card {
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 14px;
  animation: slideInUp 0.5s ease backwards;
}
.bot-card:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(0,0,0,0.35); transition: all 0.3s ease; }
.bot-card.locked { opacity: 0.45; filter: blur(0.5px); pointer-events: none; }

/* ── Labels ── */
.bot-label {
  font-size: 12px;
  color: var(--muted);
  display: block;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 600;
}
.label-meta {
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
}

/* ── VIP badge ── */
.bot-vip-badge {
  display: none;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: var(--bg);
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 12px;
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: 0.3px;
}
.bot-vip-badge.show { display: block; }

/* ── Button ── */
.bot-button {
  width: 100%;
  padding: 13px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: var(--bg);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
  letter-spacing: 0.3px;
}
.bot-button:disabled { opacity: 0.45; cursor: not-allowed; }
.bot-button:hover:not(:disabled) { box-shadow: 0 0 20px rgba(108,242,194,0.35); transform: translateY(-1px); }
.bot-button:active:not(:disabled) { transform: scale(0.98); }

/* ── Progress bar ── */
.bot-progress {
  height: 3px;
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 12px;
}
.bot-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
}

/* ── Session info ── */
.bot-session {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
}
.sessionProgress {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}
.sessionProgress div {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transition: background 0.3s;
}
.sessionProgress div.active { background: var(--accent); box-shadow: 0 0 6px var(--accent); }

/* ── Graph ── */
.bot-graph {
  height: 80px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  margin-top: 8px;
}
.bot-graph div {
  flex: 1;
  border-radius: 3px 3px 0 0;
  height: 0;
  --bar-height: 50px;
  animation: growBar 0.6s ease forwards;
  background: linear-gradient(to top, var(--accent), transparent);
}
.bot-graph div.full { animation: growBar 0.6s ease forwards, blinkFull 0.6s infinite alternate; }

/* ── Grid ── */
.bot-grid {
  display: grid;
  gap: 8px;
  justify-content: center;
  margin: 12px auto;
  width: fit-content;
  grid-template-columns: repeat(5, 48px);
}
.bot-grid[style*="repeat(3"] { grid-template-columns: repeat(3, 48px); }
.bot-grid[style*="repeat(4"] { grid-template-columns: repeat(4, 48px); }
.bot-grid[style*="repeat(5"] { grid-template-columns: repeat(5, 48px); }
.bot-cell {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.85);
  animation: cellIn 0.35s ease forwards;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}
.bot-cell:hover { transform: scale(1.08); }
.bot-cell.safe { color: var(--accent); background: rgba(108,242,194,0.08); border-color: rgba(108,242,194,0.25); }
.bot-cell.mine { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.75); }

/* ── History ── */
.bot-history-item {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 6px;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.02);
  border-left: 2px solid var(--accent);
  font-family: 'Courier New', monospace;
}
.bot-history-item:hover { background: rgba(255,255,255,0.04); color: var(--text); }

/* ── Footer ── */
.bot-footer {
  text-align: center;
  font-size: 11px;
  color: rgba(154,164,191,0.5);
  margin-top: 12px;
  line-height: 1.6;
}

/* ── Custom select ── */
.custom-select { position: relative; margin-bottom: 14px; }
.select-trigger {
  padding: 11px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: border-color 0.2s;
}
.select-trigger:hover { border-color: rgba(108,242,194,0.3); }
.select-trigger span { color: var(--text); font-size: 14px; }
.select-trigger::after { content: "▾"; color: var(--muted); font-size: 12px; }
.select-options {
  position: absolute;
  top: 110%;
  left: 0; right: 0;
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  overflow: hidden;
  display: none;
  z-index: 10;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.select-options.show { display: block; animation: fadeIn 0.2s ease; }
.select-options div { padding: 10px 12px; cursor: pointer; font-size: 13px; color: var(--text); transition: background 0.15s; }
.select-options div:hover { background: rgba(255,255,255,0.06); }
.select-options div.locked { opacity: 0.35; cursor: not-allowed; }
.select-options div.active { background: rgba(108,242,194,0.12); color: var(--accent); font-weight: 600; }

/* ── Option tags ── */
.opt-tag {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(108,242,194,0.15);
  color: var(--accent);
  font-weight: 600;
  margin-left: 6px;
  vertical-align: middle;
}
.locked-tag { background: rgba(255,255,255,0.06); color: var(--muted); }

/* ── Fade/slide animations ── */
.fade-slide { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade-slide.show { opacity: 1; transform: translateY(0); }
.fade-delay-1 { transition-delay: 0.1s; }
.fade-delay-2 { transition-delay: 0.2s; }
.fade-slide-down { opacity: 0; transform: translateY(14px); transition: opacity 0.5s ease, transform 0.5s ease; }
.fade-slide-down.show { opacity: 1; transform: translateY(0); }

/* ── Utility ── */
.hidden { display: none !important; }
.active { display: block; }
.thinking { animation: thinking 1s infinite; }

/* ── Animations ── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes growBar { from { height: 0; } to { height: var(--bar-height); } }
@keyframes blinkFull { 0% { background: var(--danger); } 100% { background: #f87171; } }
@keyframes cellIn { to { opacity: 1; transform: scale(1); } }
@keyframes pulseMine { 0% { color: var(--danger); } 100% { color: #f87171; } }
@keyframes thinking { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.6; transform: scale(1.3); } }

/* ── Responsive ── */
@media (max-width: 480px) {
  .bot-card { padding: 16px; }
  .bot-cell { width: 40px; height: 40px; }
  .bot-grid[style*="repeat(3"] { grid-template-columns: repeat(3, 40px); }
  .bot-grid[style*="repeat(4"] { grid-template-columns: repeat(4, 40px); }
  .bot-grid[style*="repeat(5"] { grid-template-columns: repeat(5, 40px); }
  .bot-graph { height: 60px; }
}

/* ── Quota urgency ── */
.quota-urgent {
  border-color: rgba(239,68,68,0.4) !important;
  animation: quotaPulse 1.2s ease-in-out infinite;
}
@keyframes quotaPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
  50% { box-shadow: 0 0 0 6px rgba(239,68,68,0.2); }
}

/* ── Upsell card ── */
.upsell-card {
  text-align: center;
  padding: 24px 20px;
  background: rgba(108,242,194,0.03);
  border: 1px solid rgba(108,242,194,0.12);
  border-radius: 16px;
}
.upsell-icon { font-size: 32px; margin-bottom: 12px; }
.upsell-title { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.upsell-subtitle { font-size: 14px; color: var(--muted); margin-bottom: 16px; line-height: 1.5; }
.upsell-features {
  list-style: none; padding: 0; margin: 0 0 16px;
  background: rgba(108,242,194,0.06);
  border-radius: 10px; padding: 12px 16px; text-align: left;
}
.upsell-features li { padding: 5px 0; font-size: 14px; color: var(--text); }
.upsell-features li::before { content: ''; }
.upsell-social-proof {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 13px; color: var(--muted); margin-bottom: 16px;
}
.upsell-dot {
  width: 7px; height: 7px; border-radius: 50%; background: #22c55e;
  animation: pulse 1.5s ease-in-out infinite;
}
.upsell-cta-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #0b0f1a; border: none; border-radius: 12px;
  padding: 14px; font-size: 15px; font-weight: 700;
  cursor: pointer; margin-bottom: 12px; letter-spacing: 0.3px;
}
.upsell-cta-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.upsell-back-link { font-size: 13px; color: var(--muted); text-decoration: none; display: block; }
.upsell-back-link:hover { color: var(--text); }

/* ── Social proof line ── */
.social-proof-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text);
  background: rgba(34,197,94,0.07);
  border: 1px solid rgba(34,197,94,0.15);
  border-radius: 20px;
  padding: 6px 14px;
  margin: 8px 0;
}
.social-proof-line::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  display: inline-block;
}

/* ── Floating advisor card ── */
.floating-advisor {
  position: fixed; bottom: 20px; right: 16px;
  width: 160px;
  background: var(--card);
  border: 1px solid rgba(108,242,194,0.3);
  border-radius: 14px; padding: 14px 14px 12px;
  z-index: 200; text-align: center; font-size: 13px;
}
.floating-advisor-close {
  position: absolute; top: 8px; right: 10px;
  background: none; border: none; color: var(--muted);
  font-size: 16px; cursor: pointer;
}
.floating-advisor-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 8px;
  display: block;
  border: 2px solid rgba(108,242,194,0.3);
}
.floating-advisor-name { font-weight: 600; color: var(--text); margin-bottom: 4px; }
.floating-advisor-status {
  font-size: 12px; color: #22c55e;
  display: flex; align-items: center; justify-content: center; gap: 5px; margin-bottom: 10px;
}
.live-dot-sm {
  width: 6px; height: 6px; border-radius: 50%; background: #22c55e;
  animation: pulse 1.5s ease-in-out infinite;
}
.floating-advisor-btn {
  display: block; background: var(--accent); color: #0b0f1a;
  border-radius: 8px; padding: 7px 12px; font-weight: 600;
  font-size: 13px; text-decoration: none;
}
.advisor-slide-in { animation: slideInUp 0.4s ease; }
