/* ==========================================================================
   BIENER MAIL — ULTRA-PREMIUM GOD-TIER DESIGN SYSTEM + ARCADE & PERSONA
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700;800;900&family=Geist+Mono:wght@400;500;600;700;800&family=Press+Start+2P&display=swap');

:root {
  --bg-pure: #000000;
  --bg-subtle: #06070a;
  --bg-card: rgba(13, 16, 23, 0.75);
  --bg-card-solid: #0d1017;
  --bg-card-hover: rgba(20, 25, 36, 0.88);
  --bg-elevated: #11141e;

  --border-glass: rgba(255, 255, 255, 0.08);
  --border-subtle: rgba(255, 255, 255, 0.05);
  --border-hover: rgba(255, 255, 255, 0.2);

  /* Theme Tokens: Dynamic (Default: Indigo) */
  --theme-primary: #6366f1;
  --theme-glow: #818cf8;
  --theme-gradient: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
  --theme-radial: radial-gradient(ellipse 65% 50% at 50% 30%, rgba(99, 102, 241, 0.25) 0%, rgba(56, 189, 248, 0.08) 45%, transparent 75%);

  --accent-emerald: #10b981;
  --accent-emerald-glow: #34d399;
  --accent-emerald-subtle: rgba(16, 185, 129, 0.12);
  --accent-emerald-border: rgba(16, 185, 129, 0.35);

  --accent-cyan: #38bdf8;
  --accent-cyan-subtle: rgba(56, 189, 248, 0.12);

  --accent-rose: #f43f5e;
  --accent-amber: #f59e0b;

  --text-primary: #ffffff;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --text-dim: #475569;

  --font-sans: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Geist Mono', 'SF Mono', Consolas, monospace;
  --font-arcade: 'Press Start 2P', monospace;

  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 9999px;

  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --shadow-card: 0 16px 40px -10px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  --shadow-hover: 0 24px 50px -10px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  --shadow-drawer: -30px 0 70px rgba(0, 0, 0, 0.95);
}

/* Theme Presets */
body[data-theme="emerald"] {
  --theme-primary: #10b981;
  --theme-glow: #34d399;
  --theme-gradient: linear-gradient(135deg, #10b981 0%, #047857 100%);
  --theme-radial: radial-gradient(ellipse 65% 50% at 50% 30%, rgba(16, 185, 129, 0.25) 0%, rgba(6, 182, 212, 0.08) 45%, transparent 75%);
}

body[data-theme="violet"] {
  --theme-primary: #c026d3;
  --theme-glow: #e879f9;
  --theme-gradient: linear-gradient(135deg, #c026d3 0%, #7e22ce 100%);
  --theme-radial: radial-gradient(ellipse 65% 50% at 50% 30%, rgba(192, 38, 211, 0.25) 0%, rgba(99, 102, 241, 0.08) 45%, transparent 75%);
}

body[data-theme="cyan"] {
  --theme-primary: #06b6d4;
  --theme-glow: #22d3ee;
  --theme-gradient: linear-gradient(135deg, #06b6d4 0%, #0369a1 100%);
  --theme-radial: radial-gradient(ellipse 65% 50% at 50% 30%, rgba(6, 182, 212, 0.25) 0%, rgba(59, 130, 246, 0.08) 45%, transparent 75%);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
}

html {
  background-color: var(--bg-pure);
  color-scheme: dark;
}

body {
  background-color: var(--bg-pure);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Background Particle Canvas */
#bgCanvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.65;
}

/* Atmospheric Glow & Grid */
.ambient-glow-mesh {
  position: fixed;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 520px;
  background: var(--theme-radial);
  pointer-events: none;
  z-index: 1;
  transition: background 0.4s ease;
}

.ambient-grid-overlay {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 25%, black 45%, transparent 85%);
  -webkit-mask-image: radial-gradient(circle at 50% 25%, black 45%, transparent 85%);
  pointer-events: none;
  z-index: 1;
}

/* App Shell */
.app-container {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 860px;
  padding: 32px 20px 100px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ==========================================================================
   NAVIGATION BAR
   ========================================================================== */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.brand-unit {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  user-select: none;
}

.brand-icon-box {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--theme-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: transform 0.2s var(--ease-spring);
}

.brand-unit:hover .brand-icon-box {
  transform: rotate(8deg) scale(1.06);
}

.brand-label-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #ffffff;
}

.brand-version-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--theme-glow);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

.nav-cluster {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Theme Switcher Droplist */
.theme-picker-pills {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 4px;
}

.theme-dot-btn {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.theme-dot-btn:hover {
  transform: scale(1.25);
}

.theme-dot-indigo { background: #6366f1; }
.theme-dot-emerald { background: #10b981; }
.theme-dot-violet { background: #c026d3; }
.theme-dot-cyan { background: #06b6d4; }

/* Equalizer Sound Button */
.btn-equalizer {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-equalizer:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-hover);
}

.eq-bar {
  width: 2.5px;
  height: 12px;
  background: var(--theme-glow);
  border-radius: 2px;
  transition: height 0.1s ease;
}

.eq-active .eq-bar:nth-child(1) { animation: eqBounce 0.5s infinite ease-in-out alternate; }
.eq-active .eq-bar:nth-child(2) { animation: eqBounce 0.7s infinite ease-in-out alternate 0.1s; }
.eq-active .eq-bar:nth-child(3) { animation: eqBounce 0.4s infinite ease-in-out alternate 0.2s; }

@keyframes eqBounce {
  from { height: 4px; }
  to { height: 14px; }
}

/* Circular Countdown Ring Pill */
.countdown-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-emerald-glow);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}

.countdown-svg {
  width: 14px;
  height: 14px;
  transform: rotate(-90deg);
}

.countdown-circle-bg {
  stroke: rgba(16, 185, 129, 0.25);
  stroke-width: 2.5;
  fill: none;
}

.countdown-circle-progress {
  stroke: var(--accent-emerald);
  stroke-width: 2.5;
  fill: none;
  stroke-dasharray: 38;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.1s linear;
}

/* ==========================================================================
   TELEMETRY STRIP
   ========================================================================== */
.telemetry-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.telemetry-cell {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all 0.2s var(--ease-spring);
}

.telemetry-cell:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.telemetry-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.telemetry-value {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.value-dot-green {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

/* ==========================================================================
   3D TILT HOLOGRAPHIC BURNER HERO CARD
   ========================================================================== */
.hero-glass-card {
  perspective: 1000px;
  background: var(--bg-card);
  backdrop-filter: blur(36px);
  -webkit-backdrop-filter: blur(36px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 32px 36px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 22px;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease-out, border-color 0.25s var(--ease-spring), box-shadow 0.25s var(--ease-spring);
  transform-style: preserve-3d;
}

.hero-glass-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: var(--shadow-hover);
}

/* Dynamic Holographic Specular Glare */
.holo-glare-effect {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle 300px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.08), transparent 70%);
  pointer-events: none;
  z-index: 2;
}

.hero-glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, var(--theme-glow) 50%, transparent 100%);
}

.hero-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-inbox-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
}

.domain-pill {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent-cyan);
  background: var(--accent-cyan-subtle);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

/* Active Email Monolith Box */
.email-monolith-box {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  cursor: pointer;
  transition: all 0.2s var(--ease-spring);
  position: relative;
  overflow: hidden;
}

.email-monolith-box:hover {
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.email-monolith-box:active {
  transform: translateY(0);
}

.monolith-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.active-email-text {
  font-family: var(--font-mono);
  font-size: clamp(1.2rem, 3.8vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: all;
  transition: color 0.15s ease;
}

.email-monolith-box:hover .active-email-text {
  color: var(--theme-glow);
}

.monolith-sub-hint {
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.keycap-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
}

.copy-button-large {
  background: var(--theme-gradient);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 800;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(99, 102, 241, 0.4);
  transition: all 0.2s var(--ease-spring);
  white-space: nowrap;
  flex-shrink: 0;
}

.copy-button-large:hover {
  filter: brightness(1.15);
  transform: scale(1.04);
}

/* Inline Custom Prefix Drawer */
.prefix-drawer-bar {
  display: none;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 6px 14px;
  align-items: center;
  gap: 12px;
  animation: drawerSlideDown 0.2s var(--ease-spring);
}

.prefix-drawer-bar.open {
  display: flex;
}

@keyframes drawerSlideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.prefix-input-field {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: #ffffff;
  padding: 6px 0;
}

.prefix-domain-label {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.btn-confirm-claim {
  background: var(--theme-primary);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-confirm-claim:hover {
  filter: brightness(1.15);
}

/* Hero Bottom Action Row */
.hero-controls-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.controls-group-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 15px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s var(--ease-spring);
  user-select: none;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.action-btn:active {
  transform: translateY(0);
}

.btn-arcade-play {
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.btn-arcade-play:hover {
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5);
}

.btn-persona-gen {
  background: rgba(192, 38, 211, 0.15);
  border-color: rgba(192, 38, 211, 0.35);
  color: #e879f9;
}

.btn-persona-gen:hover {
  background: rgba(192, 38, 211, 0.25);
  border-color: #e879f9;
}

.btn-test-simulation {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald-glow);
}

.btn-test-simulation:hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--accent-emerald);
}

/* ==========================================================================
   FUNNY WAITING BANNER (ROTATING HUMOR)
   ========================================================================== */
.funny-waiting-bar {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.waiting-emoji {
  font-size: 1.1rem;
}

.waiting-quote-text {
  flex: 1;
  font-style: italic;
  color: var(--text-secondary);
}

/* ==========================================================================
   FEED: LIVE ACTIVITY STREAM WITH BRAND BADGES & SEGMENTED OTP KEYCAPS
   ========================================================================== */
.stream-wrapper {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.stream-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 0 4px;
}

.stream-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stream-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.stream-count-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
}

/* Filter Tabs */
.filter-tabs-cluster {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 3px;
}

.filter-tab {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-xs);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-tab:hover {
  color: #fff;
}

.filter-tab.active {
  background: var(--bg-elevated);
  border: 1px solid var(--border-glass);
  color: #ffffff;
  font-weight: 700;
}

/* Stream Cards Outlet */
.stream-cards-outlet {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Single Activity Stream Card */
.stream-card {
  background: var(--bg-card);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s var(--ease-spring);
  position: relative;
  overflow: hidden;
}

.stream-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.card-top-cluster {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sender-identity-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

/* Crisp Brand SVG Avatar Circle */
.brand-avatar-svg {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  flex-shrink: 0;
}

.brand-avatar-svg.steam { background: #171a21; border-color: #66c0f4; color: #66c0f4; }
.brand-avatar-svg.discord { background: #5865F2; border-color: #5865F2; color: #fff; }
.brand-avatar-svg.epic { background: #313131; border-color: #fff; color: #fff; }
.brand-avatar-svg.github { background: #24292e; border-color: #fff; color: #fff; }
.brand-avatar-svg.google { background: #ffffff; border-color: #4285F4; color: #4285F4; }

.sender-text-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sender-name-bold {
  font-size: 0.92rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-relative-time {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  flex-shrink: 0;
}

.card-subject-headline {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.45;
}

/* ==========================================================================
   SEGMENTED OTP KEYCAP DIGITS
   ========================================================================== */
.card-chips-action-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.segmented-otp-container {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.18s var(--ease-spring);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}

.segmented-otp-container:hover {
  background: rgba(16, 185, 129, 0.18);
  border-color: var(--accent-emerald);
  transform: scale(1.02);
}

.otp-tag-title {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--accent-emerald-glow);
  letter-spacing: 0.08em;
}

.otp-keycap-cells {
  display: flex;
  align-items: center;
  gap: 4px;
}

.otp-keycap-digit {
  font-family: var(--font-mono);
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 5px;
  width: 24px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.otp-copy-action-label {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: #a7f3d0;
  background: rgba(0, 0, 0, 0.3);
  padding: 3px 8px;
  border-radius: 4px;
}

/* Verification Link Action Button */
.direct-verify-link-btn {
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #38bdf8;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.direct-verify-link-btn:hover {
  background: rgba(56, 189, 248, 0.22);
  color: #ffffff;
  border-color: #38bdf8;
  transform: translateY(-1px);
}

/* Empty Stream Placeholder */
.stream-empty-box {
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px dashed var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 56px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
}

.empty-radar-pulsar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px solid var(--border-hover);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--theme-glow);
  animation: pulsarRotate 14s linear infinite;
}

@keyframes pulsarRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.empty-headline {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
}

.empty-subtext {
  font-size: 0.84rem;
  color: var(--text-muted);
  max-width: 320px;
  line-height: 1.5;
}

/* ==========================================================================
   SLIDE-OVER DEEP INSPECTOR DRAWER WITH POWER-USER HEADERS & cURL
   ========================================================================== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.inspector-drawer {
  position: fixed;
  top: 0;
  right: -660px;
  width: 100%;
  max-width: 660px;
  height: 100vh;
  background: var(--bg-elevated);
  border-left: 1px solid var(--border-glass);
  box-shadow: var(--shadow-drawer);
  z-index: 600;
  display: flex;
  flex-direction: column;
  transition: right 0.3s var(--ease-spring);
}

.inspector-drawer.open {
  right: 0;
}

.drawer-nav-bar {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-breadcrumbs {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-close-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.drawer-close-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.drawer-scroll-body {
  flex: 1;
  overflow-y: auto;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.drawer-subject-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #ffffff;
  line-height: 1.3;
}

.drawer-meta-card {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.84rem;
}

.meta-key-val-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.meta-key-name {
  color: var(--text-muted);
  font-weight: 600;
}

.meta-val-content {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

/* Security Verification Badges */
.security-pass-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
}

.security-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.drawer-action-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-drawer-delete {
  background: rgba(244, 63, 94, 0.1);
  border: 1px solid rgba(244, 63, 94, 0.28);
  color: #fb7185;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-drawer-delete:hover {
  background: rgba(244, 63, 94, 0.22);
  color: #fff;
}

.drawer-view-mode-bar {
  display: flex;
  align-items: center;
  gap: 4px;
}

.drawer-view-tab {
  font-size: 0.76rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.drawer-view-tab.active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-weight: 700;
}

.drawer-rendered-container {
  background: #ffffff;
  color: #0f172a;
  border-radius: var(--radius-md);
  padding: 24px;
  line-height: 1.6;
  font-size: 0.94rem;
  word-break: break-word;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.drawer-rendered-container.dark-theme {
  background: #090a0f;
  color: #e2e8f0;
  border: 1px solid var(--border-glass);
}

.drawer-rendered-container a {
  color: var(--theme-primary);
}

/* ==========================================================================
   RETRO SPAM BLASTER ARCADE MODAL
   ========================================================================== */
.arcade-modal-dialog {
  background: #080a10;
  border: 2px solid #f59e0b;
  border-radius: var(--radius-xl);
  padding: 24px;
  max-width: 520px;
  width: 100%;
  box-shadow: 0 0 50px rgba(245, 158, 11, 0.3);
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}

.arcade-top-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.arcade-title-glow {
  font-family: var(--font-arcade);
  font-size: 0.9rem;
  color: #f59e0b;
  text-shadow: 0 0 8px #f59e0b;
}

.arcade-score-board {
  font-family: var(--font-arcade);
  font-size: 0.8rem;
  color: #10b981;
}

#arcadeCanvas {
  width: 100%;
  height: 320px;
  background: #040508;
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-md);
  display: block;
  cursor: crosshair;
}

.arcade-controls-guide {
  font-family: var(--font-arcade);
  font-size: 0.62rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.6;
}

/* ==========================================================================
   FAKE PERSONA GENERATOR MODAL
   ========================================================================== */
.persona-dialog-card {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 28px;
  max-width: 460px;
  width: 100%;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.persona-fields-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.persona-field-item {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.persona-field-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 600;
}

.persona-field-value {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 700;
  color: #fff;
}

.btn-mini-copy {
  background: transparent;
  border: 1px solid var(--border-glass);
  color: var(--text-secondary);
  font-size: 0.72rem;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
}

.btn-mini-copy:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ==========================================================================
   QR MODAL & CONFETTI
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-dialog {
  background: var(--bg-card-solid);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-xl);
  padding: 28px;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: modalPop 0.2s var(--ease-spring);
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

.qr-box-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.qr-image-frame {
  background: #fff;
  padding: 14px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

/* Confetti particles */
.confetti-particle {
  position: fixed;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2000;
  animation: particleBurst 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes particleBurst {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0); opacity: 0; }
}

/* Floating Toasts */
.toast-outlet {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-bubble {
  pointer-events: auto;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 11px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  animation: toastRise 0.2s var(--ease-spring);
}

@keyframes toastRise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 640px) {
  .app-container {
    padding: 24px 16px 80px;
  }
  .hero-glass-card {
    padding: 24px 20px;
  }
  .inspector-drawer {
    max-width: 100%;
  }
  .email-monolith-box {
    flex-direction: column;
    align-items: flex-start;
  }
}
