:root {
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.5);
  --secondary: #8b5cf6;
  --secondary-glow: rgba(139, 92, 246, 0.5);

  --bg-dark: #020617;
  --bg-card: rgba(15, 23, 42, 0.6);
  --bg-card-hover: rgba(30, 41, 59, 0.8);

  --text-main: #f8fafc;
  --text-muted: #94a3b8;

  --glass-border: rgba(255, 255, 255, 0.1);
  --ai-gradient: linear-gradient(135deg, var(--primary), var(--secondary));
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
}

[data-theme="light"] {
  --bg-dark: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.7);
  --bg-card-hover: rgba(255, 255, 255, 0.9);

  --text-main: #0f172a;
  --text-muted: #475569;

  --glass-border: rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.text-gradient {
  background: var(--ai-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -3;
  pointer-events: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--ai-gradient);
  border-radius: 10px;
}

/* Glassmorphism */
.glass {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.glass::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(transparent,
      var(--primary),
      transparent,
      var(--secondary),
      transparent);
  animation: rotate-border 4s linear infinite;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.glass:hover::before {
  opacity: 0.3;
}

@keyframes rotate-border {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.glass:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-5px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 28px;
  font-family: var(--font-heading);
  font-weight: 600;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  outline: none;
}

.btn-primary {
  background: var(--ai-gradient);
  color: #fff;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
  box-shadow: 0 6px 25px var(--secondary-glow);
  transform: translateY(-2px);
  animation: neon-pulse 1.5s infinite;
}

@keyframes neon-pulse {
  0% { box-shadow: 0 0 5px var(--primary-glow); }
  50% { box-shadow: 0 0 20px var(--secondary-glow); }
  100% { box-shadow: 0 0 5px var(--primary-glow); }
}

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

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Header */
header {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 20px 0;
  transition: all 0.3s ease;
}

header.scrolled {
  padding: 15px 0;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo span { color: var(--primary); }

nav ul {
  display: flex;
  gap: 30px;
  list-style: none;
}

nav ul li a {
  font-weight: 500;
  font-size: 15px;
  color: var(--text-muted);
}

nav ul li a:hover,
nav ul li a.active {
  color: var(--text-main);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.theme-toggle {
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 20px;
  cursor: pointer;
}

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

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  opacity: 0.4;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--bg-dark));
  z-index: -1;
}

.hero-content {
  max-width: 800px;
  text-align: center;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero h1 {
  font-size: 64px;
  margin-bottom: 24px;
  letter-spacing: -1px;
}

.hero p {
  font-size: 20px;
  color: var(--text-muted);
  margin-bottom: 40px;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
}

/* Section Common */
section {
  padding: 100px 0;
  position: relative;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 60px;
}

.section-header h2 {
  font-size: 40px;
  margin-bottom: 16px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 18px;
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.feature-card {
  padding: 40px 30px;
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: rgba(59, 130, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--primary);
  margin-bottom: 24px;
}

.feature-card h3 {
  font-size: 22px;
  margin-bottom: 12px;
}

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

/* AEO Section */
.aeo-section .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.aeo-image {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.aeo-image img {
  width: 100%;
  border-radius: 24px;
  display: block;
}

.aeo-image::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  pointer-events: none;
}

.aeo-content h2 {
  font-size: 48px;
  margin-bottom: 24px;
}

.aeo-content p {
  color: var(--text-muted);
  font-size: 18px;
  margin-bottom: 30px;
}

.check-list {
  list-style: none;
  margin-bottom: 40px;
}

.check-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
  font-size: 16px;
  color: var(--text-main);
}

.check-list li i { color: var(--primary); }

/* Visibility Score Tool */
.score-tool {
  background: var(--ai-gradient);
  border-radius: 30px;
  padding: 80px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.score-tool::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
  animation: rotateGlow 20s linear infinite;
  pointer-events: none;
}

@keyframes rotateGlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.score-tool h2 {
  color: #fff;
  font-size: 40px;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.score-tool p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 18px;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}

.score-form {
  display: flex;
  gap: 15px;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.score-form input {
  padding: 16px 24px;
  width: 300px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  font-family: var(--font-body);
  font-size: 16px;
  outline: none;
}

.score-form input::placeholder { color: rgba(255, 255, 255, 0.5); }

.score-form button {
  background: #fff;
  color: var(--text-main);
  padding: 16px 36px;
}

.score-form button:hover {
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Floating AI Chatbot */
.ai-chatbot {
  position: fixed;
  bottom: 40px;
  right: 40px;
  z-index: 1000;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 15px;
  animation: bounce 2s infinite;
}

.ai-chatbot-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px var(--primary-glow);
  overflow: hidden;
}

.ai-chatbot-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ai-chatbot-text {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  padding: 10px 20px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

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

/* Chat window */
.chat-window {
  position: fixed;
  bottom: 110px;
  right: 40px;
  width: 380px;
  max-width: calc(100vw - 80px);
  height: 500px;
  max-height: calc(100vh - 150px);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  animation: slide-up 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-header {
  padding: 20px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header-info { display: flex; align-items: center; gap: 12px; }

.chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--primary);
  background: var(--bg-card);
}

.chat-header h4 { font-size: 16px; margin: 0; }
.chat-header p { font-size: 11px; color: var(--text-muted); margin: 0; display: flex; align-items: center; gap: 5px; }

.online-indicator {
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 5px #10b981;
}

.chat-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}

.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.message {
  padding: 12px 16px;
  border-radius: 18px;
  max-width: 85%;
  font-size: 14px;
  line-height: 1.4;
}

.ai-message {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--glass-border);
  border-bottom-left-radius: 2px;
}

.user-message {
  align-self: flex-end;
  background: var(--ai-gradient);
  color: #fff;
  border-bottom-right-radius: 2px;
}

.chat-input-area {
  padding: 15px 20px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  gap: 10px;
}

.chat-input-area input {
  flex: 1;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 10px 15px;
  color: #fff;
  font-size: 14px;
  outline: none;
}

.btn-send {
  background: var(--primary);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.btn-send:hover { transform: scale(1.1); }

/* Scan Interaction */
.scan-line {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 2px;
  background: var(--ai-gradient);
  box-shadow: 0 0 15px var(--primary-glow);
  animation: scan-move 4s linear infinite;
  z-index: 10;
}

@keyframes scan-move {
  0%, 100% { top: 0; }
  50% { top: 100%; }
}

.pulse {
  animation: pulse-ring 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(1.2); opacity: 0; }
}

/* Footer */
footer {
  padding: 60px 0 30px;
  border-top: 1px solid var(--glass-border);
  margin-top: 100px;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}

.footer-logo {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 20px;
}

.footer-desc {
  color: var(--text-muted);
  max-width: 300px;
  margin-bottom: 24px;
}

.footer-links h4 { font-size: 18px; margin-bottom: 20px; }
.footer-links ul { list-style: none; }
.footer-links ul li { margin-bottom: 12px; }
.footer-links ul li a { color: var(--text-muted); }
.footer-links ul li a:hover { color: var(--primary); }

.footer-bottom {
  text-align: center;
  color: var(--text-muted);
  padding-top: 30px;
  border-top: 1px solid var(--glass-border);
  font-size: 14px;
}

/* Responsive */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .aeo-section .container { grid-template-columns: 1fr; }
  .hero h1 { font-size: 52px; }
}

@media (max-width: 768px) {
  .features-grid { grid-template-columns: 1fr; }
  .score-form { flex-direction: column; align-items: center; }
  .score-form input { width: 100%; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  nav ul { display: none; }
}

@media (max-width: 480px) {
  .footer-top { grid-template-columns: 1fr; }
  .hero h1 { font-size: 40px; }
}

/* Chat Suggestions */
.chat-suggestions {
  padding: 0 20px 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.suggestion-chip {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.suggestion-chip:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px var(--primary-glow);
}