@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&display=swap');

:root {
  --bg: #ececec;
  --surface: #ececec;
  --card: #ececec;
  --border: #252538;
  --accent: #e50914;
  --accent2: #ff6b35;
  --text: #020208;
  --muted: #6b6b8a;
  --green: #22c55e;
  --yellow: #f59e0b;
  --blue: #3b82f6;
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --font-mono: 'DM Mono', monospace;
}


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

body {
  width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow: hidden;
}

/* ── View toggling ── */
.view { display:flex; flex-direction:column; }
.hidden { display:none !important; }

/* ── Popup Header ── */
.popup-header {
  position: relative;
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  overflow: hidden;
}
.header-glow {
  position: absolute; top: -40px; left: 50%; transform: translateX(-50%);
  width: 200px; height: 120px;
  background: radial-gradient(circle, rgba(229,9,20,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 6px;
}
.logo-text {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 4px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.logo-sub {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.5px;
}

/* ── Login Body ── */
.popup-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }

.welcome-title { font-size: 17px; font-weight: 600; }
.welcome-sub { font-size: 12px; color: var(--muted); line-height: 1.6; margin-top: -8px; }

.google-btn {
  width: 100%;
  padding: 11px 16px;
  background: #fff;
  border: none; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  cursor: pointer;
  font-size: 13px; font-weight: 600; color: #333;
  font-family: var(--font-body);
  transition: all .2s;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
  position: relative;
}
.google-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.google-btn:active { transform: translateY(0); }
.google-btn.loading { opacity: 0.7; pointer-events: none; }

.spinner {
  width: 14px; height: 14px;
  border: 2px solid rgba(0,0,0,0.2);
  border-top-color: #333;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.divider {
  display: flex; align-items: center; gap: 10px;
}
.div-line { flex: 1; height: 1px; background: var(--border); }
.divider span { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }

.feature-list { display: flex; flex-direction: column; gap: 7px; }
.feature-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--muted);
}
.fi-icon { font-size: 14px; }

.terms {
  font-size: 10px; color: var(--muted);
  text-align: center; line-height: 1.7;
}
.terms a { color: var(--accent); text-decoration: none; }

/* ── User Bar ── */
.user-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
  flex-shrink: 0;
}
.user-info { flex: 1; }
.user-name { font-size: 13px; font-weight: 600; }
.user-email { font-size: 11px; color: var(--muted); margin-top: 1px; }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.2);
  animation: pulse-green 2s infinite;
}
@keyframes pulse-green {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34,197,94,0.2); }
  50% { box-shadow: 0 0 0 5px rgba(34,197,94,0.1); }
}

/* ── Stats Row ── */
.stats-row {
  display: flex; align-items: stretch;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.stat {
  flex: 1; padding: 14px 10px;
  text-align: center;
}
.stat-val {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--accent);
  line-height: 1;
}
.stat-key {
  font-size: 9px; text-transform: uppercase;
  letter-spacing: 1px; color: var(--muted);
  margin-top: 3px;
}
.stat-sep { width: 1px; background: var(--border); }

/* ── Action List ── */
.action-list { display: flex; flex-direction: column; gap: 0; padding: 8px; }
.action-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  cursor: pointer;
  transition: all .15s;
  font-size: 13px; font-weight: 500;
}
.action-item:hover { background: var(--card); }
.action-item.danger:hover { background: rgba(229,9,20,0.08); }
.action-item.danger .ai-label { color: var(--accent); }
.ai-icon { font-size: 16px; }
.ai-label { flex: 1; }
.ai-arrow { color: var(--muted); font-size: 16px; }
.ai-count {
  background: var(--card); border: 1px solid var(--border);
  padding: 2px 8px; border-radius: 10px;
  font-size: 11px; color: var(--muted);
}

/* ── Netflix Badge ── */
.netflix-badge {
  margin: 4px 8px 10px;
  display: flex; align-items: center; gap: 7px;
  padding: 7px 12px;
  background: rgba(34,197,94,0.05);
  border: 1px solid rgba(34,197,94,0.15);
  border-radius: 8px;
  font-size: 11px; color: var(--green);
}
.nb-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  animation: pulse-green 2s infinite;
}

/* ── Back Bar ── */
.back-bar {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.back-btn {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 12px; font-family: var(--font-body);
  transition: color .15s; padding: 4px 0;
}
.back-btn:hover { color: var(--text); }
.back-title { font-size: 14px; font-weight: 600; }

/* ── Settings ── */
.settings-body { padding: 8px; }
.setting-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px;
  border-radius: 9px;
  transition: background .15s;
}
.setting-row:hover { background: var(--card); }
.sr-info { flex: 1; }
.sr-label { font-size: 12px; font-weight: 500; }
.sr-desc { font-size: 10px; color: var(--muted); margin-top: 2px; line-height: 1.4; }

.toggle {
  width: 34px; height: 18px;
  border-radius: 9px;
  background: var(--border);
  position: relative; cursor: pointer;
  transition: background .25s;
  flex-shrink: 0;
}
.toggle::after {
  content: '';
  position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--muted);
  transition: all .25s;
}
.toggle.active { background: var(--accent); }
.toggle.active::after { left: 18px; background: #fff; }

.setting-divider { height: 1px; background: var(--border); margin: 4px 0; }
.danger-row { }
.danger-btn {
  padding: 6px 14px; border-radius: 7px;
  background: rgba(229,9,20,0.1); border: 1px solid rgba(229,9,20,0.3);
  color: var(--accent); font-size: 12px; font-family: var(--font-body);
  cursor: pointer; font-weight: 500; transition: all .15s;
}
.danger-btn:hover { background: rgba(229,9,20,0.2); }
