:root {
    --bg: #080c10;
    --surface: #0f1419;
    --surface2: #161d26;
    --accent: #00e5ff;
    --accent2: #ff6b35;
    --accent3: #a259ff;
    --text: #eef2f7;
    --muted: #5a6a7a;
    --border: rgba(0,229,255,0.12);
    --glow: 0 0 40px rgba(0,229,255,0.15);
  }

  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; }
  body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
  }
  body::before {
    content: '';
    position: fixed; inset: 0; z-index: 0;
    background:
      radial-gradient(ellipse 80% 60% at 10% 20%, rgba(0,229,255,0.06) 0%, transparent 60%),
      radial-gradient(ellipse 60% 50% at 90% 80%, rgba(162,89,255,0.06) 0%, transparent 60%),
      radial-gradient(ellipse 50% 40% at 50% 50%, rgba(255,107,53,0.04) 0%, transparent 60%);
    pointer-events: none;
  }

  /* NAV */
  nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 200;
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.2rem 3rem;
    background: rgba(8,12,16,0.88);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
  }
  .logo { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em; color: var(--accent); }
  .logo span { color: var(--text); }
  .nav-tabs { display: flex; gap: 0.5rem; }
  .tab-btn {
    padding: 0.45rem 1.1rem; border-radius: 50px; border: 1px solid transparent;
    background: none; color: var(--muted); font-family: 'DM Sans', sans-serif;
    font-size: 0.85rem; cursor: pointer; transition: all 0.25s;
  }
  .tab-btn:hover { color: var(--text); border-color: var(--border); }
  .tab-btn.active { color: var(--accent); border-color: var(--accent); background: rgba(0,229,255,0.07); }

  /* HERO */
  .hero {
    position: relative; z-index: 1; min-height: 100vh;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center; padding: 8rem 2rem 4rem;
  }
  .hero-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.4rem 1rem; border: 1px solid var(--border); border-radius: 50px;
    font-size: 0.78rem; color: var(--accent); letter-spacing: 0.08em;
    text-transform: uppercase; margin-bottom: 2rem; background: rgba(0,229,255,0.05);
    animation: fadeUp 0.8s ease both;
  }
  .hero-badge::before { content: '●'; font-size: 0.5rem; animation: pulse 2s infinite; }
  @keyframes pulse { 0%,100%{opacity:1}50%{opacity:0.3} }
  h1 { font-family: 'Syne', sans-serif; font-weight: 800; font-size: clamp(2.8rem, 6vw, 5.5rem); line-height: 1.05; letter-spacing: -0.03em; max-width: 820px; animation: fadeUp 0.8s 0.1s ease both; }
  h1 em { font-style: normal; background: linear-gradient(135deg, var(--accent), var(--accent3)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
  .hero-sub { margin-top: 1.5rem; font-size: 1.1rem; color: var(--muted); max-width: 520px; line-height: 1.7; font-weight: 300; animation: fadeUp 0.8s 0.2s ease both; }
  .hero-cta { margin-top: 2.5rem; display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; animation: fadeUp 0.8s 0.3s ease both; }
  .btn-primary { padding: 0.85rem 2rem; background: var(--accent); color: #000; border: none; border-radius: 8px; font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.95rem; cursor: pointer; transition: all 0.2s; box-shadow: 0 0 30px rgba(0,229,255,0.3); }
  .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 50px rgba(0,229,255,0.45); }
  .btn-ghost { padding: 0.85rem 2rem; background: none; color: var(--text); border: 1px solid var(--border); border-radius: 8px; font-family: 'DM Sans', sans-serif; font-size: 0.95rem; cursor: pointer; transition: all 0.2s; }
  .btn-ghost:hover { border-color: rgba(0,229,255,0.4); color: var(--accent); }
  @keyframes fadeUp { from { opacity:0; transform:translateY(24px); } to { opacity:1; transform:translateY(0); } }

  /* SECTIONS */
  section { position: relative; z-index: 1; padding: 5rem 2rem 4rem; max-width: 1100px; margin: 0 auto; display: none; }
  section.active { display: block; }
  .section-label { font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.8rem; }
  .section-title { font-family: 'Syne', sans-serif; font-size: clamp(2rem, 4vw, 3rem); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 1rem; }
  .section-desc { color: var(--muted); font-size: 1rem; max-width: 560px; line-height: 1.7; margin-bottom: 3.5rem; }

  /* STEP GROUP */
  .step-group { margin-bottom: 4.5rem; padding-bottom: 4.5rem; border-bottom: 1px solid var(--border); }
  .step-group:last-of-type { border-bottom: none; }
  .step-header { display: flex; align-items: flex-start; gap: 1.2rem; margin-bottom: 1.8rem; }
  .step-number-badge {
    flex-shrink: 0; width: 40px; height: 40px; border-radius: 50%;
    border: 1px solid var(--accent); display: flex; align-items: center; justify-content: center;
    font-family: 'Syne', sans-serif; font-weight: 800; font-size: 0.88rem;
    color: var(--accent); background: rgba(0,229,255,0.06); margin-top: 0.2rem;
  }
  .step-header-text h3 { font-family: 'Syne', sans-serif; font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.4rem; }
  .step-header-text p { color: var(--muted); font-size: 0.92rem; line-height: 1.7; max-width: 680px; margin-bottom: 0.8rem; }
  .step-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
  .tag { padding: 0.28rem 0.75rem; border-radius: 50px; font-size: 0.7rem; font-weight: 500; letter-spacing: 0.04em; border: 1px solid; }
  .tag-cyan   { border-color: rgba(0,229,255,0.35);   color: var(--accent);  background: rgba(0,229,255,0.06); }
  .tag-purple { border-color: rgba(162,89,255,0.35);  color: var(--accent3); background: rgba(162,89,255,0.06); }
  .tag-orange { border-color: rgba(255,107,53,0.35);  color: var(--accent2); background: rgba(255,107,53,0.06); }
  .tag-green  { border-color: rgba(0,230,118,0.35);   color: #00e676;        background: rgba(0,230,118,0.06); }

  /* SCREENSHOT GRID */
  .screenshot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
  .screenshot-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .screenshot-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

  .screenshot-thumb {
    background: var(--surface);
    border: 1px dashed rgba(0,229,255,0.22);
    border-radius: 12px; overflow: hidden;
    cursor: pointer; transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    position: relative;
  }
  .screenshot-thumb:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 8px 30px rgba(0,229,255,0.15); }
  .thumb-img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
  .thumb-placeholder {
    width: 100%; aspect-ratio: 16/9;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 0.5rem; background: var(--surface2);
  }
  .thumb-placeholder-icon { font-size: 1.6rem; opacity: 0.35; }
  .thumb-placeholder-hint { font-size: 0.62rem; color: var(--muted); letter-spacing: 0.06em; text-transform: uppercase; text-align: center; padding: 0 0.5rem; }
  .thumb-label { padding: 0.65rem 0.9rem; font-size: 0.75rem; color: var(--muted); line-height: 1.4; border-top: 1px solid var(--border); }
  .thumb-label strong { display: block; font-size: 0.68rem; color: var(--accent); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.2rem; }
  .screenshot-thumb::after {
    content: '🔍  View';
    position: absolute; inset: 0 0 auto 0; height: calc(100% - 52px);
    background: rgba(0,0,0,0.55);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; color: var(--accent); font-weight: 600; letter-spacing: 0.06em;
    opacity: 0; transition: opacity 0.2s; border-radius: 11px 11px 0 0;
  }
  .screenshot-thumb:hover::after { opacity: 1; }

  /* MODAL */
  .modal-overlay {
    display: none; position: fixed; inset: 0; z-index: 999;
    background: rgba(4,8,12,0.94); backdrop-filter: blur(12px);
    align-items: center; justify-content: center; padding: 1.5rem;
  }
  .modal-overlay.open { display: flex; animation: fadeIn 0.2s ease; }
  @keyframes fadeIn { from{opacity:0}to{opacity:1} }
  .modal-box {
    position: relative; max-width: 900px; width: 100%;
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 20px; overflow: hidden; animation: scaleIn 0.22s ease;
  }
  @keyframes scaleIn { from{opacity:0;transform:scale(0.95)}to{opacity:1;transform:scale(1)} }
  .modal-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--border);
  }
  .modal-step-label { font-size: 0.72rem; color: var(--accent); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.2rem; }
  .modal-title { font-family: 'Syne', sans-serif; font-size: 0.95rem; font-weight: 700; }
  .modal-close {
    flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid var(--border); background: none; color: var(--muted);
    font-size: 1.1rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: all 0.2s;
  }
  .modal-close:hover { border-color: var(--accent); color: var(--accent); }
  .modal-image-wrap {
    background: #050810; display: flex; align-items: center; justify-content: center;
    min-height: 200px; max-height: 65vh; overflow: hidden;
  }
  .modal-image-wrap img { width: 100%; height: 100%; object-fit: contain; max-height: 65vh; display: block; }
  .modal-image-placeholder {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 0.8rem; padding: 4rem 2rem; color: var(--muted); font-size: 0.85rem; text-align: center;
  }
  .modal-image-placeholder .big-icon { font-size: 3rem; opacity: 0.3; }
  .modal-image-placeholder p { font-size: 0.8rem; color: var(--muted); max-width: 340px; line-height: 1.6; }
  .modal-image-placeholder code { font-size: 0.72rem; background: var(--surface2); padding: 0.15rem 0.4rem; border-radius: 4px; color: var(--accent); }
  .modal-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 1.5rem; border-top: 1px solid var(--border);
  }
  .modal-counter { font-size: 0.8rem; color: var(--muted); }
  .modal-nav { display: flex; gap: 0.6rem; }
  .modal-nav-btn { padding: 0.45rem 1.1rem; border-radius: 8px; border: 1px solid var(--border); background: none; color: var(--text); font-size: 0.82rem; cursor: pointer; transition: all 0.2s; }
  .modal-nav-btn:hover { border-color: var(--accent); color: var(--accent); }
  .modal-nav-btn:disabled { opacity: 0.3; cursor: default; pointer-events: none; }

  .nav-row { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 3.5rem; }

  /* SCROLL TO TOP */
  .scroll-top-btn {
    position: fixed; bottom: 2rem; right: 2rem; z-index: 300;
    width: 44px; height: 44px; border-radius: 50%;
    background: rgba(0,229,255,0.1); border: 1px solid var(--accent);
    color: var(--accent); font-size: 1.1rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s, transform 0.2s, background 0.2s, box-shadow 0.2s;
    box-shadow: 0 0 20px rgba(0,229,255,0.1);
  }
  .scroll-top-btn.visible { opacity: 1; pointer-events: auto; }
  .scroll-top-btn:hover { background: rgba(0,229,255,0.2); transform: translateY(-3px); box-shadow: 0 0 30px rgba(0,229,255,0.25); }

  @media (max-width: 720px) {
    nav { padding: 1rem; }
    .nav-tabs { gap: 0.25rem; }
    .tab-btn { padding: 0.35rem 0.6rem; font-size: 0.72rem; }
    .screenshot-grid, .screenshot-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  }
  @media (max-width: 480px) {
    .screenshot-grid, .screenshot-grid.cols-2, .screenshot-grid.cols-4 { grid-template-columns: 1fr; }
  }