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

:root {
  --background: #0a0a0a;
  --foreground: #ffffff;
  --muted: #222222;
  --muted-foreground: #aaaaaa;
  --primary: #ff5555;
  --primary-hover: #e04444;
  --secondary: #3a86ff;
  --secondary-hover: #2a76ef;
  --accent: #8338ec;
  --border: #333333;
  --radius: 0.5rem;
  --transition-slow: 0.5s cubic-bezier(0.19, 1, 0.22, 1);
  --transition-medium: 0.3s cubic-bezier(0.19, 1, 0.22, 1);
  --transition-fast: 0.15s cubic-bezier(0.19, 1, 0.22, 1);
}

.light {
  --background: #ffffff;
  --foreground: #111111;
  --muted: #f5f5f5;
  --muted-foreground: #666666;
  --primary: #ff5555;
  --primary-hover: #e04444;
  --secondary: #3a86ff;
  --secondary-hover: #2a76ef;
  --accent: #8338ec;
  --border: #dddddd;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  overflow-x: hidden;
  transition: background-color var(--transition-medium), color var(--transition-medium);
  scroll-behavior: smooth;
}

body.transitions-enabled * {
  transition-property: background-color, color, transform, opacity, box-shadow, border-color;
  transition-duration: var(--transition-medium);
}

.font-orbitron {
  font-family: 'Orbitron', sans-serif;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Custom Context Menu */
.context-menu {
  position: fixed;
  z-index: 1000;
  background-color: #111;
  border: 1px solid #333;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: scale(0.95);
  transform-origin: top left;
  pointer-events: none;
  transition: opacity 0.1s, transform 0.1s;
}

.context-menu.visible {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.context-menu-item {
  padding: 8px 12px;
  cursor: pointer;
  color: #eee;
  font-size: 14px;
  transition: background-color 0.2s;
  white-space: nowrap;
}

.context-menu-item:hover {
  background-color: #222;
}

/* Background Effects */
.background-effects {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.background-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  animation: pulse-glow 12s ease-in-out infinite;
}

@keyframes pulse-glow {
  0% {
    transform: scale(1) translate(0, 0);
    opacity: 0.15;
  }
  33% {
    transform: scale(1.2) translate(5%, 2%);
    opacity: 0.25;
  }
  66% {
    transform: scale(1.1) translate(-3%, -2%);
    opacity: 0.2;
  }
  100% {
    transform: scale(1) translate(0, 0);
    opacity: 0.15;
  }
}

.light .background-glow {
  filter: blur(150px);
  opacity: 0.1;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background-color: var(--primary);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  animation: float-up 4s ease-out forwards;
}

@keyframes float-up {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.8;
  }
  100% {
    transform: translateY(-100px) rotate(360deg);
    opacity: 0;
  }
}

/* Status Banner */
.status-banner {
  background-color: rgba(255, 85, 85, 0.2);
  border-bottom: 1px solid rgba(255, 85, 85, 0.5);
  padding: 0.6rem 0;
  transition: all 0.3s ease;
}

.banner-container {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  position: relative;
}

.dismiss-banner {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

.dismiss-banner:hover {
  color: white;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background-color: rgba(10, 10, 10, 0.75);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  transition: all var(--transition-medium);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.navbar:hover {
  background-color: rgba(10, 10, 10, 0.85);
}

.light .navbar {
  background-color: rgba(255, 255, 255, 0.75);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.light .navbar:hover {
  background-color: rgba(255, 255, 255, 0.9);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--foreground);
  position: relative;
  transition: transform var(--transition-fast);
}

.logo:hover {
  transform: translateY(-2px);
}

.logo-img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
  box-shadow: 0 4px 15px rgba(255, 85, 85, 0.3);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-medium);
}

.logo:hover .logo-img {
  border-radius: 14px;
  box-shadow: 0 8px 25px rgba(255, 85, 85, 0.4);
}

.logo-img::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: 0.5s;
}

.logo:hover .logo-img::after {
  left: 100%;
}

.nav-links {
  display: none;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
    gap: 1.5rem;
  }
}

.nav-link {
  color: var(--muted-foreground);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all var(--transition-medium);
  position: relative;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  letter-spacing: 0.02em;
}

.nav-link:hover {
  color: var(--foreground);
  background-color: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.light .nav-link:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: all var(--transition-medium);
  transform: translateX(-50%);
  opacity: 0;
}

.nav-link:hover::after {
  width: 80%;
  opacity: 1;
}

.nav-link.active {
  color: var(--foreground);
  background-color: rgba(255, 85, 85, 0.1);
}

.nav-link.active::after {
  width: 80%;
  opacity: 1;
}

.mobile-menu-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  color: var(--foreground);
  cursor: pointer;
  font-size: 1.5rem;
}

@media (min-width: 768px) {
  .mobile-menu-button {
    display: none;
  }
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--background);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
}

.mobile-menu.open {
  transform: translateX(0);
}

.mobile-menu-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--foreground);
  font-size: 1.5rem;
  cursor: pointer;
}

.mobile-nav-link {
  color: var(--foreground);
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 500;
  transition: color 0.2s;
}

.mobile-nav-link:hover {
  color: var(--primary);
}

.theme-toggle {
  padding: 0.5rem;
  background-color: var(--muted);
  border: none;
  border-radius: 0.25rem;
  color: var(--foreground);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.theme-toggle:hover {
  background-color: var(--border);
}

/* Hero Section */
.hero {
  padding: 6rem 0 8rem;
  overflow: hidden;
  position: relative;
  background: radial-gradient(circle at 70% 30%, rgba(255, 85, 85, 0.08) 0%, transparent 70%);
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.hero-content h1 {
  font-size: 3.5rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  font-weight: 700;
  background: linear-gradient(to right, var(--foreground), rgba(255, 255, 255, 0.8));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: transparent;
  animation: text-shimmer 3s infinite;
}

@keyframes text-shimmer {
  0% {
    background-position: -100% 50%;
  }
  100% {
    background-position: 200% 50%;
  }
}

@media (min-width: 768px) {
  .hero h1 {
    font-size: 4rem;
  }
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-medium);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.03em;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: var(--transition-slow);
}

.button:hover::before {
  left: 100%;
}

.ripple-effect {
  position: absolute;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

.button-icon {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-medium);
}

.button:hover .button-icon {
  transform: rotate(10deg) scale(1.1);
}

.button-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
}

.button-primary:hover {
  box-shadow: 0 8px 25px rgba(255, 85, 85, 0.4);
  transform: translateY(-3px);
}

.button-secondary {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-hover));
  color: white;
}

.button-secondary:hover {
  box-shadow: 0 8px 25px rgba(58, 134, 255, 0.3);
  transform: translateY(-3px);
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

@media (min-width: 640px) {
  .hero-buttons {
    flex-direction: row;
  }
}

/* Features Section */
.features {
  padding: 6rem 0;
  background-color: var(--background);
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-description {
  font-size: 1.1rem;
  color: var(--muted-foreground);
  max-width: 600px;
  margin: 0 auto;
}

.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.feature-card {
  background-color: rgba(34, 34, 34, 0.5);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.light .feature-card {
  background-color: rgba(245, 245, 245, 0.7);
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 0;
  background: linear-gradient(to bottom, var(--primary), var(--accent));
  transition: height var(--transition-medium);
}

.feature-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  border-color: rgba(255, 85, 85, 0.3);
}

.feature-card:hover::before {
  height: 100%;
}

.light .feature-card:hover {
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.feature-icon {
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.feature-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.feature-description {
  color: var(--muted-foreground);
  font-size: 0.95rem;
}

/* Command Playground */
.playground {
  padding: 6rem 0;
  background-color: var(--background);
  position: relative;
}

.playground-container {
  max-width: 800px;
  margin: 0 auto;
  background-color: var(--muted);
  border-radius: var(--radius);
  overflow: hidden;
}

.playground-header {
  background-color: rgba(0, 0, 0, 0.2);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.playground-title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--foreground);
}

.playground-content {
  padding: 1rem;
  height: 400px;
  overflow-y: auto;
}

.command-input-container {
  display: flex;
  border-top: 1px solid var(--border);
  padding: 1rem;
}

.command-input {
  flex: 1;
  background-color: rgba(0, 0, 0, 0.2);
  border: none;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  color: var(--foreground);
  font-family: inherit;
}

.command-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--primary);
}

.command-bot {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.bot-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  color: white;
  flex-shrink: 0;
}

.bot-message {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius);
  padding: 1rem;
  flex: 1;
}

.bot-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.bot-name {
  font-weight: 600;
}

.bot-badge {
  background-color: var(--primary);
  color: white;
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
}

.bot-content {
  color: var(--muted-foreground);
  font-size: 0.95rem;
}

.bot-content p {
  margin-bottom: 0.75rem;
}

.bot-content p:last-child {
  margin-bottom: 0;
}

.bot-content ul, .bot-content ol {
  margin-bottom: 0.75rem;
  padding-left: 1.5rem;
}

.bot-content code {
  background-color: rgba(0, 0, 0, 0.3);
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-family: monospace;
  font-size: 0.9em;
}

.command-user {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  justify-content: flex-end;
}

.user-message {
  background-color: var(--primary);
  color: white;
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  max-width: 80%;
}

/* Footer */
.footer {
  padding: 4rem 0;
  background-color: var(--muted);
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-content {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-logo {
  display: flex;
  align-items: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-link-group {
  min-width: 120px;
}

.footer-link-title {
  font-weight: 600;
  margin-bottom: 1rem;
}

.footer-link-list {
  list-style: none;
}

.footer-link {
  display: block;
  color: var(--muted-foreground);
  text-decoration: none;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--foreground);
}

.footer-bottom {
  margin-top: 4rem;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 0.9rem;
}

/* Animations */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.19, 1, 0.22, 1), transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
  will-change: opacity, transform;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.8s cubic-bezier(0.19, 1, 0.22, 1), transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.fade-in-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-in-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.8s cubic-bezier(0.19, 1, 0.22, 1), transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.fade-in-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.8s cubic-bezier(0.19, 1, 0.22, 1), transform 0.8s cubic-bezier(0.19, 1, 0.22, 1);
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.pop-in {
  animation: popIn 0.3s forwards;
}

/* Improvements */
.feature-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--border);
}

.feature-description {
  flex-grow: 1;
}

.button {
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.button-primary {
  text-transform: uppercase;
  font-size: 0.9rem;
}

/* Dark mode improvements */
.dark-mode-toggle {
  position: relative;
  width: 60px;
  height: 30px;
  border-radius: 15px;
  background-color: var(--muted);
  cursor: pointer;
  overflow: hidden;
}

.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--primary);
  transition: transform 0.3s;
}

.light .toggle-thumb {
  transform: translateX(30px);
}

/* Responsive improvements */
@media (max-width: 640px) {
  .section-title {
    font-size: 2rem;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
}

/* Accessibility improvements */
:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary);
  color: white;
  padding: 8px;
  z-index: 100;
  transition: top var(--transition-medium);
}

.skip-link:focus {
  top: 0;
}

/* Loading animation */
.loading {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
}

.loading div {
  position: absolute;
  border: 4px solid var(--primary);
  opacity: 1;
  border-radius: 50%;
  animation: loading 1s cubic-bezier(0, 0.2, 0.8, 1) infinite;
}

.loading div:nth-child(2) {
  animation-delay: -0.5s;
}

@keyframes loading {
  0% {
    top: 36px;
    left: 36px;
    width: 0;
    height: 0;
    opacity: 1;
  }
  100% {
    top: 0px;
    left: 0px;
    width: 72px;
    height: 72px;
    opacity: 0;
  }
}
