/* ═══════════════════════════════════════════════════════════
   BULLBEAR MARKET – UNIVERSAL WORLD-CLASS 3D & RESPONSIVE STYLESHEET
   Supports: Desktop (4K, 1440p, 1080p), Tablets (iPad, Android),
   and Mobile (iPhone, Galaxy, Redmi, 320px-480px)
   ═══════════════════════════════════════════════════════════ */

:root {
  --bbm-gold: #FFD700;
  --bbm-gold-dim: rgba(255, 215, 0, 0.15);
  --bbm-gold-glow: rgba(255, 215, 0, 0.35);
  --bbm-gold2: #FFA500;
  --bbm-green: #00FF88;
  --bbm-green-dim: rgba(0, 255, 136, 0.15);
  --bbm-green-glow: rgba(0, 255, 136, 0.35);
  --bbm-cyan: #00E5FF;
  --bbm-cyan-dim: rgba(0, 229, 255, 0.15);
  --bbm-red: #FF3B3B;
  --bbm-bg: #050811;
  --bbm-bg-surface: #0a0f1d;
  --bbm-card: #0d1424;
  --bbm-card-hover: #121c33;
  --bbm-card-glass: rgba(13, 20, 36, 0.75);
  --bbm-border: rgba(255, 215, 0, 0.18);
  --bbm-border-strong: rgba(255, 215, 0, 0.4);
  --bbm-border-green: rgba(0, 255, 136, 0.3);
  --bbm-border-cyan: rgba(0, 229, 255, 0.3);
  --bbm-text: #F1F5F9;
  --bbm-text-muted: #94A3B8;
  --bbm-text-dim: #64748B;
  --bbm-radius-sm: 8px;
  --bbm-radius-md: 14px;
  --bbm-radius-lg: 22px;
  --bbm-radius-xl: 32px;
}

/* ═══════════════════════════════════════════════════════════
   1. GLOBAL RESET & ZERO-OVERFLOW VIEWPORT CONSTRAINTS
   ═══════════════════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box !important;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

html, body {
  width: 100% !important;
  max-width: 100vw !important;
  overflow-x: clip !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative;
  background-color: var(--bbm-bg);
  color: var(--bbm-text);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
}

/* Fluid Media - Never Blow Out Mobile Viewports */
img, video, iframe, embed, object, canvas, svg {
  max-width: 100% !important;
  height: auto;
}

/* Container Constraint */
.container, .main-wrapper, .section-container, .wrapper, .page-wrapper, .content, 
.guide-wrap, .links-wrap, .cta-wrap, .topics-wrap, main, section {
  width: 100% !important;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box !important;
}

/* Universal Table Responsiveness */
table {
  max-width: 100%;
  border-collapse: collapse;
}
.table-responsive, .table-wrap {
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  margin: 18px 0;
  border-radius: 12px;
}

/* ═══════════════════════════════════════════════════════════
   2. TOP ANNOUNCEMENT BAR (RESPONSIVE)
   ═══════════════════════════════════════════════════════════ */
.bbm-ecosystem-bar {
  background: linear-gradient(90deg, #070b16 0%, #0d1527 50%, #070b16 100%);
  border-bottom: 1px solid rgba(255, 215, 0, 0.2);
  padding: 8px 16px;
  font-size: 12px;
  color: var(--bbm-text-muted);
  text-align: center;
  position: relative;
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  width: 100%;
}
.bbm-ecosystem-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 8px;
}
.bbm-eco-links {
  display: flex;
  align-items: center;
  gap: 14px;
}
.bbm-ecosystem-bar a {
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  border-bottom: 1px dashed rgba(255, 215, 0, 0.5);
  padding-bottom: 1px;
}
.bbm-ecosystem-bar a:hover {
  color: var(--bbm-gold);
  border-bottom-color: var(--bbm-gold);
}

/* ═══════════════════════════════════════════════════════════
   3. UNIFIED TOPBAR / NAVIGATION
   ═══════════════════════════════════════════════════════════ */
.bbm-topbar, .bbm-nav {
  background: rgba(5, 8, 17, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 1001;
  border-bottom: 1px solid var(--bbm-border);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
  transition: all 0.3s ease;
  width: 100%;
}
.bbm-topbar-inner, .bbm-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}
.bbm-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.bbm-brand-logo, .bbm-logo-img {
  height: 40px;
  width: 40px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--bbm-gold);
  box-shadow: 0 0 14px rgba(255, 215, 0, 0.3);
  transition: transform 0.3s ease;
}
.bbm-brand-text, .bbm-brand-name {
  display: flex;
  flex-direction: column;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.5px;
  color: #FFFFFF;
  line-height: 1.1;
}
.bbm-brand-title {
  background: linear-gradient(135deg, #FFFFFF, var(--bbm-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.bbm-brand .gold { color: var(--bbm-gold); }
.bbm-brand-subtitle {
  font-size: 10px;
  color: var(--bbm-green);
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

/* Nav Desktop Links */
.bbm-nav-links, .bbm-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.bbm-nav-links a, .bbm-menu a {
  color: var(--bbm-text-muted);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 11px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.bbm-nav-links a:hover, .bbm-menu a:hover {
  color: #ffffff;
  background: rgba(255, 215, 0, 0.08);
}
.bbm-nav-links a.active, .bbm-menu a.active {
  color: var(--bbm-gold);
  background: rgba(255, 215, 0, 0.12);
  border: 1px solid rgba(255, 215, 0, 0.25);
}
.bbm-nav-cta {
  background: linear-gradient(135deg, var(--bbm-gold), var(--bbm-gold2));
  color: #000000 !important;
  font-weight: 700 !important;
  border-radius: 50px !important;
  padding: 8px 18px !important;
  box-shadow: 0 4px 18px rgba(255, 215, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
.bbm-nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 215, 0, 0.5) !important;
}

/* Mobile Hamburger Toggle */
.bbm-burger {
  display: none;
  background: transparent;
  border: 1px solid var(--bbm-border);
  color: var(--bbm-gold);
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 20px;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}
.bbm-burger:hover {
  background: rgba(255, 215, 0, 0.1);
  border-color: var(--bbm-gold);
}

/* Mobile Nav Drawer */
.bbm-mobile-drawer {
  display: none;
  position: fixed;
  top: 60px;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 100vw;
  background: rgba(5, 8, 17, 0.98);
  border-bottom: 2px solid var(--bbm-gold);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  padding: 16px 20px 36px;
  z-index: 1000;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9);
  max-height: calc(100vh - 65px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.bbm-mobile-drawer.open {
  display: block !important;
}
.bbm-mobile-drawer a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  border-radius: 10px;
  color: var(--bbm-text);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s, color 0.2s;
}
.bbm-mobile-drawer a:hover, .bbm-mobile-drawer a.active {
  background: rgba(255, 215, 0, 0.1);
  color: var(--bbm-gold);
}

/* ═══════════════════════════════════════════════════════════
   4. KEYWORD TICKER (RESPONSIVE NO-OVERFLOW)
   ═══════════════════════════════════════════════════════════ */
.bbm-ticker-wrap {
  background: linear-gradient(90deg, #070b15, #0b1120, #070b15);
  border-bottom: 1px solid rgba(255, 215, 0, 0.18);
  padding: 8px 0;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  z-index: 999;
  width: 100%;
  max-width: 100vw;
}
.bbm-ticker {
  display: inline-flex;
  animation: bbmTickerScroll 50s linear infinite;
}
.bbm-ticker:hover {
  animation-play-state: paused;
}
.bbm-ticker span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 20px;
  font-size: 12px;
  font-weight: 700;
  color: var(--bbm-text-muted);
  border-right: 1px solid rgba(255, 215, 0, 0.12);
}
.bbm-ticker span strong { color: var(--bbm-gold); }
.bbm-ticker span.green strong { color: var(--bbm-green); }
.bbm-ticker span.cyan strong { color: var(--bbm-cyan); }
@keyframes bbmTickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ═══════════════════════════════════════════════════════════
   5. 3D CARD SYSTEM & DEPTH
   ═══════════════════════════════════════════════════════════ */
.card-3d-wrap {
  perspective: 1200px;
}
.card-3d, .topic-card-3d, .stat-card-3d, .review-card-3d, .bbm-eco-card, .pillar-card {
  background: linear-gradient(135deg, rgba(13, 20, 36, 0.85) 0%, rgba(10, 15, 28, 0.95) 100%);
  border: 1px solid var(--bbm-border);
  border-radius: var(--bbm-radius-lg);
  padding: 28px;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease, border-color 0.4s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transform-style: preserve-3d;
}
.card-3d::before, .topic-card-3d::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--bbm-gold), transparent);
  opacity: 0.3;
  transition: opacity 0.3s;
}
.card-3d:hover, .topic-card-3d:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--bbm-border-strong);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6), 0 0 30px rgba(255, 215, 0, 0.18);
}
.card-3d:hover::before, .topic-card-3d:hover::before {
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════
   6. PHONE MOCKUPS (RESPONSIVE 3D)
   ═══════════════════════════════════════════════════════════ */
.phone-showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.phone-mockup-card {
  background: linear-gradient(145deg, rgba(17, 26, 46, 0.9), rgba(8, 12, 22, 0.95));
  border: 1px solid var(--bbm-border);
  border-radius: 28px;
  padding: 16px 16px 22px;
  text-align: center;
  position: relative;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  perspective: 1000px;
}
.phone-mockup-card:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--bbm-gold);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(255, 215, 0, 0.25);
}
.phone-frame {
  border-radius: 22px;
  overflow: hidden;
  border: 4px solid #1a233a;
  background: #000000;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.8);
  position: relative;
  margin-bottom: 16px;
}
.phone-frame img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* ═══════════════════════════════════════════════════════════
   7. ADSENSE CONTAINERS (RESPONSIVE ZERO-CLS)
   ═══════════════════════════════════════════════════════════ */
.bbm-ad-container, .ad-slot-wrapper {
  max-width: 980px;
  width: 100% !important;
  margin: 35px auto;
  padding: 12px;
  box-sizing: border-box !important;
  overflow: hidden !important;
}
.ad-box {
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  display: flex;
  justify-content: center;
  align-items: center;
}
ins.adsbygoogle {
  display: block;
  max-width: 100% !important;
}

/* ═══════════════════════════════════════════════════════════
   8. MEDIA QUERIES: TABLETS & SMALL DESKTOPS (<= 1024px)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .bbm-nav-links, .bbm-menu {
    display: none !important;
  }
  .bbm-burger {
    display: flex !important;
  }
  .hero-grid {
    grid-template-columns: 1fr !important;
    text-align: center;
    gap: 36px;
  }
  .hero-desc {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-features-row {
    justify-content: center;
  }
  .phone-showcase-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .features-grid-3d, .course-grid-3d, .reviews-grid-3d, .topics-grid-3d, .bbm-ecosystem-grid, .ecosystem-grid-3d {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   9. MEDIA QUERIES: MOBILE SMARTPHONES (<= 768px)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Topbar & Announcement */
  .bbm-ecosystem-bar {
    font-size: 11px !important;
    padding: 7px 12px !important;
  }
  .bbm-ecosystem-inner {
    flex-direction: column !important;
    text-align: center;
    gap: 4px;
  }
  .bbm-eco-links {
    justify-content: center;
    gap: 10px;
  }
  .bbm-topbar-inner, .bbm-nav-inner {
    padding: 8px 16px !important;
  }
  .bbm-brand-logo, .bbm-logo-img {
    height: 34px !important;
    width: 34px !important;
  }
  .bbm-brand-text, .bbm-brand-name {
    font-size: 16px !important;
  }

  /* Section Padding */
  .section-container, .container {
    padding: 40px 16px !important;
  }
  .section-title, .academy-title {
    font-size: clamp(24px, 6vw, 32px) !important;
  }
  .hero-h1 {
    font-size: clamp(28px, 7vw, 38px) !important;
    line-height: 1.2 !important;
  }

  /* Stats Grid on Mobile: Clean 2x2 Grid */
  .stats-grid-strip, .stats-strip-3d {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
  .stat-card-3d, .stat-pill {
    padding: 14px 10px !important;
  }
  .stat-digit, .stat-val-3d {
    font-size: 24px !important;
  }
  .stat-name, .stat-lbl-3d {
    font-size: 10px !important;
  }

  /* All Grid Sections Collapse to 1-Column */
  .phone-showcase-grid, 
  .features-grid-3d, 
  .course-grid-3d, 
  .reviews-grid-3d, 
  .topics-grid-3d, 
  .bbm-ecosystem-grid, 
  .ecosystem-grid-3d,
  .roadmap-grid,
  .pillar-grid,
  .how-it-works-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  /* Card Padding on Mobile */
  .card-3d, .topic-card-3d, .review-card-3d, .bbm-eco-card, .pillar-card {
    padding: 20px 16px !important;
    border-radius: 16px !important;
  }

  /* Phone Mockups Center Perfectly */
  .phone-mockup-card {
    max-width: 290px;
    margin: 0 auto;
  }
  .hero-phone-frame {
    width: 260px !important;
    border-radius: 28px !important;
    margin: 0 auto;
  }
  .floating-chip {
    display: none !important; /* Hide floating chips to avoid screen blowout */
  }

  /* Buttons Stack Neatly */
  .btn-cta-gold, .btn-cta-glass, .btn-primary-3d, .btn-secondary-3d, .btn-row a {
    width: 100% !important;
    max-width: 320px !important;
    margin: 5px auto !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 14px 20px !important;
  }

  /* Live Tracker Box */
  .live-tracker-box {
    padding: 26px 16px !important;
  }
  .live-big-amount {
    font-size: 38px !important;
  }

  /* Bottom CTA */
  .bottom-cta-banner, .academy-cta {
    padding: 32px 18px !important;
    border-radius: 20px !important;
  }

  /* Filter Tabs Bar */
  .filter-container, .filter-wrap {
    gap: 8px !important;
    margin-bottom: 24px !important;
  }
  .filter-btn-3d, .filter-btn {
    padding: 8px 16px !important;
    font-size: 0.82rem !important;
  }

  /* Footer on Mobile */
  .footer-links {
    gap: 12px 16px !important;
  }
  .footer-links a {
    font-size: 13px !important;
  }
}

/* ═══════════════════════════════════════════════════════════
   10. MEDIA QUERIES: SMALL SCREEN PHONES (<= 380px)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 380px) {
  html {
    font-size: 15px;
  }
  .section-container, .container {
    padding: 30px 12px !important;
  }
  .hero-phone-frame {
    width: 230px !important;
  }
  .stats-grid-strip, .stats-strip-3d {
    gap: 8px !important;
  }
  .stat-digit, .stat-val-3d {
    font-size: 20px !important;
  }
}
