@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Dark Mode Theme Palette */
  --bg-color: #020617;        /* Very dark navy/black */
  --bg-secondary: #0f172a;    /* Slightly lighter section bg */
  --card-bg: #1e293b;         /* Card background */
  
  --primary-color: #EAB308;   /* Gold/Yellow - The Apex "Trade" feel */
  --primary-hover: #CA8A04;
  
  --accent-blue: #0ea5e9;     /* Cyan/Electric Blue for tech elements */
  --success-color: #22c55e;   /* Trading Green */
  --danger-color: #ef4444;    /* Trading Red */
  
  --text-main: #f8fafc;       /* White-ish */
  --text-muted: #94a3b8;      /* Slate Gray */
  
  --border-color: #334155;
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
  
  --shadow-glow: 0 0 20px rgba(234, 179, 8, 0.15);
}

body {
  font-family: 'Inter', sans-serif; /* Cleaner tech font */
  line-height: 1.6;
  color: var(--text-main);
  background-color: var(--bg-color);
  overflow-x: hidden;
}

/* --- Ticker Tape --- */
.ticker-wrap {
  width: 100%;
  background-color: #000000;
  border-bottom: 1px solid #1e293b;
  overflow: hidden;
  height: 40px;
  display: flex;
  align-items: center;
}

.ticker {
  display: flex;
  animation: ticker 20s linear infinite;
  white-space: nowrap;
}

.ticker__item {
  padding: 0 2rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  gap: 8px;
}

.ticker__item .up { color: var(--success-color); }
.ticker__item .down { color: var(--danger-color); }

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); } /* Adjust based on content width */
}

/* --- Navigation --- */
nav {
  background-color: rgba(2, 6, 23, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 70px;
}

.nav-container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--primary-color);
  color: #000;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: var(--shadow-glow);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  align-items: center;
}

.nav-links a:not(.btn) {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.nav-links a:not(.btn):hover,
.nav-links a.active {
  color: var(--primary-color);
}

.nav-buttons-desktop {
  display: flex;
  align-items: center;
  gap: 15px;
}

.nav-buttons-mobile {
  display: none;
}

.nav-text-btn {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.9rem;
}

.btn {
  padding: 0.5rem 1.2rem;
  border-radius: 4px; /* Sharper corners for trading look */
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.9rem;
  display: inline-block;
}

.btn-primary {
  background: var(--primary-color);
  color: #000; /* Black text on gold for contrast */
}

.btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-glow);
}

.btn-outline {
  border: 1px solid var(--border-color);
  color: var(--text-main);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 6px;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text-main);
  transition: all 0.3s;
}

/* --- Hero Section --- */
.hero {
  position: relative;
  background-color: var(--bg-color);
  color: var(--text-main);
  overflow: hidden;
  min-height: 600px;
  display: flex;
  align-items: center;
}

/* Ambient Background Glows */
.hero-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.1) 0%, rgba(2, 6, 23, 0) 70%);
  z-index: 1;
  pointer-events: none;
}

.carousel-container {
  position: relative;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  height: 500px;
  z-index: 2;
}

.carousel-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

.carousel-slide.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.slide-content {
  flex: 1;
  max-width: 550px;
  padding-right: 40px;
}

.hero-badge {
  display: inline-block;
  background: rgba(234, 179, 8, 0.1);
  color: var(--primary-color);
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 20px;
  border: 1px solid rgba(234, 179, 8, 0.2);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.slide-content h1 {
  font-size: 3.2rem;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.1;
  letter-spacing: -1px;
}

.slide-content p {
  font-size: 1.1rem;
  margin-bottom: 35px;
  color: var(--text-muted);
  font-weight: 300;
}

.slide-image-container {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.vector-art {
  width: 100%;
  max-width: 450px;
  height: auto;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(14, 165, 233, 0.1));
}

@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}

/* Controls */
.carousel-controls-container {
  position: absolute;
  bottom: 0;
  left: 2rem;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 15px;
}

.carousel-button {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.carousel-button:hover {
  background: var(--primary-color);
  color: #000;
  border-color: var(--primary-color);
}

.carousel-dots {
  display: flex;
  gap: 8px;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-dot.active {
  background: var(--primary-color);
  transform: scale(1.2);
}

/* --- Market Stats Bar --- */
.market-bar {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
}

.market-item {
  text-align: center;
}

.market-item .lbl {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.market-item .val {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
}

/* --- Features Section --- */
.features-section {
  padding: 100px 20px;
  background: var(--bg-color);
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 2.2rem;
  margin-bottom: 15px;
  color: var(--text-main);
}

.section-header p {
  color: var(--text-muted);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.feature-card {
  background: var(--card-bg);
  padding: 40px 30px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.feature-icon {
  width: 50px;
  height: 50px;
  background: rgba(234, 179, 8, 0.1);
  color: var(--primary-color);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 25px;
}

.feature-card h3 {
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--text-main);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* --- CTA Section --- */
.cta-section {
  padding: 80px 20px;
}

.cta-container {
  max-width: 1000px;
  margin: 0 auto;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-container::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(234, 179, 8, 0.2) 0%, rgba(0,0,0,0) 70%);
}

.cta-content h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
  color: var(--text-main);
}

/* --- Footer --- */
footer {
  background: #000000;
  color: var(--text-muted);
  padding: 5rem 2rem 2rem;
  border-top: 1px solid #1e293b;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h3 {
  color: var(--text-main);
  margin-bottom: 1.5rem;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.8rem;
}

.footer-section a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-section a:hover {
  color: var(--primary-color);
}

/* --- Responsive --- */
@media (max-width: 900px) {
  .hero h1 { font-size: 2.5rem; }
  .carousel-slide {
    flex-direction: column-reverse;
    text-align: center;
    justify-content: center;
  }
  .slide-content { padding-right: 0; }
  .hero-buttons { justify-content: center; }
  .carousel-controls-container {
    left: 50%;
    transform: translateX(-50%);
    bottom: -10px;
  }
  
  .market-bar { gap: 2rem; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: var(--bg-secondary);
    padding: 2rem;
    flex-direction: column;
    border-bottom: 1px solid var(--border-color);
  }
  
  .nav-links.active { display: flex; }
  
  .nav-buttons-desktop { display: none; }
  .nav-buttons-mobile { display: flex; flex-direction: column; width: 100%; gap: 15px; margin-top: 10px; }
  .nav-buttons-mobile li { width: 100%; }
  .nav-buttons-mobile .btn { width: 100%; text-align: center; }
  
  .hamburger { display: flex; }
}

/* --- Add to css/styles.css --- */

/* Responsive adjustment for Markets Page Grid */
@media (max-width: 900px) {
  /* Stack the Technical Analysis widgets vertically on mobile */
  .widget-section[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}