:root {
  --bg-primary: #0a0f14;
  --bg-secondary: #111820;
  --bg-card: #0d1117;
  --accent-cyan: #00f0ff;
  --accent-orange: #ff6b35;
  --accent-green: #39ff14;
  --text-primary: #e0e6ed;
  --text-secondary: #8b9bb4;
  --text-muted: #4a5568;
  --border-color: #1a2332;
  --glow-cyan: 0 0 12px rgba(0, 240, 255, 0.35);
  --glow-green: 0 0 12px rgba(57, 255, 20, 0.3);
  --glow-orange: 0 0 12px rgba(255, 107, 53, 0.3);
  --font-sans: 'Noto Sans SC', 'Source Han Sans CN', sans-serif;
  --font-mono: 'Roboto Mono', 'DIN', monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

::selection {
  background: rgba(0, 240, 255, 0.2);
  color: var(--accent-cyan);
}

/* Scanline overlay */
.scanline {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
}

/* Grid background */
.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 50% 0%, rgba(0,0,0,0.6), transparent 70%);
}

/* HUD corner decoration */
.corner {
  position: absolute;
  width: 20px;
  height: 20px;
  pointer-events: none;
}
.corner-tl { top: 0; left: 0; border-top: 2px solid var(--accent-cyan); border-left: 2px solid var(--accent-cyan); }
.corner-tr { top: 0; right: 0; border-top: 2px solid var(--accent-cyan); border-right: 2px solid var(--accent-cyan); }
.corner-bl { bottom: 0; left: 0; border-bottom: 2px solid var(--accent-cyan); border-left: 2px solid var(--accent-cyan); }
.corner-br { bottom: 0; right: 0; border-bottom: 2px solid var(--accent-cyan); border-right: 2px solid var(--accent-cyan); }

.corner-orange .corner-tl,
.corner-orange .corner-tr,
.corner-orange .corner-bl,
.corner-orange .corner-br { border-color: var(--accent-orange); }

.corner-green .corner-tl,
.corner-green .corner-tr,
.corner-green .corner-bl,
.corner-green .corner-br { border-color: var(--accent-green); }

/* Layout utilities */
.container {
  position: relative;
  z-index: 1;
  width: min(1200px, 92%);
  margin: 0 auto;
}

.section {
  padding: 100px 0;
}

.section-title {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-cyan);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '◆';
  font-size: 10px;
}

.section-heading {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 48px;
  letter-spacing: 1px;
}

.section-heading span {
  color: var(--accent-cyan);
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.4);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 64px;
  background: rgba(10, 15, 20, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-cyan);
  text-decoration: none;
  letter-spacing: 1px;
  text-shadow: 0 0 10px rgba(0, 240, 255, 0.4);
}

.logo img {
  width: 32px;
  height: 32px;
  display: block;
}

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

.nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.25s ease;
  font-family: var(--font-mono);
}

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

.nav .download-nav {
  padding: 8px 18px;
  border: 1px solid rgba(0, 240, 255, 0.4);
  color: var(--accent-cyan);
  background: rgba(0, 240, 255, 0.08);
  transition: all 0.25s ease;
}

.nav .download-nav:hover {
  background: rgba(0, 240, 255, 0.18);
  box-shadow: var(--glow-cyan);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 64px;
  overflow: hidden;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid rgba(57, 255, 20, 0.4);
  background: rgba(57, 255, 20, 0.08);
  color: var(--accent-green);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  margin-bottom: 24px;
  border-radius: 2px;
}

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

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

.hero h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.hero h1 .brand {
  color: var(--accent-cyan);
  text-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
}

.hero-desc {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-decoration: none;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: rgba(0, 240, 255, 0.12);
  border: 1px solid rgba(0, 240, 255, 0.5);
  color: var(--accent-cyan);
  box-shadow: var(--glow-cyan);
}

.btn-primary:hover {
  background: rgba(0, 240, 255, 0.22);
  box-shadow: 0 0 24px rgba(0, 240, 255, 0.5);
  transform: translateY(-2px);
}

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

.btn-primary:hover::after {
  left: 100%;
}

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

.btn-secondary:hover {
  border-color: rgba(0, 240, 255, 0.4);
  color: var(--accent-cyan);
}

.hero-meta {
  display: flex;
  gap: 32px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.hero-meta-item {
  font-family: var(--font-mono);
}

.hero-meta-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.hero-meta-value {
  font-size: 18px;
  color: var(--accent-cyan);
}

/* Hero image panel */
.hero-visual {
  position: relative;
}

.hero-frame {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), var(--glow-cyan);
  transform: perspective(1200px) rotateY(-8deg) rotateX(4deg);
  transition: transform 0.6s ease;
}

.hero-frame:hover {
  transform: perspective(1200px) rotateY(-4deg) rotateX(2deg);
}

.hero-frame img {
  width: 100%;
  border-radius: 2px;
  display: block;
}

.frame-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 8px;
}

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

.frame-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.frame-dots span:nth-child(1) { background: #ff5f56; }
.frame-dots span:nth-child(2) { background: #ffbd2e; }
.frame-dots span:nth-child(3) { background: #27c93f; }

/* Features */
.features {
  background: linear-gradient(180deg, transparent, rgba(0, 240, 255, 0.02), transparent);
}

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

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

.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 240, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 240, 255, 0.03) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  border-radius: 4px;
}

.feature-card:hover {
  border-color: rgba(0, 240, 255, 0.3);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.08);
  transform: translateY(-4px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(0, 240, 255, 0.3);
  background: rgba(0, 240, 255, 0.06);
  border-radius: 4px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--accent-cyan);
  fill: none;
}

.feature-icon.orange {
  border-color: rgba(255, 107, 53, 0.3);
  background: rgba(255, 107, 53, 0.06);
}

.feature-icon.orange svg { stroke: var(--accent-orange); }

.feature-icon.green {
  border-color: rgba(57, 255, 20, 0.3);
  background: rgba(57, 255, 20, 0.06);
}

.feature-icon.green svg { stroke: var(--accent-green); }

.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Screenshots */
.screenshots {
  background: var(--bg-secondary);
}

.screenshot-detail-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 100px;
}

.screenshot-detail-item:last-child {
  margin-bottom: 0;
}

.screenshot-detail-item.reverse {
  direction: rtl;
}

.screenshot-detail-item.reverse > * {
  direction: ltr;
}

.screenshot-detail-image {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.screenshot-detail-image img {
  width: 100%;
  border-radius: 2px;
  display: block;
}

.screenshot-detail-content h3 {
  font-size: 26px;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--accent-cyan);
  text-shadow: 0 0 12px rgba(0, 240, 255, 0.3);
}

.screenshot-detail-content p {
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.8;
  font-size: 15px;
}

.screenshot-detail-content ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.screenshot-detail-content li {
  color: var(--text-secondary);
  padding-left: 26px;
  position: relative;
  font-size: 14px;
  line-height: 1.6;
}

.screenshot-detail-content li::before {
  content: '›';
  position: absolute;
  left: 0;
  top: -2px;
  color: var(--accent-cyan);
  font-weight: 700;
  font-size: 20px;
}

/* Instructions */
.instructions {
  background: linear-gradient(180deg, transparent, rgba(0, 240, 255, 0.02), transparent);
}

.instruction-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 80px;
}

.instruction-item:last-child {
  margin-bottom: 0;
}

.instruction-item.reverse {
  direction: rtl;
}

.instruction-item.reverse > * {
  direction: ltr;
}

.instruction-image {
  position: relative;
  max-width: 420px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.instruction-image img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 2px;
  display: block;
}

.instruction-content .instruction-step {
  font-family: var(--font-mono);
  font-size: 52px;
  font-weight: 700;
  color: rgba(0, 240, 255, 0.12);
  line-height: 1;
  margin-bottom: 12px;
  display: block;
}

.instruction-content h3 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--accent-cyan);
}

.instruction-content p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 20px;
  font-size: 15px;
}

.instruction-content ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.instruction-content li {
  color: var(--text-secondary);
  padding-left: 24px;
  position: relative;
  font-size: 14px;
  line-height: 1.6;
}

.instruction-content li::before {
  content: '›';
  position: absolute;
  left: 0;
  top: -3px;
  color: var(--accent-cyan);
  font-weight: 700;
  font-size: 20px;
}

.instruction-content code {
  display: block;
  padding: 14px 16px;
  background: rgba(0, 240, 255, 0.05);
  border-left: 2px solid var(--accent-cyan);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent-cyan);
  border-radius: 0 2px 2px 0;
}

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

.tech-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  transition: all 0.25s ease;
}

.tech-card:hover {
  border-color: rgba(0, 240, 255, 0.25);
  background: rgba(0, 240, 255, 0.03);
}

.tech-card .tech-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-cyan);
  box-shadow: var(--glow-cyan);
  flex-shrink: 0;
}

.tech-card .tech-dot.orange { background: var(--accent-orange); box-shadow: var(--glow-orange); }
.tech-card .tech-dot.green { background: var(--accent-green); box-shadow: var(--glow-green); }

.tech-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(0, 240, 255, 0.25));
}

.tech-icon.inline-icon {
  stroke: var(--accent-cyan);
}

.tech-card h4 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.tech-card p {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Download CTA */
.download-section {
  position: relative;
  text-align: center;
  background:
    radial-gradient(circle at 50% 50%, rgba(0, 240, 255, 0.06), transparent 50%),
    var(--bg-primary);
}

.download-section .section-heading {
  text-align: center;
  margin-bottom: 20px;
}

.download-section .section-desc {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 40px;
  font-size: 15px;
}

.download-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.download-note {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

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

.download-note a:hover {
  text-decoration: underline;
}

/* Footer */
.footer {
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
}

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

/* Responsive */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-visual {
    order: -1;
  }

  .hero-frame {
    transform: none;
  }

  .nav {
    display: none;
  }

  .section {
    padding: 64px 0;
  }

  .screenshot-detail-item,
  .screenshot-detail-item.reverse,
  .instruction-item,
  .instruction-item.reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    gap: 32px;
    margin-bottom: 64px;
  }

  .instruction-content .instruction-step {
    font-size: 40px;
  }
}

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

  .hero-meta {
    flex-direction: column;
    gap: 16px;
  }

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

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}
