/* QDUX CSS Design System - Modern Glassmorphic Developer Theme */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Color Palette - Cyberpunk / Slate Fusion */
  --bg-base: #0b0f19;
  --bg-surface: rgba(17, 24, 39, 0.7);
  --bg-surface-solid: #111827;
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-glass-hover: rgba(255, 255, 255, 0.15);
  
  --primary-gradient: linear-gradient(135deg, #06b6d4 0%, #6366f1 100%);
  --accent-cyan: #06b6d4;
  --accent-indigo: #6366f1;
  --accent-purple: #a855f7;
  --accent-green: #10b981;
  --accent-amber: #f59e0b;
  --accent-red: #ef4444;

  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  --shadow-neon: 0 0 25px rgba(6, 182, 212, 0.15);
  --shadow-purple: 0 0 25px rgba(99, 102, 241, 0.15);

  --scrollbar-thumb: rgba(255, 255, 255, 0.15);
  --scrollbar-track: rgba(0, 0, 0, 0.2);

  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
  scrollbar-width: thin;
  
  color-scheme: dark;
}

/* Base Settings */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Custom Scrollbars fallback for older WebKit browsers */
@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  ::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
  }
  ::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
  }
  ::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
  }
}

/* Background glows */
.glow-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 900px;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.glow-circle-1 {
  position: absolute;
  top: -10%;
  left: 10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
  filter: blur(80px);
  animation: float 20s infinite alternate;
}

.glow-circle-2 {
  position: absolute;
  top: 15%;
  right: 5%;
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, rgba(0, 0, 0, 0) 70%);
  filter: blur(80px);
  animation: float 15s infinite alternate-reverse;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(5%, 8%) scale(1.1); }
}

/* Layout Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Glassmorphism utility */
.glass {
  background: var(--bg-surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass);
  border-radius: 16px;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 72px;
  z-index: 100;
  border-bottom: 1px solid var(--border-glass);
  background: rgba(11, 15, 25, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.navbar .container {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.05em;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo span {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border-glass);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  background: rgba(255,255,255,0.02);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--primary-gradient);
  color: #fff;
  border: none;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
}

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

/* Hero Section */
.hero {
  padding-top: 140px;
  padding-bottom: 80px;
  text-align: center;
  position: relative;
}

.badge-version {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.2);
  color: var(--accent-cyan);
  padding: 0.4rem 0.8rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 2rem;
  letter-spacing: 0.02em;
}

.badge-version::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

.hero h1 {
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero h1 span {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 750px;
  margin: 0 auto 2.5rem auto;
  line-height: 1.6;
  font-weight: 400;
}

.hero-ctas {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 4rem;
}

/* Terminal Simulator Window */
.terminal-wrapper {
  max-width: 960px;
  margin: 0 auto;
  perspective: 1000px;
}

.terminal-frame {
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 1px 1px var(--border-glass);
  overflow: hidden;
  text-align: left;
  transform: rotateX(2deg);
  transition: transform 0.5s ease;
}

.terminal-frame:hover {
  transform: rotateX(0deg) translateY(-5px);
}

.terminal-header {
  background: #181f30;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-glass);
}

.terminal-dots {
  display: flex;
  gap: 0.45rem;
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ef4444; }
.terminal-dot.yellow { background: #f59e0b; }
.terminal-dot.green { background: #10b981; }

.terminal-title {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 500;
}

.terminal-body {
  background: #0d121f;
  padding: 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.5;
  color: #a9b2c3;
  min-height: 380px;
  overflow-x: auto;
  position: relative;
}

/* Terminal tabs */
.terminal-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid var(--border-glass);
}

.tab-btn {
  background: none;
  border: none;
  border-right: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 0.75rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  background: rgba(255,255,255,0.02);
  color: var(--text-primary);
}

.tab-btn.active {
  background: #0d121f;
  color: var(--accent-cyan);
  border-bottom: 1px solid #0d121f;
  font-weight: 600;
}

/* Terminal Content Screens */
.terminal-screen {
  display: none;
}

.terminal-screen.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

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

/* TUI elements styling */
.tui-header {
  background: #313244;
  color: #cdd6f4;
  padding: 0.2rem 0.5rem;
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: space-between;
}
.tui-footer {
  background: #313244;
  color: #a6e3a1;
  padding: 0.2rem 0.5rem;
  margin-top: 0.75rem;
  display: flex;
  justify-content: space-between;
}

.tui-accent { color: var(--accent-cyan); }
.tui-dir { color: #89b4fa; font-weight: 600; }
.tui-file { color: #cdd6f4; }
.tui-size-l { color: #f38ba8; font-weight: 600; }
.tui-size-m { color: #f9e2af; }
.tui-size-s { color: #a6e3a1; }
.tui-selected { background: rgba(137, 180, 250, 0.25); color: #fff; }
.tui-bar { color: #f38ba8; }
.tui-bar-used { background-color: #89b4fa; display: inline-block; height: 10px; }

/* Features Grid */
.features {
  padding: 80px 0;
  position: relative;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 3.5rem;
}

.section-title span {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.feature-card {
  padding: 2.25rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.05) 0%, rgba(99, 102, 241, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 0;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-neon);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card * {
  position: relative;
  z-index: 1;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(6, 182, 212, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--accent-cyan);
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Architecture pipeline section */
.architecture {
  padding: 80px 0;
  background: rgba(17, 24, 39, 0.4);
  border-top: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
}

.arch-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 3.5rem;
  position: relative;
}

.arch-card {
  padding: 1.5rem;
  background: #111827;
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  text-align: center;
  position: relative;
}

.arch-step-num {
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary-gradient);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #fff;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

.arch-card h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.arch-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Keyboard Shortcuts Section */
.shortcuts-section {
  padding: 80px 0;
}

.search-box {
  max-width: 600px;
  margin: 0 auto 2.5rem auto;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 1.1rem 1.5rem 1.1rem 3.5rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-glass);
  border-radius: 9999px;
  color: var(--text-primary);
  font-size: 1.05rem;
  font-family: var(--font-sans);
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: var(--shadow-neon);
  background: rgba(255,255,255,0.05);
}

.search-icon {
  position: absolute;
  left: 1.4rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

/* Chips Filter */
.filter-chips {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.chip {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-glass);
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.chip:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
}

.chip.active {
  background: var(--accent-cyan);
  color: #0b0f19;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.3);
}

/* Shortcuts Grid */
.shortcuts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.shortcut-card {
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(17, 24, 39, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.shortcut-card:hover {
  border-color: var(--border-glass-hover);
  background: rgba(17, 24, 39, 0.6);
}

.key-badge {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  background: #1f2937;
  border: 1px solid rgba(255,255,255,0.12);
  border-bottom: 2px solid rgba(255,255,255,0.2);
  color: #fff;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.shortcut-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-align: right;
  flex: 1;
  padding-right: 1rem;
}

/* Installation Guide / Code Blocks */
.install-section {
  padding: 80px 0;
  background: rgba(17, 24, 39, 0.4);
  border-top: 1px solid var(--border-glass);
}

.code-tabs-header {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-glass);
  margin-bottom: 1.5rem;
}

.code-tab-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
  position: relative;
  transition: color 0.2s ease;
}

.code-tab-btn:hover {
  color: var(--text-primary);
}

.code-tab-btn.active {
  color: var(--accent-cyan);
}

.code-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
}

.code-block-wrapper {
  position: relative;
}

.code-block {
  background: #090d16;
  border: 1px solid var(--border-glass);
  border-radius: 12px;
  padding: 1.5rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: #c9d1d9;
  line-height: 1.6;
}

.copy-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background: rgba(255,255,255,0.1);
  color: var(--text-primary);
}

/* Code Highlights */
.hl-comment { color: #6a737d; }
.hl-keyword { color: #ff7b72; }
.hl-string { color: #a5d6ff; }
.hl-var { color: #ffa657; }

/* Footer */
.footer {
  border-top: 1px solid var(--border-glass);
  padding: 40px 0;
  background: #090c15;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer p {
  margin-bottom: 0.75rem;
}

.footer a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: var(--accent-cyan);
}

/* Responsive queries */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.75rem;
  }
  .hero p {
    font-size: 1.1rem;
  }
  .navbar .nav-links {
    display: none;
  }
  .features-grid {
    grid-template-columns: 1fr;
  }
}
