/* ============================================
   TradePilot AI — Global Styles
   Cyberpunk / Fintech Dark Theme
   ============================================ */

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-primary: #06060d;
  --bg-secondary: #0b0b16;
  --bg-card: #0c0f1a;
  --bg-card-hover: #111628;
  --text-primary: #f0f0f5;
  --text-secondary: #a0a8c0;
  --text-muted: #5e6580;
  --accent-cyan: #00ffc8;
  --accent-purple: #8b5cf6;
  --accent-magenta: #f43f7a;
  --accent-gold: #ffb800;
  --accent-blue: #3b82f6;
  --accent-emerald: #10b981;
  --glow-cyan: 0 0 20px rgba(0, 255, 200, 0.3), 0 0 40px rgba(0, 255, 200, 0.1);
  --glow-purple: 0 0 20px rgba(139, 92, 246, 0.3), 0 0 40px rgba(139, 92, 246, 0.1);
  --glow-mixed: 0 0 15px rgba(0, 255, 200, 0.2), 0 0 30px rgba(139, 92, 246, 0.15);
  --glow-pink: 0 0 20px rgba(244, 63, 122, 0.3), 0 0 40px rgba(244, 63, 122, 0.1);
  --border-glow: 1px solid rgba(0, 255, 200, 0.12);
  --gradient-border: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple), var(--accent-magenta), var(--accent-gold));
  --gradient-hero: linear-gradient(135deg, #00ffc8 0%, #8b5cf6 40%, #f43f7a 70%, #ffb800 100%);
  --font-heading: 'Orbitron', sans-serif;
  --font-body: 'Outfit', system-ui, -apple-system, sans-serif;
  --font-alt: 'Space Grotesk', sans-serif;
  --container-max: 1300px;
  --nav-height: 68px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Animations ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes glowPulse {

  0%,
  100% {
    box-shadow: var(--glow-mixed);
  }

  50% {
    box-shadow: 0 0 25px rgba(0, 255, 200, 0.35), 0 0 50px rgba(139, 92, 246, 0.25);
  }
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-12px);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }

  100% {
    background-position: 200% center;
  }
}

/* ---------- NAVBAR ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  height: var(--nav-height);
}

.navbar-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.logo-highlight {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple), var(--accent-cyan));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  display: inline-block;
  animation: shine 3s linear infinite;
}

@keyframes shine {
  to {
    background-position: 200% center;
  }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}

.nav-link {
  font-family: var(--font-alt);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
  white-space: nowrap;
  letter-spacing: 0.3px;
}

.nav-link:hover {
  color: var(--text-primary);
}

/* Nav Dropdown (Trade menu) */
.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-dropdown .nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.nav-dropdown .nav-link svg {
  transition: transform 0.2s ease;
}

.nav-dropdown:hover .nav-link svg {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  min-width: 190px;
  background: rgba(12, 15, 26, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 9999;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 255, 200, 0.05);
}

.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  font-size: 0.82rem;
  font-family: var(--font-alt);
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-dropdown-item:hover {
  background: rgba(0, 255, 200, 0.08);
  color: var(--text-primary);
}

.nav-dropdown-item.active {
  color: var(--accent-cyan);
  background: rgba(0, 255, 200, 0.06);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.btn-login {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.btn-login:hover {
  color: var(--text-primary);
}

.btn-signup {
  font-family: var(--font-alt);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 9px 26px;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  background-size: 200% 200%;
  animation: shimmer 4s linear infinite;
  color: var(--bg-primary);
  transition: all var(--transition);
  border: none;
}

.btn-signup:hover {
  box-shadow: var(--glow-cyan), var(--glow-purple);
  filter: brightness(1.15);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
  background: var(--accent-cyan);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(10px);
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
  background: var(--accent-cyan);
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: var(--nav-height);
}

.hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.4;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 850px;
  padding: 60px 24px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  line-height: 1.2;
  margin-bottom: 20px;
  color: #ffffff;
  background: linear-gradient(to bottom right, #ffffff, #a0a8c0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
  opacity: 0;
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 40px;
  line-height: 1.7;
  opacity: 0;
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn-cta {
  display: inline-block;
  font-family: var(--font-alt);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 14px 40px;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  background-size: 200% 200%;
  animation: shimmer 5s linear infinite;
  color: var(--bg-primary);
  transition: all var(--transition);
  border: 2px solid transparent;
  letter-spacing: 0.5px;
}

.btn-cta:hover {
  box-shadow: var(--glow-cyan), var(--glow-pink);
  filter: brightness(1.2);
  transform: translateY(-2px);
}

/* ---------- SECTION HEADERS ---------- */
.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  margin-bottom: 12px;
}

.section-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
}

/* ---------- AI FEATURES SECTION ---------- */
.ai-features {
  padding: 100px 0;
  position: relative;
}

.ai-features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.features-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid rgba(0, 229, 255, 0.1);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  padding: 1px;
  background: var(--gradient-border);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--transition);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--glow-mixed);
}

.feature-card-center {
  grid-column: 1 / -1;
  max-width: 420px;
  margin: 0 auto;
}

.feature-icon {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 229, 255, 0.05);
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: 10px;
}

.feature-text h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.feature-text p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.features-robot {
  display: flex;
  justify-content: center;
  align-items: center;
}

.robot-image {
  max-width: 500px;
  width: 100%;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 0 30px rgba(0, 229, 255, 0.2));
}

/* ---------- ABOUT SECTION ---------- */
.about-section {
  padding: 100px 0;
}

.about-box {
  display: flex;
  align-items: center;
  gap: 50px;
  padding: 50px;
  border-radius: 20px;
  position: relative;
  background: rgba(14, 17, 23, 0.6);
  overflow: hidden;
}

.about-box::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1.5px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple), var(--accent-magenta), var(--accent-cyan));
  background-size: 300% 300%;
  animation: shimmer 6s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.about-phone {
  flex-shrink: 0;
  width: 280px;
}

.phone-image {
  width: 100%;
  border-radius: 16px;
  filter: drop-shadow(0 0 25px rgba(123, 47, 242, 0.3));
}

.about-content {
  flex: 1;
}

.about-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  margin-bottom: 8px;
}

.about-heading {
  font-size: 1.1rem;
  color: var(--accent-cyan);
  margin-bottom: 20px;
  font-weight: 500;
}

.about-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.7;
}

.crypto-icons {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.crypto-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--accent-cyan);
  transition: all var(--transition);
}

.crypto-icon:hover {
  background: rgba(0, 229, 255, 0.2);
  box-shadow: var(--glow-cyan);
  transform: scale(1.15);
}

/* ---------- SECURITY SECTION ---------- */
.security-section {
  padding: 120px 0;
  position: relative;
  overflow: hidden;
}

.security-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.5;
}

.security-box {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 50px;
  padding: 40px 50px;
  border-radius: 16px;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(10px);
  max-width: 900px;
  margin: 0 auto;
}

.security-box::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1.5px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple), var(--accent-magenta));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.security-icon {
  text-align: center;
  flex-shrink: 0;
}

.security-icon h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-top: 12px;
}

.security-points p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  padding-left: 16px;
  position: relative;
}

.security-points p::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent-cyan);
}

/* ---------- BOT GALLERY ---------- */
.bots-section {
  padding: 100px 0;
}

.bots-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

.bot-card {
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg-card);
  text-align: center;
  transition: all var(--transition);
  cursor: pointer;
}

.bot-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--glow-mixed);
}

.bot-image-wrap {
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: #000;
}

.bot-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.bot-card:hover .bot-image {
  transform: scale(1.05);
}

.bot-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  padding: 16px 12px 4px;
  color: var(--accent-cyan);
}

.bot-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 0 12px 20px;
  line-height: 1.5;
}

/* ---------- BUILT FOR TRADERS (TABS) ---------- */
.traders-section {
  padding: 100px 0;
}

.traders-box {
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  background: rgba(14, 17, 23, 0.6);
}

.traders-box::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1.5px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple), var(--accent-magenta), var(--accent-cyan));
  background-size: 300% 300%;
  animation: shimmer 6s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.tabs-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 16px 16px 0;
  position: relative;
  z-index: 1;
}

.tab-btn {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  padding: 14px 20px;
  border: 1px solid rgba(0, 229, 255, 0.15);
  border-radius: 50px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-primary);
  border-color: rgba(0, 229, 255, 0.3);
}

.tab-btn.active {
  background: rgba(0, 229, 255, 0.1);
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.15);
}

.tabs-content {
  padding: 30px 40px 40px;
  position: relative;
  z-index: 1;
}

.tab-panel {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  animation: fadeIn 0.4s ease;
}

.tab-panel.active {
  display: grid;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tab-image img {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

.tab-text h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 16px;
}

.tab-text p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---------- CTA SECTION ---------- */
.cta-section {
  padding: 120px 0;
}

.cta-content {
  text-align: center;
}

.cta-title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3.5vw, 2.2rem);
  margin-bottom: 12px;
}

.cta-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
}

.user-avatar-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  font-family: var(--font-alt);
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 50px;
  transition: all var(--transition);
}

.user-avatar-btn .avatar-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar-btn:hover,
.user-avatar-btn.active {
  background: rgba(255, 255, 255, 0.05);
}

/* Dropdown Menu Styles */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 220px;
  background: rgba(12, 12, 20, 0.95);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  cursor: pointer;
}

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
}

.dropdown-item.logout {
  color: var(--accent-magenta);
}

.dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
  margin: 6px 0;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-outline {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 14px 36px;
  border-radius: 50px;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  color: var(--text-primary);
  transition: all var(--transition);
}

.btn-outline:hover {
  border-color: var(--accent-cyan);
  box-shadow: var(--glow-cyan);
  color: var(--accent-cyan);
}

/* ---------- FOOTER ---------- */
.footer {
  text-align: center;
  padding: 40px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1100px) {
  .ai-features-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }

  .features-robot {
    order: -1;
  }

  .robot-image {
    max-width: 350px;
  }

  .bots-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .tabs-nav {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .tab-panel {
    grid-template-columns: 1fr;
  }

  .about-box {
    flex-direction: column;
    text-align: center;
    padding: 40px 30px;
  }

  .about-phone {
    width: 220px;
  }

  .crypto-icons {
    justify-content: center;
  }

  .security-box {
    flex-direction: column;
    text-align: center;
    padding: 40px 30px;
  }

  .security-points p {
    padding-left: 0;
    text-align: center;
  }

  .security-points p::before {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: flex; /* Always display for the transition to work with opacity/transform */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100dvh;
    background: #0c0f1a !important;
    background-color: #0c0f1a !important;
    backdrop-filter: blur(40px) !important;
    -webkit-backdrop-filter: blur(40px) !important;
    flex-direction: column;
    align-items: center;
    justify-content: center !important;
    gap: 16px;
    z-index: 2000 !important;
    padding: 80px 20px 40px !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-20px);
    transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
    overflow-y: auto;
  }

  .nav-links.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-link {
    font-size: 0.95rem;
    font-family: var(--font-heading);
    letter-spacing: 1.5px;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.3s ease;
  }

  .nav-links.open .nav-link, 
  .nav-links.open .nav-dropdown {
    opacity: 1;
    transform: scale(1);
  }

  /* Nav Dropdown on Mobile */
  .nav-dropdown {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.3s ease;
  }
  
  .nav-dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    background: transparent;
    border: none;
    box-shadow: none;
    min-width: unset;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
  }
  
  .nav-dropdown .nav-link svg {
    display: none;
  }
  
  .nav-dropdown-item {
    font-size: 0.85rem;
    padding: 3px;
  }

  /* Staggered link animation */
  .nav-links.open > :nth-child(1) { transition-delay: 0.05s; }
  .nav-links.open > :nth-child(2) { transition-delay: 0.1s; }
  .nav-links.open > :nth-child(3) { transition-delay: 0.15s; }
  .nav-links.open > :nth-child(4) { transition-delay: 0.2s; }
  .nav-links.open > :nth-child(5) { transition-delay: 0.25s; }
  .nav-links.open > :nth-child(6) { transition-delay: 0.3s; }
  .nav-links.open > :nth-child(7) { transition-delay: 0.35s; }
  .nav-links.open > :nth-child(8) { transition-delay: 0.4s; }
  .nav-links.open > :nth-child(9) { transition-delay: 0.45s; }
  .nav-links.open > :nth-child(10) { transition-delay: 0.5s; }

  .nav-actions {
    display: flex;
    gap: 8px;
    align-items: center;
  }

  .nav-actions .btn-login,
  .nav-actions .btn-signup {
    display: none; /* Hide login/signup buttons in the header on mobile */
  }

  /* When JS moves .nav-actions into .nav-links on mobile */
  .mobile-nav-actions-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 8px;
    padding-bottom: 10px;
    gap: 10px;
    background: transparent;
  }

  .mobile-nav-actions-container .btn-login,
  .mobile-nav-actions-container .btn-signup {
    display: block;
    width: 80%; 
    max-width: 260px;
    text-align: center;
    padding: 10px 0;
    font-size: 0.85rem;
    border-radius: 50px;
  }

  .mobile-nav-actions-container .btn-login {
    background-color: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .mobile-nav-actions-container .btn-signup {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
    border: none;
    color: var(--bg-primary);
  }

  /* User dropdown stays visible in header */
  .user-dropdown {
    position: relative;
    z-index: 1001;
  }

  .username-top {
    display: none; /* Hide name on small screens in header */
  }

  .logo-text {
    font-size: 0.9rem;
  }

  @media (max-width: 380px) {
    .logo-text span:first-child {
      display: none; /* Hide "TradePilot" but keep "AI" if too narrow */
    }
  }

  .hamburger {
    display: flex;
    z-index: 2002 !important;
    position: relative;
  }

  .hamburger.active {
    position: fixed;
    top: 22px;
    right: 24px;
    padding: 8px;
    z-index: 2100 !important;
  }

  .bots-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .features-cards {
    grid-template-columns: 1fr;
  }

  .feature-card-center {
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .hero-content {
    padding: 40px 16px;
  }

  .bots-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .tabs-nav {
    grid-template-columns: 1fr;
  }

  .tabs-content {
    padding: 20px;
  }

  .about-box {
    padding: 30px 20px;
  }
}