/* ============================================
   CodeBull Teaser Site – Ultra-violet Design System
   ============================================ */

/* CSS Variables */
:root {
  /* Accent Colors */
  --accent: #8b5cf6;
  --accent-2: #a78bfa;
  --accent-3: #c084fc;
  --accent-rgb: 139, 92, 246;
  --glow: 0 0 24px rgba(var(--accent-rgb), 0.35), 0 0 48px rgba(var(--accent-rgb), 0.15);

  /* Brand logo filter (green to violet) */
  --brand-filter: hue-rotate(120deg) saturate(175%) brightness(1.08);

  /* Status Colors */
  --color-success: #22c55e;
  --color-danger: #ef4444;

  /* Typography */
  --font-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Light Theme */
[data-bs-theme="light"] {
  --bs-body-bg: #ffffff;
  --bs-body-color: #0b0b0d;
  --bs-secondary-color: #3f3f46;
  --bs-card-bg: #ffffff;
  --bs-border-color: #e5e7eb;
  --bs-primary: var(--accent);
  --bs-link-color: var(--accent);
  --bs-link-hover-color: #6d28d9;
  --color-lead: #5b5b66;
}

/* Dark Theme (Default) */
[data-bs-theme="dark"] {
  --bs-body-bg: #0a0a0b;
  --bs-body-color: #f5f5ff;
  --bs-secondary-color: #a1a1aa;
  --bs-card-bg: #0f0f12;
  --bs-border-color: #1f1f26;
  --bs-primary: var(--accent);
  --bs-link-color: var(--accent);
  --bs-link-hover-color: #c084fc;
  --color-lead: #bdbde6;
  --brand-filter: hue-rotate(120deg) saturate(190%) brightness(1.25) contrast(1.05);
}

/* Global resets */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(1200px 600px at 85% 65%, rgba(var(--accent-rgb), 0.10), transparent 60%),
    radial-gradient(900px 500px at 10% 10%, rgba(199, 120, 255, 0.10), transparent 55%),
    var(--bs-body-bg);
  color: var(--bs-body-color);
  font-family: var(--font-base);
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  letter-spacing: 0.3px;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.4rem; }

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

a {
  color: var(--bs-link-color);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--bs-link-hover-color);
}

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

.section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--bs-body-color);
}

.section-subtitle {
  text-align: center;
  max-width: 700px;
  margin: 0.5rem auto 2.5rem auto;
  color: var(--color-lead);
  font-size: 1.1rem;
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 0.75rem 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

[data-bs-theme="dark"] .navbar {
  background: linear-gradient(180deg, rgba(10,10,11,0.98), rgba(10,10,11,0.92));
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: var(--glow);
}

[data-bs-theme="light"] .navbar {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,255,255,0.94));
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--bs-body-color);
  letter-spacing: 0.3px;
}

.logo:hover {
  color: var(--accent);
}

.logo-icon {
  width: 28px;
  height: 28px;
  filter: var(--brand-filter);
  border-radius: 4px;
  image-rendering: -webkit-optimize-contrast;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-links li a {
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

[data-bs-theme="dark"] .nav-links li a {
  color: rgba(255,255,255,0.85);
}

[data-bs-theme="dark"] .nav-links li a:hover {
  color: #fff;
}

[data-bs-theme="light"] .nav-links li a {
  color: var(--bs-secondary-color);
}

[data-bs-theme="light"] .nav-links li a:hover {
  color: var(--accent);
}

/* Theme Toggle Button */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--bs-border-color);
  border-radius: 8px;
  padding: 0.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  color: var(--bs-body-color);
}

.theme-toggle:hover {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.1);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  text-align: center;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--accent);
  color: #ffffff;
  box-shadow: var(--glow);
}

.btn-primary:hover {
  filter: brightness(1.1);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  border: 2px solid rgba(var(--accent-rgb), 0.55);
  color: var(--accent);
}

.btn-outline:hover {
  background-color: rgba(var(--accent-rgb), 0.12);
  border-color: var(--accent);
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.05rem;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

[data-bs-theme="dark"] .hero {
  background:
    radial-gradient(900px 400px at 70% 80%, rgba(var(--accent-rgb), 0.22), transparent 60%),
    radial-gradient(700px 300px at 0% 20%, rgba(167, 139, 250, 0.22), transparent 60%),
    linear-gradient(180deg, #0a0a0b, #111114 40%, #0a0a0b);
}

[data-bs-theme="light"] .hero {
  background: linear-gradient(180deg, #ffffff, #f7f7fb 50%, #ffffff);
}

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

.hero-text {
  flex: 1;
  max-width: 600px;
}

.hero-text h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--bs-body-color);
  line-height: 1.1;
}

.hero-text .lead {
  font-size: 1.15rem;
  margin-bottom: 2rem;
  line-height: 1.7;
}

[data-bs-theme="dark"] .hero-text .lead {
  color: #bdbde6;
}

[data-bs-theme="light"] .hero-text .lead {
  color: #5b5b66;
}

.hero-chart {
  flex: 1;
  position: relative;
  max-width: 500px;
}

.hero-chart canvas {
  width: 100%;
  height: 300px;
}

/* Hero decorative SVG */
.hero-decoration {
  opacity: 0.9;
}

.scroll-down {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.scroll-down a {
  color: var(--accent);
  font-size: 2rem;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.scroll-down a:hover {
  opacity: 1;
}

@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 {
  text-align: center;
}

[data-bs-theme="dark"] .overview-section {
  background: linear-gradient(180deg, #0f0f12, #0a0a0b);
}

[data-bs-theme="light"] .overview-section {
  background: #f9f9fc;
}

/* ============================================
   Features Section
   ============================================ */
.features-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  margin-top: 2rem;
}

.feature-card {
  background: var(--bs-card-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--accent-rgb), 0.4);
  box-shadow: 0 8px 32px rgba(var(--accent-rgb), 0.15);
}

.icon-wrap {
  background: rgba(var(--accent-rgb), 0.1);
  border: 2px solid rgba(var(--accent-rgb), 0.3);
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem auto;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-wrap .icon-emoji {
  font-size: 1.75rem;
  line-height: 1;
}

.feature-card h3 {
  margin-bottom: 0.75rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--bs-body-color);
}

.feature-card p {
  font-size: 0.9rem;
  color: var(--bs-secondary-color);
  margin-bottom: 0;
  line-height: 1.6;
}

/* ============================================
   Bots Section
   ============================================ */
[data-bs-theme="dark"] .bots {
  background: linear-gradient(180deg, #0a0a0b, #0f0f12);
}

[data-bs-theme="light"] .bots {
  background: #f9f9fc;
}

.bots-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.bots-info .section-title {
  text-align: left;
}

.bots-info p {
  color: var(--color-lead);
  line-height: 1.7;
}

.code-sample {
  background: var(--bs-card-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  overflow-x: auto;
}

.code-sample pre {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
}

/* ============================================
   Leaderboard Section
   ============================================ */
[data-bs-theme="dark"] .leaderboard {
  background: #0f0f12;
}

[data-bs-theme="light"] .leaderboard {
  background: #ffffff;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  border-radius: 0.75rem;
  overflow: hidden;
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 1rem 1.25rem;
  text-align: left;
}

.leaderboard-table thead {
  background: rgba(var(--accent-rgb), 0.1);
}

.leaderboard-table th {
  font-weight: 600;
  color: var(--bs-body-color);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.leaderboard-table tbody tr {
  border-bottom: 1px solid var(--bs-border-color);
  transition: background 0.2s ease;
}

.leaderboard-table tbody tr:hover {
  background: rgba(var(--accent-rgb), 0.05);
}

.leaderboard-table td {
  color: var(--bs-secondary-color);
}

.table-responsive {
  overflow-x: auto;
  border-radius: 0.75rem;
  border: 1px solid var(--bs-border-color);
}

/* ============================================
   About Section
   ============================================ */
[data-bs-theme="dark"] .about-section {
  background: linear-gradient(180deg, #0a0a0b, #0f0f12);
}

[data-bs-theme="light"] .about-section {
  background: #f9f9fc;
}

.about-manifesto {
  max-width: 800px;
  margin: 0 auto;
}

.about-manifesto h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--accent);
}

.about-manifesto h4 {
  font-size: 1.2rem;
  margin: 2rem 0 0.75rem 0;
  color: var(--bs-body-color);
}

.about-manifesto p {
  color: var(--color-lead);
  line-height: 1.8;
}

.about-manifesto ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}

.about-manifesto li {
  padding: 0.5rem 0;
  color: var(--color-lead);
  font-size: 1rem;
}

/* ============================================
   Contact Section
   ============================================ */
.contact {
  text-align: center;
}

[data-bs-theme="dark"] .contact {
  background: #0a0a0b;
}

[data-bs-theme="light"] .contact {
  background: #ffffff;
}

.contact-form {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.contact-form input[type='email'] {
  padding: 0.875rem 1.25rem;
  border-radius: 0.5rem;
  font-family: var(--font-base);
  flex: 1;
  min-width: 250px;
  background: var(--bs-card-bg);
  color: var(--bs-body-color);
  border: 1px solid var(--bs-border-color);
  font-size: 1rem;
  transition: all 0.2s ease;
}

.contact-form input[type='email']:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.2);
}

.contact-form input[type='email']::placeholder {
  color: var(--bs-secondary-color);
}

.contact-form button {
  white-space: nowrap;
}

.contact-form button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.contact-message {
  margin-top: 1rem;
  font-size: 0.95rem;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  padding: 2.5rem 0;
}

[data-bs-theme="dark"] .footer {
  background: #050506;
  border-top: 1px solid rgba(255,255,255,0.06);
}

[data-bs-theme="light"] .footer {
  background: #f3f3f6;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--bs-body-color);
}

.footer-brand .brand-logo {
  width: 20px;
  height: 20px;
  filter: var(--brand-filter);
  border-radius: 4px;
}

.footer-content p {
  margin: 0;
  color: var(--bs-secondary-color);
  font-size: 0.9rem;
}

.social-icons {
  display: flex;
  gap: 1rem;
}

.social-icons a {
  color: var(--bs-secondary-color);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(var(--accent-rgb), 0.05);
  border: 1px solid var(--bs-border-color);
}

.social-icons a:hover {
  background: rgba(var(--accent-rgb), 0.15);
  border-color: var(--accent);
}

.social-icons img {
  width: 18px;
  height: 18px;
  display: block;
  filter: var(--brand-filter);
  opacity: 0.8;
}

.social-icons a:hover img {
  opacity: 1;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 960px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }

  .hero-text {
    max-width: none;
    width: 100%;
  }

  .hero-text h1 {
    font-size: 2.4rem;
  }

  .hero-chart {
    max-width: 400px;
    width: 100%;
  }

  .bots-wrapper {
    grid-template-columns: 1fr;
  }

  .bots-info .section-title {
    text-align: center;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .nav-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .nav-links {
    flex-wrap: wrap;
    gap: 1rem;
    width: 100%;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .section {
    padding: 3.5rem 0;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .contact-form {
    flex-direction: column;
  }

  .contact-form input[type='email'] {
    width: 100%;
  }
}

/* ============================================
   Prism Code Theme Override
   ============================================ */
[data-bs-theme="dark"] .code-sample code[class*="language-"],
[data-bs-theme="dark"] .code-sample pre[class*="language-"] {
  background: transparent;
  text-shadow: none;
}

[data-bs-theme="light"] .code-sample {
  background: #1e1e2e;
}
