/* ==========================================================================
   llm-wiki-loop Ultra-Premium Showcase Design System
   Aesthetics: Deep Space Dark Mode, Glassmorphism, Neon Cyan & Purple Glow,
   Dynamic Wheel Scroll Animations, Responsive Micro-Interactions.
   ========================================================================== */

:root {
  --bg-primary: #080b11;
  --bg-secondary: #0f1623;
  --bg-tertiary: #162032;
  --bg-card: rgba(18, 26, 43, 0.7);
  --bg-glass: rgba(255, 255, 255, 0.04);
  
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(0, 242, 254, 0.3);
  
  --accent-cyan: #00f2fe;
  --accent-blue: #4facfe;
  --accent-purple: #9b51e0;
  --accent-pink: #ff2a85;
  --accent-green: #00f5a0;
  
  --text-primary: #f0f6fc;
  --text-secondary: #8b949e;
  --text-muted: #484f58;
  
  --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Fira Code', 'JetBrains Mono', monospace;
  
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 30px rgba(0, 242, 254, 0.2);
  --shadow-purple: 0 0 30px rgba(155, 81, 224, 0.25);
  
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  scroll-behavior: smooth;
  font-family: var(--font-display);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
  background-image: 
    radial-gradient(circle at 20% 15%, rgba(0, 242, 254, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 80% 60%, rgba(155, 81, 224, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 50% 90%, rgba(0, 245, 160, 0.05) 0%, transparent 40%);
  background-attachment: fixed;
}

/* Background Grid Overlay */
.bg-grid {
  position: fixed;
  inset: 0;
  background-size: 50px 50px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  pointer-events: none;
  z-index: 0;
}

/* Container */
.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Header & Navbar
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(8, 11, 17, 0.8);
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 0;
  transition: var(--transition-normal);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 1.25rem;
}

.logo-badge {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  color: #000;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

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

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.nav-link:hover {
  color: var(--accent-cyan);
}

.btn-github {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition-normal);
}

.btn-github:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 242, 254, 0.3);
  transform: translateY(-2px);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  padding: 90px 0 60px;
  text-align: center;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(0, 242, 254, 0.08);
  border: 1px solid rgba(0, 242, 254, 0.25);
  border-radius: var(--radius-full);
  color: var(--accent-cyan);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 24px;
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.15);
}

.badge-tag span.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 0%, var(--accent-cyan) 50%, var(--accent-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 780px;
  margin: 0 auto 36px;
  font-weight: 400;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 50px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #040914;
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  box-shadow: 0 0 25px rgba(0, 242, 254, 0.4);
  transition: var(--transition-normal);
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 0 35px rgba(0, 242, 254, 0.6);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  backdrop-filter: blur(8px);
  transition: var(--transition-normal);
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
}

/* ==========================================================================
   Interactive Terminal Demo
   ========================================================================== */
.terminal-wrapper {
  max-width: 820px;
  margin: 0 auto 80px;
  background: #0d1117;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), var(--shadow-glow);
  overflow: hidden;
  text-align: left;
  position: relative;
}

.terminal-header {
  background: #161b22;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

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

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-copy-term {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.btn-copy-term:hover {
  color: var(--accent-cyan);
}

.terminal-body {
  padding: 24px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  line-height: 1.7;
}

.term-line {
  margin-bottom: 8px;
}

.prompt-sym {
  color: var(--accent-pink);
  font-weight: 700;
  margin-right: 8px;
}

.term-cmd {
  color: var(--text-primary);
}

.term-cursor {
  display: inline-block;
  width: 8px;
  height: 16px;
  background: var(--accent-cyan);
  vertical-align: middle;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.term-output {
  color: var(--text-secondary);
}

.term-output .success {
  color: var(--accent-green);
  font-weight: 600;
}

.term-output .accent {
  color: var(--accent-cyan);
}

/* ==========================================================================
   Interactive 3D-Wheel Scroll Section
   ========================================================================== */
.wheel-section {
  padding: 80px 0;
  position: relative;
}

.section-head {
  text-align: center;
  margin-bottom: 50px;
}

.section-head h2 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.section-head p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.wheel-container {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 48px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
}

.wheel-nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wheel-step {
  padding: 20px 24px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: var(--transition-normal);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.wheel-step:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.wheel-step.active {
  background: rgba(0, 242, 254, 0.06);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 20px rgba(0, 242, 254, 0.15);
}

.wheel-step:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
  border-color: var(--accent-cyan);
}

.step-num {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-cyan);
  background: rgba(0, 242, 254, 0.1);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.step-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.step-content p {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.wheel-display {
  background: #090e17;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.wheel-display::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 242, 254, 0.05) 0%, transparent 60%);
  pointer-events: none;
}

.display-card {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.display-card.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.card-badge {
  display: inline-block;
  padding: 4px 10px;
  background: rgba(155, 81, 224, 0.15);
  border: 1px solid var(--accent-purple);
  border-radius: var(--radius-sm);
  color: var(--accent-purple);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.display-card h4 {
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.code-preview {
  background: #04070d;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #a5d6ff;
  margin-top: 14px;
  white-space: pre-wrap;
}

/* ==========================================================================
   Multi-Agent Ecosystem Grid
   ========================================================================== */
.ecosystem-section {
  padding: 80px 0;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.eco-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 32px;
  transition: var(--transition-normal);
  backdrop-filter: blur(10px);
}

.eco-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-cyan);
  box-shadow: 0 10px 30px rgba(0, 242, 254, 0.15);
}

.eco-icon {
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.eco-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.eco-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.eco-card .badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent-green);
  background: rgba(0, 245, 160, 0.1);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 50px 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.footer a {
  color: var(--accent-cyan);
  text-decoration: none;
}

/* Responsive */
@media (max-width: 900px) {
  .wheel-container {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
}
