/* =============================================
   ALPHABOT — GLOBAL CSS
   Shared styles, theming, components
   ============================================= */

/* ---- IMPORTS & FONTS ---- */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap");

/* ---- THEME VARIABLES ---- */
:root,
[data-theme="dark"] {
  --bg-base: #080c10;
  --bg-surface: #0d1117;
  --bg-card: #111820;
  --bg-elevated: #161e28;
  --border: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(0, 255, 136, 0.3);
  --text-primary: #e8edf2;
  --text-secondary: #8892a0;
  --text-muted: #4a5568;
  --accent: #00ff88;
  --accent-dim: rgba(0, 255, 136, 0.12);
  --accent-glow: rgba(0, 255, 136, 0.25);
  --red: #ff4466;
  --yellow: #ffcc00;
  --blue: #4499ff;
  --nav-bg: rgba(8, 12, 16, 0.92);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(0, 255, 136, 0.15);
}

[data-theme="light"] {
  --bg-base: #f0f4f8;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-elevated: #f8fafc;
  --border: rgba(0, 0, 0, 0.08);
  --border-accent: rgba(0, 180, 90, 0.4);
  --text-primary: #0d1117;
  --text-secondary: #4a5568;
  --text-muted: #8892a0;
  --accent: #00aa55;
  --accent-dim: rgba(0, 170, 85, 0.1);
  --accent-glow: rgba(0, 170, 85, 0.2);
  --red: #e02244;
  --yellow: #cc9900;
  --blue: #2266cc;
  --nav-bg: rgba(255, 255, 255, 0.95);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 30px rgba(0, 170, 85, 0.1);
}

/* ---- RESET & BASE ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  transition: background 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

.text-accent {
  color: var(--accent) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

/* ---- TYPOGRAPHY ---- */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
}

/* ---- NAVBAR ---- */
.ab-navbar {
  background: var(--nav-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  transition: all 0.3s ease;
  z-index: 1000;
}

.ab-navbar.scrolled {
  padding: 10px 0;
  border-bottom-color: var(--border-accent);
}

.ab-logo {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text-primary) !important;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.5px;
}

.logo-icon {
  color: var(--accent);
  font-size: 1.5rem;
  line-height: 1;
}

.ab-navbar .nav-link {
  color: var(--text-secondary) !important;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
  padding: 6px 12px !important;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.ab-navbar .nav-link:hover,
.ab-navbar .nav-link.active {
  color: var(--text-primary) !important;
  background: var(--accent-dim);
}

.ab-toggler {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 6px 10px;
}

.ab-toggler i {
  font-size: 1.2rem;
}

/* ---- BUTTONS ---- */
.btn {
  border-radius: 10px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  transition: all 0.2s ease;
}

.ab-btn-primary {
  background: var(--accent);
  color: #020804 !important;
  border: none;
  box-shadow: 0 0 20px var(--accent-glow);
}

.ab-btn-primary:hover {
  background: var(--accent);
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 24px var(--accent-glow);
}

.ab-btn-outline {
  background: transparent;
  border: 1.5px solid var(--border-accent);
  color: var(--accent) !important;
}

.ab-btn-outline:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
}

.ab-btn-ghost {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-primary) !important;
}

.ab-btn-ghost:hover {
  background: var(--bg-card);
  border-color: var(--border-accent);
}

/* ---- SECTION COMMONS ---- */
.section-pad {
  padding: 90px 0;
}

.section-tag {
  display: inline-block;
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  background: var(--accent-dim);
  border: 1px solid var(--border-accent);
  border-radius: 50px;
  padding: 4px 14px;
  margin-bottom: 16px;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  margin-bottom: 12px;
}

.section-sub {
  color: var(--text-secondary);
  font-size: 1.05rem;
  font-weight: 400;
}

/* ---- GRID BACKGROUND ---- */
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, black 40%, transparent 100%);
  pointer-events: none;
}

/* ---- PULSE DOT ---- */
.pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 6px;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 var(--accent-glow);
  }

  50% {
    box-shadow: 0 0 0 6px transparent;
  }
}

/* ---- LIVE INDICATOR ---- */
.live-indicator {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ---- TRUST SECTION ---- */
.trust-section {
  padding: 32px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.trust-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: 'Space Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.trust-logo {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color 0.2s;
}

.trust-logo:hover {
  color: var(--accent);
}

/* ---- CTA BANNER ---- */
.cta-banner {
  padding: 90px 0;
  background: linear-gradient(135deg, var(--bg-surface) 0%, var(--bg-elevated) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 50%, var(--accent-dim) 0%, transparent 70%);
  pointer-events: none;
}

.cta-banner h2 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
}

.cta-banner p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  margin-top: 8px;
}

/* ---- FOOTER ---- */
.ab-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 60px 0 30px;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.footer-head {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 14px;
  font-family: 'Space Mono', monospace;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-risk {
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem;
}

/* ---- SHARED TABLE ---- */
.ab-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: 16px;
  overflow: hidden;
  font-size: 0.9rem;
}

.ab-table thead tr {
  background: var(--bg-elevated);
}

.ab-table th {
  padding: 14px 20px;
  color: var(--text-muted);
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border);
  font-weight: 400;
}

.ab-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
}

.ab-table tbody tr:last-child td {
  border-bottom: none;
}

.ab-table tbody tr:hover {
  background: var(--bg-elevated);
}

.ab-table td strong {
  color: var(--text-primary);
}

/* ---- BADGE TYPES ---- */
.badge-type {
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
}

.badge-type.arbitrage {
  background: rgba(68, 153, 255, 0.15);
  color: #4499ff;
  border: 1px solid rgba(68, 153, 255, 0.3);
}

.badge-type.scalp {
  background: rgba(255, 196, 0, 0.15);
  color: #ffcc00;
  border: 1px solid rgba(255, 196, 0, 0.3);
}

.badge-type.momentum {
  background: rgba(0, 255, 136, 0.1);
  color: var(--accent);
  border: 1px solid var(--border-accent);
}

.badge-type.mean {
  background: rgba(255, 68, 102, 0.12);
  color: #ff4466;
  border: 1px solid rgba(255, 68, 102, 0.3);
}

.badge-type.grid {
  background: rgba(153, 68, 255, 0.12);
  color: #9944ff;
  border: 1px solid rgba(153, 68, 255, 0.3);
}

.badge-type.sentiment {
  background: rgba(255, 136, 0, 0.12);
  color: #ff8800;
  border: 1px solid rgba(255, 136, 0, 0.3);
}

/* ---- RISK DOTS ---- */
.risk-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}

.risk-dot.low {
  background: var(--accent);
}

.risk-dot.med {
  background: var(--yellow);
}

.risk-dot.high {
  background: var(--red);
}

/* ---- PAGE HERO (sub-pages) ---- */
.page-hero {
  padding: 140px 0 80px;
  position: relative;
  overflow: hidden;
  background: var(--bg-base);
  text-align: center;
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin: 16px 0;
}

.page-hero-sub {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ---- ANIMATIONS ---- */
[data-animate] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate="fade-left"] {
  transform: translateX(40px);
}

[data-animate].in-view {
  opacity: 1;
  transform: none;
}

/* ---- GOOGLE TRANSLATE ---- */
.footer-translate-row {
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.footer-translate-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: 'Space Mono', monospace;
  white-space: nowrap;
}

#google_translate_element {
  display: inline-flex;
  align-items: center;
}

/* Override Google Translate default styles */
.goog-te-gadget {
  font-family: 'Space Mono', monospace !important;
  font-size: 0.78rem !important;
  color: var(--text-secondary) !important;
}

.goog-te-gadget .goog-te-gadget-simple {
  background: var(--bg-elevated) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  padding: 5px 12px !important;
  cursor: pointer;
  transition: all 0.2s;
}

.goog-te-gadget .goog-te-gadget-simple:hover {
  border-color: var(--border-accent) !important;
  background: var(--accent-dim) !important;
}

.goog-te-gadget .goog-te-gadget-simple span {
  color: var(--text-secondary) !important;
  font-family: 'Space Mono', monospace !important;
  font-size: 0.75rem !important;
}

.goog-te-gadget-icon {
  display: none !important;
}

.goog-te-banner-frame {
  display: none !important;
}

body {
  top: 0 !important;
}

/* ---- SCROLL CUSTOM ---- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
  background: var(--border-accent);
  border-radius: 10px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 991px) {
  .section-pad {
    padding: 60px 0;
  }

  .ab-navbar .navbar-collapse {
    background: var(--nav-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    margin-top: 12px;
  }
}

@media (max-width: 576px) {
  .section-pad {
    padding: 48px 0;
  }
}

/* Default = LIGHT THEME */
.ab-logo img.dark {
  display: none;
}

.ab-logo img.light {
  display: inline;
}

/* DARK THEME ACTIVE */
html[data-theme="dark"] .ab-logo img.light {
  display: none;
}

html[data-theme="dark"] .ab-logo img.dark {
  display: inline;
}

/* Remove hamburger border */
.navbar-toggler {
  border: none !important;
  box-shadow: none !important;
}

/* Remove the blue outline when clicked/focused */
.navbar-toggler:focus,
.navbar-toggler:active {
  outline: none !important;
  box-shadow: none !important;
}