:root {
  --juniora-h: 38px;
  --bg: rgb(19, 21, 25);
  --panel: #1c1f26;
  --panel-2: #23272f;
  --ink: #fff;
  --muted: #9aa3ad;
  --good: var(--jn-green, #a0e747);
  --bad: #ff6b6b;
}
* { box-sizing: border-box }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--ink); font-family: var(--jn-font); min-height: 100% }
body { padding-bottom: var(--juniora-h); -webkit-tap-highlight-color: transparent; }
.wrap { max-width: 480px; margin: 0 auto; padding: 26px 18px 40px; }
.head { text-align: center; margin-bottom: 16px }
.head h1 { font-size: clamp(20px, 5vw, 25px); margin: 0 0 8px }
.head p { color: var(--muted); font-size: 14px; line-height: 1.9; margin: 0 }

.tabs { display: flex; gap: 8px; margin: 18px 0 12px; }
.tab-btn {
  flex: 1; padding: 11px 6px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1);
  background: var(--panel); color: var(--muted); font-family: var(--jn-font);
  font-weight: 700; font-size: 13px; cursor: pointer;
}
.tab-btn.active { background: var(--good); color: #10231f; border-color: var(--good); }

.stats {
  display: flex; justify-content: space-between; font-size: 13px; color: var(--muted);
  margin-bottom: 10px; padding: 0 2px;
}
.stats b { color: var(--ink); }
#statusLabel { color: var(--good); font-weight: 700; }

.browser-frame {
  border-radius: 16px; overflow: hidden; border: 1px solid rgba(255,255,255,0.08);
  background: #0d0f13; box-shadow: 0 16px 34px rgba(0,0,0,0.35);
}
.browser-bar {
  display: flex; align-items: center; gap: 6px; padding: 9px 12px;
  background: #17191e; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.dot { width: 9px; height: 9px; border-radius: 50%; }
.dot.r { background: #ff6058; } .dot.y { background: #ffbd2e; } .dot.g { background: #28c840; }
.url-box {
  margin-inline-start: 10px; background: #24272e; border-radius: 999px;
  padding: 3px 12px; font-size: 11px; color: var(--muted); direction: ltr; flex: 1; text-align: center;
}

.page { padding: 16px; min-height: 480px; background: #14161b; }

/* shared bits */
.thumb {
  width: 100%; height: 130px; border-radius: 10px;
  background: linear-gradient(160deg, #2c313a, #1c1f26);
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; margin-bottom: 12px;
}
.site-btn { border: none; cursor: pointer; font-family: var(--jn-font); }
.site-btn.wrong-flash { outline: 2px solid var(--bad) !important; }
.site-btn.correct-flash { outline: 2px solid var(--good) !important; }

/* ===== BAD MODE ===== */
.mode-bad .ad-banner {
  width: 100%; padding: 10px; border-radius: 10px; margin-bottom: 12px;
  background: linear-gradient(90deg, #ff5f6d, #ffc371);
  color: #3a1400; font-weight: 900; font-size: 12.5px;
  animation: pulse 1.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .7 } }
.mode-bad .title-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.mode-bad .p-title { font-size: 14px; font-weight: 700; }
.mode-bad .p-price { font-size: 11px; color: var(--muted); }
.mode-bad .rating-link {
  display: block; font-size: 11px; color: var(--muted); margin-bottom: 12px; background: none; text-decoration: underline;
}
.mode-bad .btn-cluster { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.mode-bad .btn-cluster .site-btn {
  flex: 1 1 30%; padding: 9px 4px; border-radius: 8px; background: #454b56; color: #dfe3e8;
  font-size: 10.5px; font-weight: 700;
}
.mode-bad .related-row { display: flex; gap: 8px; }
.mode-bad .related-item {
  flex: 1; background: #23272f; border-radius: 8px; padding: 6px; text-align: center;
}
.mode-bad .related-item .r-thumb { font-size: 20px; margin-bottom: 4px; }
.mode-bad .related-item .site-btn {
  width: 100%; margin-top: 4px; padding: 5px; border-radius: 6px;
  background: #454b56; color: #dfe3e8; font-size: 9.5px; font-weight: 700;
}

/* ===== GOOD MODE ===== */
.mode-good .p-title-good { font-size: 17px; font-weight: 900; margin-bottom: 4px; }
.mode-good .p-price-good { font-size: 20px; font-weight: 900; color: var(--good); margin-bottom: 14px; }
.mode-good .cta-good {
  width: 100%; padding: 15px; border-radius: 12px;
  background: var(--good); color: #10231f; font-size: 15px; font-weight: 900;
  margin-bottom: 12px;
}
.mode-good .secondary-row { display: flex; gap: 8px; margin-bottom: 20px; }
.mode-good .secondary-row .site-btn {
  flex: 1; padding: 8px; border-radius: 9px; background: transparent;
  border: 1px solid rgba(255,255,255,0.14); color: var(--muted); font-size: 11px; font-weight: 700;
}
.mode-good .divider { border-top: 1px dashed rgba(255,255,255,0.1); margin: 8px 0 12px; }
.mode-good .related-title-good { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.mode-good .related-row-good { display: flex; gap: 8px; }
.mode-good .related-item-good {
  flex: 1; background: #1c1f26; border-radius: 8px; padding: 8px; text-align: center;
  font-size: 10px; color: var(--muted);
}
.mode-good .related-item-good .r-thumb-good { font-size: 20px; margin-bottom: 4px; }

.summary {
  text-align: center; margin-top: 20px; background: var(--panel);
  border-radius: 16px; padding: 20px; border: 1px solid rgba(255,255,255,0.08);
}
.summary h2 { margin: 0 0 8px; font-size: 18px; color: var(--good); }
.summary p { margin: 0 0 14px; color: var(--muted); font-size: 14px; line-height: 1.9; }
.retry-btn {
  padding: 10px 20px; border-radius: 10px; border: none;
  background: var(--good); color: #10231f; font-weight: 900;
  font-family: var(--jn-font); font-size: 14px; cursor: pointer;
}

.insight-box {
  margin-top: 18px; text-align: center; font-size: 13.5px; color: var(--good);
  background: rgba(160,231,71,0.08); border-radius: 12px; padding: 12px; line-height: 1.9;
}

/* برند جونیورا؛ کوچیک و وسط‌چین پایین صفحه */
.juniora-overlay {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  background: rgba(13, 15, 19, 0.92);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 1000;
}
.juniora-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #9aa3ad;
  font-family: var(--jn-font);
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1;
  opacity: 0.85;
  transition: opacity .15s ease;
}
.juniora-link:hover { opacity: 1; }
.juniora-logo {
  width: 13px;
  height: auto;
  display: block;
  flex-shrink: 0;
}
.juniora-text {
  letter-spacing: normal;
}
