/* ==========================================================================
   greenpng High-Tech Cyber Design System (main.css)
   ========================================================================== */

:root {
  --bg-dark: #050811;
  --bg-card: rgba(13, 20, 36, 0.72);
  --bg-card-hover: rgba(18, 28, 50, 0.85);
  --bg-surface: #0a101d;
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-glow: rgba(0, 255, 136, 0.3);
  --border-cyan: rgba(0, 229, 255, 0.3);

  --neon-green: #00ff88;
  --neon-green-dim: rgba(0, 255, 136, 0.15);
  --neon-green-glow: 0 0 25px rgba(0, 255, 136, 0.4);
  --cyber-cyan: #00e5ff;
  --cyber-cyan-dim: rgba(0, 229, 255, 0.15);
  --electric-purple: #a855f7;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --text-green: #00ff88;
  --text-cyan: #38bdf8;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', ui-monospace, Menlo, Consolas, monospace;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

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

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Interactive Cyber Particle Background */
#cyber-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  opacity: 0.65;
}

/* Global Ambient Gradients */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -2;
  background:
    radial-gradient(circle 800px at 15% 10%, rgba(0, 255, 136, 0.07) 0%, transparent 60%),
    radial-gradient(circle 900px at 85% 20%, rgba(0, 229, 255, 0.06) 0%, transparent 60%),
    radial-gradient(circle 1000px at 50% 80%, rgba(168, 85, 247, 0.04) 0%, transparent 70%);
}

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

/* Typography Helpers */
.mono {
  font-family: var(--font-mono);
}

.gradient-text {
  background: linear-gradient(135deg, #ffffff 20%, var(--neon-green) 70%, var(--cyber-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gradient-cyan {
  background: linear-gradient(135deg, #ffffff 20%, var(--cyber-cyan) 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(5, 8, 17, 0.8);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition-smooth);
}

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

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.brand-link img {
  height: 38px;
  width: auto;
}

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

.nav-menu a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition-fast);
  position: relative;
  padding: 6px 0;
}

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

.nav-menu a.active::after,
.nav-menu a:hover::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--neon-green);
  box-shadow: var(--neon-green-glow);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Language Toggle Switcher */
.lang-toggle {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full, 9999px);
  padding: 3px 6px;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  gap: 4px;
  transition: var(--transition-fast);
}

.lang-toggle:hover {
  border-color: var(--border-glow);
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 9999px;
  cursor: pointer;
  transition: var(--transition-fast);
}

.lang-btn.active {
  background: var(--neon-green);
  color: #050811;
  box-shadow: 0 0 12px rgba(0, 255, 136, 0.4);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-fast);
  border: 1px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, #00ff88 0%, #00c476 100%);
  color: #050811;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(0, 255, 136, 0.6);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

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

.btn-cyber {
  background: transparent;
  color: var(--cyber-cyan);
  border-color: var(--cyber-cyan);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.2);
}

.btn-cyber:hover {
  background: var(--cyber-cyan-dim);
  box-shadow: 0 0 25px rgba(0, 229, 255, 0.4);
}

/* Mobile Menu Button */
.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero-section {
  padding: 90px 0 80px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 50px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.25);
  border-radius: 9999px;
  color: var(--neon-green);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  margin-bottom: 24px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--neon-green);
  box-shadow: 0 0 10px var(--neon-green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(0, 255, 136, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 136, 0); }
}

.hero-title {
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero-desc {
  font-size: 1.18rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 580px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.stat-val {
  font-size: 1.75rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-main);
  display: block;
}

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

/* ==========================================================================
   Hero Interactive HUD Terminal
   ========================================================================== */
.terminal-card {
  background: var(--bg-card);
  border: 1px solid rgba(0, 255, 136, 0.25);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 255, 136, 0.1);
  transition: var(--transition-smooth);
}

.terminal-card:hover {
  border-color: rgba(0, 255, 136, 0.45);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(0, 255, 136, 0.2);
}

.terminal-header {
  background: rgba(10, 16, 29, 0.9);
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.tdot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.tdot.red { background: #ef4444; }
.tdot.yellow { background: #f59e0b; }
.tdot.green { background: #10b981; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-dim);
  letter-spacing: 0.06em;
}

.terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.signal-row {
  display: flex;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.05);
  align-items: center;
}

.signal-name {
  color: var(--text-muted);
}

.signal-status {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tag-badge {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.tag-ok {
  background: rgba(0, 255, 136, 0.15);
  color: var(--neon-green);
  border: 1px solid rgba(0, 255, 136, 0.3);
}

.tag-cyan {
  background: rgba(0, 229, 255, 0.15);
  color: var(--cyber-cyan);
  border: 1px solid rgba(0, 229, 255, 0.3);
}

.verdict-box {
  margin-top: 18px;
  background: rgba(6, 11, 22, 0.9);
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-md);
  padding: 14px;
}

.verdict-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.verdict-result {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--neon-green);
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.device-id-field {
  color: var(--text-dim);
  font-size: 0.78rem;
  word-break: break-all;
}

.btn-trigger-scan {
  width: 100%;
  margin-top: 14px;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid var(--neon-green);
  color: var(--neon-green);
  padding: 8px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-trigger-scan:hover {
  background: var(--neon-green);
  color: #050811;
  box-shadow: 0 0 15px var(--neon-green);
}

/* ==========================================================================
   Section Headers
   ========================================================================== */
.section {
  padding: 90px 0;
  position: relative;
}

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

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--neon-green);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
  display: block;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Features Grid
   ========================================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon-green), transparent);
  opacity: 0;
  transition: var(--transition-fast);
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(0, 255, 136, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 255, 136, 0.15);
}

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

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid rgba(0, 255, 136, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neon-green);
  font-size: 1.4rem;
  margin-bottom: 20px;
}

.card-icon.cyan {
  background: rgba(0, 229, 255, 0.1);
  border-color: rgba(0, 229, 255, 0.25);
  color: var(--cyber-cyan);
}

.card-icon.purple {
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.25);
  color: var(--electric-purple);
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-main);
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.94rem;
  line-height: 1.65;
  margin-bottom: 16px;
}

.feature-tags {
  display: flex;
  gap: 8px;
  margin-top: auto;
  flex-wrap: wrap;
}

.pill-tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-cyan);
  background: rgba(0, 229, 255, 0.08);
  padding: 3px 8px;
  border-radius: 4px;
}

/* ==========================================================================
   Architecture Blueprint
   ========================================================================== */
.arch-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 36px;
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.arch-flow-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 32px;
}

.arch-step {
  background: #090f1a;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
  position: relative;
  transition: var(--transition-fast);
}

.arch-step:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

.arch-step-num {
  font-family: var(--font-mono);
  color: var(--neon-green);
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.arch-step h4 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.arch-step p {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.arch-table-wrap {
  overflow-x: auto;
}

.tech-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.tech-table th, .tech-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.tech-table th {
  color: var(--text-dim);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.tech-table td code {
  font-family: var(--font-mono);
  color: var(--neon-green);
  background: rgba(0, 255, 136, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.86rem;
}

/* ==========================================================================
   Interactive Code Playground / SDK Section
   ========================================================================== */
.code-playground {
  background: #070c16;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
}

.tabs-bar {
  display: flex;
  background: #0c1220;
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: 12px 20px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: var(--transition-fast);
}

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

.tab-btn.active {
  color: var(--neon-green);
  border-bottom-color: var(--neon-green);
  background: rgba(0, 255, 136, 0.05);
}

.code-content-wrap {
  position: relative;
}

.copy-code-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.copy-code-btn:hover {
  background: var(--neon-green);
  color: #050811;
}

pre.code-block {
  padding: 24px;
  margin: 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.6;
  color: #e2e8f0;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: #050811;
  padding: 60px 0 36px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 48px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 14px;
  max-width: 320px;
  line-height: 1.6;
}

.footer-col h5 {
  font-family: var(--font-mono);
  color: var(--text-main);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 14px;
}

/* ==========================================================================
   Responsive Queries
   ========================================================================== */
@media (max-width: 992px) {
  .hero-grid { grid-template-columns: 1fr; }
  .arch-flow-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .nav-menu { display: none; }
  .nav-menu.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background: #080d18;
    padding: 24px;
    border-bottom: 1px solid var(--border-subtle);
  }
  .mobile-toggle { display: block; }
  .hero-title { font-size: 2.4rem; }
  .section-title { font-size: 2rem; }
  .arch-flow-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
