/* apps.devby.pro — visual identity shared with devby.pro.
   Same palette, same fonts, same background grid, smaller surface area. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #02040a;
  color: #e5e7eb;
  line-height: 1.55;
  overflow-x: hidden;
  min-height: 100vh;
  position: relative;
  padding-top: 64px;
}
.mono, code { font-family: 'JetBrains Mono', ui-monospace, monospace; }

/* Inline body links — neutral blue, leave green for accents / CTAs. */
main p a, footer a, .feature p a, .step p a { color: #6aa9ff; text-decoration: none; }
main p a:hover, footer a:hover, .feature p a:hover, .step p a:hover { color: #8cbeff; text-decoration: underline; }

:root {
  --bg: #02040a;
  --bg-2: #050810;
  --surface: #07090f;
  --surface-2: #0b0e16;
  --border: #131822;
  --border-strong: #232a3a;
  --text: #e5e7eb;
  --text-dim: #9ca3af;
  --text-mute: #6b7280;
  --text-faint: #4b5563;
  --green: #00ff88;
  --green-dim: #00cc6e;
  --cyan: #00d4ff;
  --amber: #ffb800;
  --magenta: #ff3e80;
  --red: #ff5470;
  --shadow-glow: 0 0 24px rgba(0, 255, 136, 0.18);
}

/* ─── background layers ─── */
.bg-grid {
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(0, 212, 255, 0.07), transparent 60%),
    radial-gradient(ellipse 60% 40% at 90% 80%, rgba(0, 255, 136, 0.05), transparent 60%),
    radial-gradient(ellipse 70% 50% at 10% 30%, rgba(255, 62, 128, 0.035), transparent 60%);
}
.bg-grid::after {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(0, 212, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.04) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse 100% 80% at 50% 40%, black 30%, transparent 90%);
}
.bg-noise {
  position: fixed; inset: 0; z-index: -2; opacity: 0.04; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.bg-scan {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.5;
  background-image: repeating-linear-gradient(
    0deg, rgba(0, 255, 136, 0.012) 0, rgba(0, 255, 136, 0.012) 1px,
    transparent 1px, transparent 3px);
}

/* ─── topbar ─── */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: 56px;
  display: flex; align-items: center; gap: 24px;
  padding: 0 24px;
  background: rgba(5, 8, 16, 0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-dim);
}
.topbar .logo {
  color: var(--green); font-weight: 700; letter-spacing: 0.04em;
  font-size: 13px; text-decoration: none;
}
.topbar .status {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--text-mute);
}
.topbar .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 8px var(--green); animation: pulse 2s infinite;
}
@keyframes pulse { 50% { opacity: 0.5; } }
.topbar .spacer { flex: 1; }
.topbar .nav-link {
  color: var(--text-dim); text-decoration: none; transition: color 0.15s;
}
.topbar .nav-link:hover { color: var(--green); }
.topbar .lang-switch {
  color: var(--text-dim); text-decoration: none;
  border: 1px solid var(--border); padding: 4px 10px; border-radius: 4px;
  transition: all 0.15s;
}
.topbar .lang-switch:hover { color: var(--green); border-color: var(--green); }
@media (max-width: 640px) {
  .topbar { padding: 0 14px; gap: 12px; }
  .topbar .status, .topbar .nav-link { display: none; }
}

/* ─── layout ─── */
main { max-width: 980px; margin: 0 auto; padding: 56px 24px 80px; }
section { margin-bottom: 64px; }
.section-tag {
  display: inline-block; font-family: 'JetBrains Mono', monospace;
  font-size: 11px; color: var(--cyan); letter-spacing: 0.1em;
  text-transform: uppercase; margin-bottom: 18px;
  border: 1px solid rgba(0, 212, 255, 0.25);
  padding: 4px 10px; border-radius: 4px;
}

/* ─── hero ─── */
.hero { padding-top: 28px; }
.hero h1 {
  font-size: clamp(36px, 6vw, 60px); font-weight: 800;
  letter-spacing: -0.02em; line-height: 1.05; margin-bottom: 18px;
}
.hero h1 .grad {
  background: linear-gradient(135deg, var(--green), var(--cyan));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p.lead {
  font-size: 17px; max-width: 600px; color: var(--text-dim);
}
.hero p.lead a { color: var(--green); text-decoration: none; }
.hero p.lead a:hover { text-decoration: underline; }

/* ─── apps grid ─── */
.apps-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
}
.app-card {
  display: grid; grid-template-columns: 64px 1fr; gap: 18px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 24px;
  text-decoration: none; color: var(--text);
  transition: all 0.2s;
}
.app-card:not(.placeholder):hover {
  border-color: var(--green); box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}
.app-card.placeholder { opacity: 0.55; cursor: default; }
.app-icon {
  width: 64px; height: 64px; border-radius: 14px;
  background: rgba(0, 255, 136, 0.08);
  border: 1px solid rgba(0, 255, 136, 0.25);
  display: flex; align-items: center; justify-content: center;
  color: var(--green);
}
.app-icon.dim {
  background: rgba(107, 114, 128, 0.06);
  border-color: var(--border-strong); color: var(--text-mute);
}
.app-icon svg { width: 36px; height: 36px; }
.app-icon img { width: 100%; height: 100%; display: block; border-radius: inherit; }
.app-icon.bare { background: transparent; border: none; padding: 0; overflow: hidden; }
.app-meta h3 {
  font-size: 18px; font-weight: 700; margin-bottom: 6px;
  display: flex; align-items: center; gap: 10px;
}
.app-meta h3.dim { color: var(--text-mute); }
.app-meta p { font-size: 13px; color: var(--text-mute); margin-bottom: 12px; }
.app-meta a { color: var(--green); }
.badge {
  font-family: 'JetBrains Mono', monospace; font-size: 10px;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--cyan); border: 1px solid rgba(0, 212, 255, 0.3);
  padding: 2px 8px; border-radius: 4px; font-weight: 500;
}
.app-cta { font-family: 'JetBrains Mono', monospace; font-size: 12px;
  color: var(--green); letter-spacing: 0.04em; }

/* ─── app detail ─── */
.app-hero {
  display: grid; grid-template-columns: 96px 1fr;
  gap: 24px; align-items: center;
  padding-top: 12px; margin-bottom: 28px;
}
@media (max-width: 640px) {
  .app-hero { grid-template-columns: 1fr; gap: 14px; }
}
.app-hero .app-icon {
  width: 96px; height: 96px; border-radius: 22px; overflow: hidden;
  background: transparent; border: none; padding: 0;
}
.app-hero .app-icon svg { width: 56px; height: 56px; }
.app-hero .app-icon img { width: 100%; height: 100%; display: block; }
.app-hero h1 {
  font-size: clamp(32px, 5vw, 48px); font-weight: 800;
  letter-spacing: -0.02em; line-height: 1.05; margin-bottom: 8px;
}
.app-hero p {
  color: var(--text-dim); font-size: 16px; max-width: 540px;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 4px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', monospace; font-size: 13px;
  padding: 12px 20px; border-radius: 6px;
  text-decoration: none; font-weight: 500; letter-spacing: 0.02em;
  transition: all 0.18s; border: 1px solid transparent;
}
.btn-primary {
  background: var(--green); color: var(--bg);
  box-shadow: 0 0 16px rgba(0, 255, 136, 0.3);
}
.btn-primary:hover { background: var(--green-dim); box-shadow: 0 0 28px rgba(0, 255, 136, 0.5); }
.btn-ghost {
  background: transparent; color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { border-color: var(--green); color: var(--green); }

/* ─── feature blocks ─── */
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.feature {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 20px;
}
.feature .icon {
  width: 32px; height: 32px; border-radius: 6px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.25);
  color: var(--cyan); display: flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}
.feature .icon svg { width: 18px; height: 18px; stroke-width: 1.8; fill: none; stroke: currentColor; }
.feature h4 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.feature p { font-size: 13px; color: var(--text-mute); }

/* ─── steps ─── */
.steps { display: flex; flex-direction: column; gap: 24px; }
.step {
  display: grid; grid-template-columns: 36px 1fr; gap: 18px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 22px;
}
.step .num {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0, 255, 136, 0.1);
  border: 1px solid var(--green);
  color: var(--green); font-family: 'JetBrains Mono', monospace;
  font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.step h4 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.step p { font-size: 14px; color: var(--text-dim); }
.step code { color: var(--green); background: var(--bg-2); padding: 2px 6px; border-radius: 4px; font-size: 13px; }
.step .shot {
  margin-top: 12px; border: 1px solid var(--border-strong);
  border-radius: 6px; overflow: hidden; background: var(--bg-2);
}
.step .shot img { display: block; width: 100%; height: auto; }
.step .shot.placeholder {
  aspect-ratio: 16/10;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-faint); font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

/* ─── rule-set list ─── */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  padding: 6px 12px; background: var(--bg-2);
  border: 1px solid var(--border); border-radius: 4px;
  color: var(--text-dim);
}
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

/* ─── back nav ─── */
.back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-mute); text-decoration: none; font-size: 13px;
  font-family: 'JetBrains Mono', monospace;
}
.back:hover { color: var(--green); }

/* ─── report form ─── */
.report-form { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  color: var(--cyan); letter-spacing: 0.04em; margin-top: 8px;
}
.form-input {
  width: 100%;
  background: var(--bg-2); border: 1px solid var(--border-strong);
  color: var(--text); border-radius: 6px;
  padding: 10px 12px;
  font-family: inherit; font-size: 14px;
  transition: border-color 0.15s;
  resize: vertical;
}
.form-input:focus {
  outline: none; border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.12);
}
.form-input::placeholder { color: var(--text-faint); }

/* ─── footer ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 24px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; color: var(--text-mute);
}
.foot-row {
  max-width: 980px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 24px;
}
.foot-row a { color: var(--text-dim); text-decoration: none; }
.foot-row a:hover { color: var(--green); }
