/* Base variables for colors and sizing */
:root {
  --color-bg: #0a1e2e;
  --color-bg-alt: #11284b;
  --color-primary: #00d68f;
  --color-secondary: #009f6b;
  --color-text: #f4f7fa;
  --color-muted: #8da2bd;
  --color-card-bg: #0f2740;
  --color-border: #143353;
  --color-highlight: #ffffff;
  --font-base: 'Inter', sans-serif;
}

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

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-base);
  line-height: 1.6;
}

h1,
h2,
h3 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

h1 {
  font-size: 2.8rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.4rem;
}

p {
  color: var(--color-muted);
  margin-bottom: 1rem;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Utility classes */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.section-subtitle {
  text-align: center;
  max-width: 700px;
  margin: 0.5rem auto 2rem auto;
  color: var(--color-muted);
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(10, 30, 46, 0.95);
  z-index: 1000;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem; /* Add gap between logo and nav links */
}

.logo {
  display: flex;
  align-items: center;
  margin-right: 1rem; /* Add right margin for extra spacing */
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-primary);
  gap: 0.5rem;
}
.logo-icon {
  width: 32px;
  height: 32px;
}
.logo i {
  font-size: 1.8rem;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
.nav-links li a {
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav-links li a:hover {
  color: var(--color-primary);
}

/* Hero */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding-top: 80px; /* account for navbar */
  background: linear-gradient(135deg, #0a1e2e 0%, #062140 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -25%;
  width: 150%;
  height: 200%;
  background: radial-gradient(circle at 30% 30%, rgba(0, 214, 143, 0.25), transparent 70%), radial-gradient(circle at 70% 70%, rgba(0, 159, 107, 0.15), transparent 70%);
  pointer-events: none;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 2rem;
  position: relative;
  z-index: 2;
}

.hero-text {
  flex: 1;
  max-width: 600px;
}
.hero-text h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  color: var(--color-highlight);
}
.hero-text p {
  color: var(--color-muted);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.hero-chart {
  flex: 1;
  position: relative;
  max-width: 500px;
}
.hero-chart canvas {
  width: 100%;
  height: 300px;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: 4px;
  font-weight: 600;
  transition: background 0.3s ease;
  text-align: center;
}

.primary-btn {
  background: var(--color-primary);
  color: #0a1e2e;
}

.primary-btn:hover {
  background: var(--color-secondary);
}

.secondary-btn {
  background: none;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
}
.secondary-btn:hover {
  background: var(--color-primary);
  color: #0a1e2e;
}

.scroll-down {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}
.scroll-down a {
  color: var(--color-primary);
  font-size: 2rem;
  text-decoration: none;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translate(-50%, 0);
  }
  40% {
    transform: translate(-50%, -10px);
  }
  60% {
    transform: translate(-50%, -5px);
  }
}

/* Overview Section */
.overview-section {
  background: var(--color-bg-alt);
  text-align: center;
}

/* Features Section */
.features {
  background: var(--color-bg);
}

.features-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin-top: 2rem;
}

.feature-card {
  background: var(--color-card-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.icon-wrap {
  background: var(--color-bg-alt);
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  width: 60px;
  height: 60px;
  margin: 0 auto 1rem auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* Ensure icons inside feature circles inherit color and size */
/* When using PNG icons, size them accordingly */
/* Icons when using PNGs are no longer used for features; using emojis instead */
.icon-wrap .icon-emoji {
  font-size: 1.6rem;
  line-height: 1;
}

.feature-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
  color: var(--color-highlight);
}

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

/* Demo Section */
.demo {
  background: var(--color-bg-alt);
}
.demo-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.demo-info {
  flex: 1;
}

.demo-info p {
  max-width: 600px;
}

.demo-form {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}
.demo-form label {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  color: var(--color-muted);
}
.demo-form input[type='date'] {
  background: var(--color-card-bg);
  color: var(--color-highlight);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 0.5rem;
  font-family: var(--font-base);
  margin-top: 0.25rem;
}
.demo-form input[type='date']::-webkit-calendar-picker-indicator {
  filter: invert(1);
}
.demo-chart {
  flex: 1;
}
.demo-chart canvas {
  width: 100%;
  min-height: 300px;
}

/* Bots Section */
.bots {
  background: var(--color-bg);
}
.bots-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.code-sample {
  background: var(--color-card-bg);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
}
.code-sample pre {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.4;
}

/* Leaderboard Section */
.leaderboard {
  background: var(--color-bg-alt);
}
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
}
.leaderboard-table th,
.leaderboard-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
.leaderboard-table thead {
  background: var(--color-card-bg);
}
.leaderboard-table th {
  font-weight: 600;
  color: var(--color-highlight);
}
.leaderboard-table tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.1);
}
.leaderboard-table td {
  color: var(--color-muted);
}

.table-responsive {
  overflow-x: auto;
}

/* Contact Section */
.contact {
  background: var(--color-bg);
  text-align: center;
}
.contact-form {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}
.contact-form input[type='email'] {
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 4px;
  font-family: var(--font-base);
  flex: 1 0 250px;
  background: var(--color-card-bg);
  color: var(--color-highlight);
  border: 1px solid var(--color-border);
}
.contact-form button {
  white-space: nowrap;
}
.contact-message {
  margin-top: 0.5rem;
  color: var(--color-primary);
}

/* Footer */
.footer {
  background: #081c2b;
  padding: 2rem 0;
  color: var(--color-muted);
  text-align: center;
}
.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-content p {
  margin: 0;
}
.social-icons {
  display: flex;
  gap: 1rem;
}
.social-icons a {
  color: var(--color-muted);
  font-size: 1.4rem;
  transition: color 0.2s ease;
}
.social-icons img {
  width: 24px;
  height: 24px;
  display: block;
  filter: brightness(0) saturate(100%) invert(67%) sepia(16%) saturate(2650%) hue-rotate(100deg) brightness(95%) contrast(98%);
  /* the filter tints the monochrome icons to match the muted color */
}
.social-icons a:hover {
  color: var(--color-primary);
}

/* Responsive tweaks */
@media (max-width: 960px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }
  .hero-text, .hero-chart {
    max-width: none;
    width: 100%;
  }
  .demo-wrapper {
    flex-direction: column;
  }
  .bots-wrapper {
    flex-direction: column;
  }
  .footer-content {
    flex-direction: column;
  }
}

/* Responsive: stack nav links below logo on small screens */
@media (max-width: 600px) {
  .nav-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  .nav-links {
    margin-top: 0.5rem;
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    justify-content: flex-start;
  }
}