/* ============================================================
   DISKETTE — style.css
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #130f1e;
  --surface:    #1e192c;
  --surface-h:  #28213a;
  --border:     #322b45;
  --border-h:   #443b59;
  --text:       #f0eeff;
  --muted:      #9c97b0;
  --dim:        #7a7492;
  --pink:       #f0466e;
  --pink-dark:  #d63560;
  --radius:     4px;
  --radius-sm:  2px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Background blobs ── */
.gradient-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: linear-gradient(135deg,
    rgba(255,138,101,0.06),
    rgba(233,30,99,0.06),
    rgba(152,47,152,0.06),
    rgba(68,29,138,0.06),
    rgba(64,160,208,0.06));
  z-index: 0;
  pointer-events: none;
}

.blobs-container {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  filter: blur(90px);
  opacity: 0.2;
  border-radius: 50%;
  animation: float-morph linear infinite alternate;
  will-change: transform;
}

.blob-1 { width:45vw;height:45vw;background:#ff8a65;top:-15%;left:-10%;animation-duration:12s; }
.blob-2 { width:38vw;height:38vw;background:#e91e63;top:5%;right:-12%;animation-duration:16s;animation-direction:reverse; }
.blob-3 { width:32vw;height:32vw;background:#9c27b0;top:40%;left:-8%;animation-duration:20s; }
.blob-4 { width:28vw;height:28vw;background:#3f51b5;bottom:10%;right:-8%;animation-duration:14s;animation-direction:reverse; }
.blob-5 { width:25vw;height:25vw;background:#e91e63;bottom:25%;left:25%;animation-duration:18s; }
.blob-6 { width:22vw;height:22vw;background:#ff5722;top:60%;right:15%;animation-duration:22s;animation-direction:reverse; }
.blob-7 { width:20vw;height:20vw;background:#7c3aed;top:20%;left:40%;animation-duration:15s; }

@keyframes float-morph {
  0%   { transform:translate(0,0) scale(1) rotate(0deg); border-radius:40% 60% 70% 30%/40% 50% 60% 50%; }
  33%  { transform:translate(8vw,12vh) scale(1.15) rotate(15deg); border-radius:60% 40% 30% 70%/60% 30% 70% 40%; }
  66%  { transform:translate(-6vw,6vh) scale(0.9) rotate(-10deg); border-radius:50% 50% 60% 40%/50% 60% 40% 60%; }
  100% { transform:translate(2vw,-8vh) scale(1.05) rotate(5deg); border-radius:40% 60% 70% 30%/40% 50% 60% 50%; }
}

body > *:not(.gradient-overlay):not(.blobs-container) { position: relative; z-index: 1; }

/* ── Shared ── */
.section-heading {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: var(--dim);
  margin-bottom: 10px;
}
.section-note {
  font-size: 13px;
  color: var(--muted);
  margin-top: -4px;
  margin-bottom: 14px;
  line-height: 1.5;
}
.github-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s, border-color 0.15s;
}
.github-link:hover { background: var(--surface-h); border-color: var(--border-h); }

.step-num {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: var(--radius);
  background: var(--surface-h);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  color: var(--dim);
  padding: 28px 20px 40px;
}
.footer-logo { width: 14px; height: 14px; opacity: 0.2; filter: invert(1); }
.sep { opacity: 0.4; }

/* ================================================================
   MOBILE  (<= 859px)
================================================================ */
.desktop-layout { display: none; }
.mobile-layout  { display: block; }

.hero {
  text-align: center;
  padding: 68px 24px 40px;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}
.hero-content { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hero-logo {
  width: 84px; height: 84px;
  border-radius: 12px;
  margin-bottom: 8px;
}

.m-menu-btn {
  position: absolute;
  top: 20px; right: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.m-menu-btn:hover { background: var(--surface-h); border-color: var(--border-h); }

.m-menu {
  position: absolute;
  top: 64px; right: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  min-width: 200px;
}
.m-menu.open { opacity: 1; pointer-events: auto; transform: translateY(0); }

.m-menu-link {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: background 0.12s;
  white-space: nowrap;
}
.m-menu-link:hover { background: var(--surface-h); }
.m-menu-link svg { opacity: 0.55; flex-shrink: 0; }

.hero h1 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.6px;
  line-height: 1.1;
  margin-bottom: 2px;
}
.hero-sub {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  max-width: 300px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 14px 34px;
  border-radius: var(--radius);
  background: var(--pink);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font);
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}
.btn-primary:hover { background: var(--pink-dark); }
.btn-primary:active { transform: scale(0.97); }
.hero-arch { font-size: 11px; color: var(--dim); }

.m-phone-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 24px 0 32px 0;
  width: 100%;
}
.m-phone-container .phone-stack {
  transform: scale(0.9);
}

.phone-stack { position: relative; width: 260px; height: 500px; }
.phone-frame {
  position: absolute;
  width: 220px;
  border-radius: 8px;
  overflow: hidden;
  border: 6px solid #000;
  background: #000;
  transition: all 0.6s cubic-bezier(0.4,0,0.2,1);
}
.phone-img-base { width: 100%; height: auto; display: block; border-radius: 4px; }
.phone-img-fade {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%; display: block;
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.4,0,0.2,1);
  border-radius: 4px;
}
.pos-back { left:0;top:40px;transform:scale(0.9) rotate(-4deg);z-index:1;opacity:0.7;filter:blur(1px); }
.pos-front { left:40px;top:0;transform:scale(1) rotate(2deg);z-index:2;opacity:1;filter:blur(0); }

.section { max-width: 480px; margin: 0 auto; padding: 32px 20px 0; }

.dl-list {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.dl-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}
.dl-row:last-child { border-bottom: none; }
.dl-row:hover { background: var(--surface-h); }
.dl-row-left { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dl-name { font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.dl-chip {
  font-size: 9px; font-weight: 700;
  padding: 2px 6px; border-radius: var(--radius-sm);
  background: var(--surface-h); color: var(--text); border: 1px solid var(--border);
  flex-shrink: 0;
}
.dl-desc { font-size: 11px; color: var(--muted); }
.dl-size { font-size: 10px; color: var(--dim); }
.device-tag { font-size: 10px; font-weight: 600; color: var(--pink); }
.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  background: var(--surface-h);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  text-decoration: none;
  transition: background 0.1s, border-color 0.1s;
}
.dl-btn:hover { background: var(--border); border-color: var(--border-h); }

.steps-list {
  list-style: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}
.steps-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--border);
}
.steps-list li:last-child { border-bottom: none; }
.steps-list li div:last-child { flex: 1; }
.steps-list li strong { display: block; font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.steps-list li p { font-size: 12px; color: var(--muted); line-height: 1.55; }

.mobile-layout .footer { max-width: 480px; margin: 0 auto; }


/* ================================================================
   DESKTOP  (>= 860px)
================================================================ */
@media (min-width: 860px) {
  .mobile-layout  { display: none !important; }
  .desktop-layout { display: block; }

  .d-header {
    padding: 0 40px;
    height: 70px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    width: 100%;
    top: 0;
    z-index: 10;
  }
  .d-header-inner {
    max-width: 1100px;
    height: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
  }
  .d-brand { display: flex; align-items: center; gap: 12px; }
  .d-logo { width: 28px; height: 28px; object-fit: contain; border-radius: 6px; }
  .d-brand-text { display: flex; flex-direction: column; }
  .d-app-name { display: block; font-size: 15px; font-weight: 700; letter-spacing: -0.2px; line-height: 1.2; }

  .d-nav { display: flex; align-items: center; gap: 12px; }

  .d-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    font-family: var(--font);
    text-decoration: none;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    transition: background 0.15s, border-color 0.15s;
  }
  .d-nav-link:hover {
    background: var(--surface-h);
    border-color: var(--border-h);
  }

  .d-nav-patreon {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 15px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
    text-decoration: none;
    color: #fff;
    background: var(--pink);
    border: 1px solid var(--pink);
    transition: background 0.15s, border-color 0.15s;
  }
  .d-nav-patreon:hover {
    background: var(--pink-dark);
    border-color: var(--pink-dark);
  }
  .d-nav-patreon svg { color: #fff; }

  .d-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 64px 40px 48px;
    display: grid;
    grid-template-columns: 1fr 1.55fr;
    gap: 64px;
    align-items: center;
    min-height: calc(100vh - 70px - 80px);
  }

  .d-left { display: flex; justify-content: center; align-items: center; }


  .d-section-title { font-size: 28px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 8px; line-height: 1.15; }
  .d-section-sub { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 28px; }

  .univ-card {
    display: flex;
    gap: 20px;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 14px;
    transition: border-color 0.15s, background 0.15s;
  }
  .univ-card:hover { background: var(--surface-h); border-color: var(--border-h); }
  .univ-qr-side { flex-shrink: 0; }
  .univ-info-side { flex: 1; display: flex; flex-direction: column; gap: 5px; }
  .univ-label { font-size: 16px; font-weight: 700; color: var(--text); }
  .univ-desc { font-size: 12px; color: var(--muted); }
  .qr-size { font-size: 11px; font-weight: 600; color: var(--pink); }

  .qr-img-wrap {
    background: #fff;
    border-radius: var(--radius-sm);
    padding: 8px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border);
  }
  .qr-img-wrap:empty { display: none; }
  .qr-canvas { line-height: 0; }
  .qr-canvas img { width: 140px; height: 140px; display: block; }

  .qr-dl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 11px 0;
    margin-top: 4px;
    border-radius: var(--radius);
    background: var(--pink);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    font-family: var(--font);
    text-decoration: none;
    transition: background 0.15s, transform 0.1s;
  }
  .qr-dl-btn:hover { background: var(--pink-dark); }
  .qr-dl-btn:active { transform: scale(0.97); }

  .specific-label {
    font-size: 10px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px;
    color: var(--dim); margin-bottom: 9px;
  }
  .specific-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
  .spec-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 12px;
    display: flex; flex-direction: column; gap: 4px;
    transition: background 0.12s, border-color 0.12s;
  }
  .spec-card:hover { background: var(--surface-h); border-color: var(--border-h); }
  .spec-arch { font-size: 13px; font-weight: 700; color: var(--text); }
  .spec-desc { font-size: 11px; color: var(--muted); line-height: 1.4; }
  .spec-card .qr-size { font-size: 11px; margin-bottom: 6px; }
  .spec-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 13px;
    border-radius: var(--radius);
    background: var(--surface-h);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    font-family: var(--font);
    text-decoration: none;
    transition: background 0.1s, border-color 0.1s;
    margin-top: auto;
    align-self: flex-start;
  }
  .spec-btn:hover { background: var(--border); border-color: var(--border-h); }

  .d-steps-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 44px 40px 52px;
    border-top: 1px solid var(--border);
  }
  .d-section-title { font-size: 20px; font-weight: 700; }
  .d-steps { display: flex; align-items: flex-start; gap: 0; margin-top: 28px; }
  .d-step { flex: 1; display: flex; flex-direction: column; gap: 10px; }
  .d-step .step-num { 
    width: 30px; height: 30px; font-size: 13px; 
    border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
    color: var(--text);
  }
  .d-step strong { font-size: 14px; font-weight: 700; }
  .d-step p { font-size: 13px; color: var(--muted); line-height: 1.6; max-width: 200px; }
  .d-step-arrow { font-size: 20px; color: var(--dim); padding: 0 20px; margin-top: 5px; flex-shrink: 0; }

  .d-bottom { max-width: 1100px; margin: 0 auto; padding: 0 40px 32px; }
  .d-bottom .github-link { max-width: 320px; }

  .desktop-layout .footer {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 40px 40px;
    justify-content: flex-start;
    border-top: 1px solid var(--border);
  }
}

/* ================================================================
   MODAL
================================================================ */
.hash-modal {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(19, 15, 30, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.hash-modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 480px;
  padding: 24px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  transform: scale(0.95);
  opacity: 0;
  animation: modalIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes modalIn {
  to { transform: scale(1); opacity: 1; }
}
.hash-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.hash-modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.hash-modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  transition: color 0.15s;
}
.hash-modal-close:hover {
  color: var(--text);
}
.hash-modal-body {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  overflow-x: auto;
}
.hash-modal-body code {
  font-family: monospace;
  font-size: 13px;
  color: var(--pink);
  word-break: break-all;
  user-select: all;
}
