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

:root {
  --ig: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  --bg: #111111;
  --surface: #1a1a1a;
  --surface2: #222222;
  --border: rgba(255,255,255,0.07);
  --text: #efefef;
  --muted: rgba(255,255,255,0.38);
  --radius: 16px;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* icons */
[data-lucide] {
  width: 18px;
  height: 18px;
  stroke-width: 1.75;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ── screens ── */
.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 22px;
  z-index: 1;
  overflow-y: auto;
  transition: opacity 0.28s ease, transform 0.28s ease;
}
.screen.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(20px);
}
.screen.slide-left {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-20px);
}

.grad {
  background: var(--ig);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ══ SCREEN 1: HOME ══ */
#home {
  justify-content: flex-start;
  padding-top: 28px;
  padding-bottom: 20px;
}

.logo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 10px;
}
.logo-icon {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: var(--ig);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.logo-icon [data-lucide] {
  width: 24px;
  height: 24px;
  stroke: #fff;
  stroke-width: 2;
}
.logo-name {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 38px;
  letter-spacing: 2px;
  line-height: 1;
}
.logo-sub {
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3px;
}

.tagline {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
  max-width: 240px;
  line-height: 1.5;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 5px 13px;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 14px;
}
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
  animation: blink 1.4s infinite;
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

.features-label {
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--muted);
  align-self: flex-start;
  margin-bottom: 12px;
}

.feature-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-bottom: 14px;
}

.feature-card {
  cursor: pointer;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: background 0.14s, transform 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.feature-card:active {
  transform: scale(0.975);
  background: var(--surface2);
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
}
.card-icon [data-lucide] {
  width: 18px;
  height: 18px;
  stroke: var(--text);
}
.card-text { flex: 1; }
.card-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}
.card-desc {
  font-size: 12px;
  color: var(--muted);
}
.card-arrow {
  color: var(--muted);
}
.card-arrow[data-lucide] {
  width: 16px;
  height: 16px;
  stroke: var(--muted);
}

.stats-row {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-bottom: 12px;
}
.stat-box {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 8px;
  text-align: center;
}
.stat-num {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 18px;
  color: var(--text);
}
.stat-lbl {
  font-size: 10px;
  color: var(--muted);
  margin-top: 1px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.footer-link {
  background: none;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  color: rgba(255,255,255,0.28);
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
.footer-link:active { color: rgba(255,255,255,0.5); }
.footer-sep { font-size: 11px; color: rgba(255,255,255,0.15); }

.disclaimer {
  font-size: 10px;
  color: rgba(255,255,255,0.18);
  text-align: center;
  line-height: 1.5;
}

/* ══ SCREEN 2: INPUT ══ */
#input-screen {
  justify-content: flex-start;
  padding-top: 56px;
}

.back-btn {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: 36px;
  -webkit-tap-highlight-color: transparent;
  background: none;
  border: none;
  padding: 0;
  font-family: 'DM Sans', sans-serif;
}
.back-btn [data-lucide] {
  width: 16px;
  height: 16px;
  stroke: var(--muted);
}
.back-btn:active { color: #fff; }

.input-feature-icon {
  width: 62px;
  height: 62px;
  border-radius: 17px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.input-feature-icon [data-lucide] {
  width: 26px;
  height: 26px;
  stroke: var(--text);
}

.input-feature-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 30px;
  letter-spacing: 1px;
  text-align: center;
  margin-bottom: 8px;
}
.input-feature-desc {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 36px;
  max-width: 280px;
}

.input-group {
  width: 100%;
  margin-bottom: 14px;
}
.input-label {
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  display: block;
}
.username-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 15px 18px;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  color: #fff;
  outline: none;
  transition: border-color 0.2s;
  -webkit-appearance: none;
}
.username-input::placeholder { color: rgba(255,255,255,0.2); }
.username-input:focus { border-color: rgba(204,35,102,0.5); }
.username-input.error { border-color: rgba(220,39,67,0.7); }

.scan-btn {
  width: 100%;
  padding: 16px;
  border-radius: 12px;
  border: none;
  background: var(--ig);
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s, opacity 0.14s;
  margin-top: 6px;
}
.scan-btn [data-lucide] {
  width: 18px;
  height: 18px;
  stroke: #fff;
}
.scan-btn:active { transform: scale(0.97); opacity: 0.9; }

.trust-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 24px;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: rgba(255,255,255,0.2);
}
.trust-item [data-lucide] {
  width: 13px;
  height: 13px;
  stroke: rgba(255,255,255,0.2);
}

/* ══ SCREEN 3: LOADING ══ */
#loading-screen {
  justify-content: center;
  align-items: center;
}

.scan-ring-wrap {
  position: relative;
  width: 140px;
  height: 140px;
  margin-bottom: 40px;
}
.scan-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888, transparent 80%);
  animation: spin 1.6s linear infinite;
}
.scan-ring::after {
  content: '';
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--bg);
}
@keyframes spin { to { transform: rotate(360deg); } }

.scan-inner {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.scan-inner [data-lucide] {
  width: 32px;
  height: 32px;
  stroke: var(--text);
  stroke-width: 1.5;
}

/* profile pic inside spinner */
.loading-pfp {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.loading-name {
  font-weight: 700;
  font-size: 15px;
  text-align: center;
  min-height: 18px;
  margin-bottom: 2px;
}
.loading-handle {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 6px;
  min-height: 16px;
}
.loading-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px;
  letter-spacing: 1px;
  margin-bottom: 8px;
  text-align: center;
}
.loading-status {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  min-height: 20px;
  transition: opacity 0.25s;
  margin-bottom: 28px;
}
.loading-status.status-found {
  color: #22c55e;
  font-weight: 600;
}

.progress-track {
  width: 100%;
  max-width: 240px;
  height: 3px;
  background: var(--surface2);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 8px;
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--ig);
  border-radius: 100px;
  transition: width 0.65s cubic-bezier(0.4, 0, 0.2, 1);
}
.progress-pct {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}
.loading-viewer-count {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin-top: 10px;
  min-height: 16px;
  opacity: 0;
  transition: opacity 0.4s;
}
.loading-viewer-count.visible {
  opacity: 1;
}
.loading-retry-btn {
  margin-top: 28px;
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 11px 22px;
  cursor: pointer;
}
.loading-retry-btn.hidden { display: none; }
.loading-retry-btn [data-lucide] { width: 15px; height: 15px; }

/* ══ SCREEN 4: RESULTS ══ */
#results-screen {
  justify-content: flex-start;
  padding-top: 52px;
  padding-bottom: 200px;
}

.results-header { width: 100%; margin-bottom: 4px; }
.results-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 26px;
  letter-spacing: 0.5px;
}
.results-username { font-size: 13px; color: var(--muted); margin-top: 2px; }
.results-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.15);
  border-radius: 100px;
  padding: 4px 10px;
  font-size: 11px;
  color: #22c55e;
  margin-top: 8px;
  margin-bottom: 22px;
}
.results-timer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 310;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 11px 16px;
  pointer-events: none;
}
.results-timer.hidden { display: none; }
.results-timer [data-lucide] {
  width: 12px;
  height: 12px;
  stroke: var(--muted);
  flex-shrink: 0;
}
#timer-display {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 16px;
  letter-spacing: 1px;
  line-height: 1;
  color: var(--text);
}
.results-timer.expiring { border-bottom-color: rgba(239,68,68,0.3); }
.results-timer.expiring #timer-display { color: #ef4444; }

.results-badge [data-lucide] {
  width: 12px;
  height: 12px;
  stroke: #22c55e;
  stroke-width: 2.5;
}

.results-section-label {
  font-size: 10px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--muted);
  align-self: flex-start;
  margin-bottom: 10px;
}

.result-rows {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.result-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 13px 15px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.32s ease, transform 0.32s ease;
}
.result-row.visible { opacity: 1; transform: translateY(0); }

.result-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  overflow: hidden;
}
.result-avatar [data-lucide] {
  width: 17px;
  height: 17px;
  stroke: var(--muted);
}
.result-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  filter: blur(2px);
  transform: scale(1.08);
}
.result-info { flex: 1; }
.result-name {
  font-weight: 600;
  font-size: 14px;
  filter: blur(6px);
  user-select: none;
}
.result-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }
.result-lock [data-lucide] {
  width: 14px;
  height: 14px;
  stroke: var(--muted);
}

.story-preview {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
  aspect-ratio: 9 / 14;
  max-height: 320px;
  background: #000;
}
.story-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(22px);
  transform: scale(1.15);
  display: block;
}
.story-preview-lock {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(0,0,0,0.35);
}
.story-preview-lock [data-lucide] {
  width: 32px;
  height: 32px;
  stroke: #fff;
  stroke-width: 1.5;
}
.story-preview-lock span {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.3px;
}

.unlock-banner {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  text-align: center;
}
.unlock-count {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 34px;
  color: var(--text);
}
.unlock-text { font-size: 12px; color: var(--muted); }

/* ══ CAPTCHA GATE (bottom sheet) ══ */
.captcha-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
  z-index: 298;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.38s ease;
}
.captcha-backdrop.visible { opacity: 1; pointer-events: all; }

.captcha-gate {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 78vh;
  background: #161616;
  border-top: 1px solid var(--border);
  border-radius: 22px 22px 0 0;
  z-index: 299;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.42s cubic-bezier(0.32, 0.72, 0, 1);
  -webkit-overflow-scrolling: touch;
}
.captcha-gate.visible { transform: translateY(0); }

.gate-handle {
  width: 32px;
  height: 3px;
  border-radius: 100px;
  background: rgba(255,255,255,0.12);
  margin: 12px auto 0;
  flex-shrink: 0;
}

.gate-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: 12px;
  margin: 14px 20px 0;
  padding: 11px 13px;
  flex-shrink: 0;
}
.gate-warning [data-lucide] {
  width: 15px;
  height: 15px;
  stroke: #f87171;
  flex-shrink: 0;
  margin-top: 1px;
}
.gate-warning-text {
  font-size: 12px;
  color: #f87171;
  line-height: 1.55;
}
.gate-warning-text strong {
  font-weight: 700;
}

.gate-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 18px 24px 16px;
  flex-shrink: 0;
}
.gate-profile-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  margin-bottom: 14px;
}
.gate-profile-pic {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}
.gate-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gate-avatar [data-lucide] {
  width: 26px;
  height: 26px;
  stroke: var(--muted);
}
.gate-profile-lock {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #dc2743;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #161616;
}
.gate-profile-lock [data-lucide] {
  width: 10px;
  height: 10px;
  stroke: #fff;
  stroke-width: 2.5;
}
.gate-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 24px;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
  text-align: center;
}
.gate-subtitle {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

.gate-divider {
  height: 1px;
  background: var(--border);
  margin: 0 20px;
  flex-shrink: 0;
}

/* center whatever OGAds injects */
[data-captcha-enable="true"] {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 20px 32px;
  text-align: center;
}
[data-captcha-enable="true"] input,
[data-captcha-enable="true"] button,
[data-captcha-enable="true"] a,
[data-captcha-enable="true"] form,
[data-captcha-enable="true"] label,
[data-captide-enable="true"] div {
  margin-left: auto;
  margin-right: auto;
}

/* ══ PRIVACY POLICY SHEET ══ */
.pp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.pp-overlay.visible { opacity: 1; pointer-events: all; }

.pp-sheet {
  position: fixed;
  inset: 0;
  top: 40px;
  background: #161616;
  border-radius: 20px 20px 0 0;
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1);
}
.pp-sheet.visible { transform: translateY(0); }

.pp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.pp-title {
  font-weight: 600;
  font-size: 15px;
}
.pp-close {
  background: var(--surface2);
  border: none;
  color: var(--muted);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.pp-close [data-lucide] {
  width: 14px;
  height: 14px;
  stroke: var(--muted);
}

.pp-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 22px 48px;
  -webkit-overflow-scrolling: touch;
}
.pp-updated {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 20px;
}
.pp-body h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-top: 20px;
  margin-bottom: 8px;
  letter-spacing: 0.2px;
}
.pp-body p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}

/* ── animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.42s ease forwards; }
.delay-1 { animation-delay: 0.08s; opacity: 0; }
.delay-2 { animation-delay: 0.16s; opacity: 0; }
.delay-3 { animation-delay: 0.24s; opacity: 0; }
.delay-4 { animation-delay: 0.32s; opacity: 0; }
.delay-5 { animation-delay: 0.40s; opacity: 0; }
