/* ===== Variables ===== */
:root {
  --bg: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --border: #2a2a3a;
  --border-light: #353548;
  --text: #e4e4ed;
  --text-secondary: #9898ab;
  --text-muted: #6b6b80;
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --primary-glow: rgba(99, 102, 241, 0.15);
  --green: #10b981;
  --green-glow: rgba(16, 185, 129, 0.15);
  --red: #ef4444;
  --orange: #f97316;
  --yellow: #eab308;
  --cyan: #06b6d4;
  --pink: #ec4899;
  --purple: #a855f7;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

/* ===== Container ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

.feature-card,
.tech-card,
.install-card,
.os-card,
.stat {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Badge ===== */
.badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--primary-glow);
  color: var(--primary-light);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
  background: var(--primary-light);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.4);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--border-light);
  background: var(--bg-card);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary-light);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.85rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-icon {
  width: 18px;
  height: 18px;
}

.btn-icon-right {
  width: 18px;
  height: 18px;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  transition: all 0.3s ease;
  background: transparent;
}

.navbar.scrolled {
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
}

.logo-icon {
  width: 28px;
  height: 28px;
  color: var(--primary-light);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: color var(--transition);
}

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

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
}

.mobile-toggle svg {
  width: 24px;
  height: 24px;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 160px 0 80px;
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, rgba(99, 102, 241, 0.12), transparent),
    radial-gradient(ellipse 40% 40% at 70% 10%, rgba(168, 85, 247, 0.08), transparent);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  margin: 24px 0;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary-light), var(--purple), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  margin-top: 64px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* ===== Terminal ===== */
.terminal-section {
  padding: 0 0 80px;
}

.terminal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 700px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--border);
}

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

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

.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }

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

.terminal-body {
  padding: 20px 24px;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.85rem;
  line-height: 1.8;
}

.term-prompt {
  color: var(--green);
  font-weight: 700;
}

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

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

.term-success {
  color: var(--green);
}

.term-comment {
  color: var(--text-muted);
}

/* ===== Section Header ===== */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  margin: 16px 0 12px;
}

.section-header p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ===== Features ===== */
.features-section {
  padding: 80px 0;
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
}

.feature-icon-blue {
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary-light);
}

.feature-icon-purple {
  background: rgba(168, 85, 247, 0.12);
  color: var(--purple);
}

.feature-icon-green {
  background: rgba(16, 185, 129, 0.12);
  color: var(--green);
}

.feature-icon-orange {
  background: rgba(249, 115, 22, 0.12);
  color: var(--orange);
}

.feature-icon-red {
  background: rgba(239, 68, 68, 0.12);
  color: var(--red);
}

.feature-icon-cyan {
  background: rgba(6, 182, 212, 0.12);
  color: var(--cyan);
}

.feature-icon-pink {
  background: rgba(236, 72, 153, 0.12);
  color: var(--pink);
}

.feature-icon-yellow {
  background: rgba(234, 179, 8, 0.12);
  color: var(--yellow);
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

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

/* ===== OS Support ===== */
.os-section {
  padding: 80px 0;
}

.os-grid {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.os-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s ease;
  min-width: 160px;
}

.os-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
}

.os-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.os-icon svg {
  width: 32px;
  height: 32px;
}

.os-icon-windows { color: #0078d4; }
.os-icon-linux { color: #e9b200; }
.os-icon-fedora { color: #51a2da; }
.os-icon-arch { color: #1793d1; }
.os-icon-android { color: #3ddc84; }

.os-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.os-detail {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ===== Tech Stack ===== */
.tech-section {
  padding: 80px 0;
}

.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.tech-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.3s ease;
}

.tech-card:hover {
  border-color: var(--border-light);
}

.tech-category {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

.tech-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tech-tag {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.tech-tag:hover {
  border-color: var(--primary);
  color: var(--primary-light);
  background: var(--primary-glow);
}

/* ===== Networking ===== */
.network-section {
  padding: 80px 0;
}

.network-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.network-info h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  margin: 16px 0 12px;
}

.network-info p {
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.network-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.network-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.check-icon {
  width: 20px;
  height: 20px;
  color: var(--green);
  flex-shrink: 0;
  margin-top: 2px;
}

.network-list strong {
  color: var(--text);
}

.network-list div {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.5;
}

.network-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.net-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.net-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 16px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.net-node svg {
  width: 32px;
  height: 32px;
}

.net-node span {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.net-host {
  border-color: var(--primary);
  background: var(--primary-glow);
}

.net-host svg {
  color: var(--primary-light);
}

.net-host span {
  color: var(--primary-light);
}

.net-lines {
  display: flex;
  gap: 60px;
  padding: 0 20px;
}

.net-line {
  width: 2px;
  height: 40px;
  background: linear-gradient(to bottom, var(--primary), var(--border));
}

.net-vms {
  display: flex;
  gap: 16px;
}

.net-vm {
  border-color: var(--green);
  background: var(--green-glow);
}

.net-vm svg {
  color: var(--green);
}

.net-vm span {
  color: var(--green);
}

/* ===== Install ===== */
.install-section {
  padding: 80px 0;
}

.install-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.install-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  transition: all 0.3s ease;
}

.install-card:hover {
  border-color: var(--border-light);
}

.install-card-featured {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(168, 85, 247, 0.04));
}

.install-card-featured:hover {
  border-color: var(--primary-light);
}

.install-badge {
  position: absolute;
  top: -10px;
  left: 20px;
  padding: 4px 12px;
  background: var(--primary);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.install-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.install-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 20px;
  line-height: 1.6;
}

.code-block {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.82rem;
  color: var(--green);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  overflow-x: auto;
}

.code-block code {
  line-height: 1.7;
}

.copy-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  flex-shrink: 0;
  transition: color var(--transition);
}

.copy-btn:hover {
  color: var(--text);
}

.copy-btn svg {
  width: 16px;
  height: 16px;
}

/* ===== API ===== */
.api-section {
  padding: 80px 0;
}

.api-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.api-info h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  margin: 16px 0 12px;
}

.api-info > p {
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.6;
}

.api-endpoints {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.endpoint {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.endpoint:hover {
  border-color: var(--border-light);
}

.method {
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.method-get {
  background: rgba(16, 185, 129, 0.15);
  color: var(--green);
}

.method-post {
  background: rgba(99, 102, 241, 0.15);
  color: var(--primary-light);
}

.method-ws {
  background: rgba(249, 115, 22, 0.15);
  color: var(--orange);
}

.endpoint-path {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* ===== CTA ===== */
.cta-section {
  padding: 80px 0;
}

.cta-content {
  text-align: center;
  padding: 64px 40px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(168, 85, 247, 0.06));
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-lg);
}

.cta-content h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 12px;
}

.cta-content p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 520px;
  margin: 0 auto 28px;
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding-top: 48px;
  margin-top: 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  padding-bottom: 32px;
}

.footer-brand {
  max-width: 320px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 64px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.footer-col a {
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--text);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 24px;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-bottom a {
  color: var(--text-secondary);
}

.footer-bottom a:hover {
  color: var(--text);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(16px);
    padding: 20px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--border);
  }

  .nav-links.active {
    display: flex;
  }

  .mobile-toggle {
    display: block;
  }

  .hero {
    padding: 120px 0 60px;
  }

  .hero-stats {
    gap: 20px;
  }

  .stat-divider {
    display: none;
  }

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

  .network-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .network-visual {
    order: -1;
  }

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

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

  .os-grid {
    justify-content: center;
  }

  .os-card {
    min-width: 140px;
  }

  .footer-content {
    flex-direction: column;
    gap: 32px;
  }

  .footer-links {
    gap: 40px;
  }

  .cta-content {
    padding: 40px 24px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn-lg {
    width: 100%;
    justify-content: center;
  }

  .net-vms {
    flex-direction: column;
    align-items: center;
  }

  .net-lines {
    flex-direction: column;
    gap: 0;
    align-items: center;
  }

  .net-line {
    width: 2px;
    height: 24px;
  }
}
