/* =========================================================
   HEARTBEAT.FM ⇄ NEXUSSTREAM AI OAUTH GATEWAY SCREEN
   ========================================================= */

#screen-nexus-oauth {
  background: #090a10;
  display: none;
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  z-index: 50;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: #dbdee1;
}

#screen-nexus-oauth.active {
  display: flex !important;
}

.nexus-gate-overlay {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  background: radial-gradient(circle at 18% 45%, rgba(92, 26, 195, 0.28) 0%, transparent 45%),
              radial-gradient(circle at 82% 35%, rgba(72, 209, 189, 0.18) 0%, transparent 45%),
              radial-gradient(circle at 50% 90%, rgba(229, 29, 36, 0.12) 0%, transparent 50%),
              #080911;
  box-sizing: border-box;
}

.nexus-gate-glow {
  position: absolute;
  top: 28%;
  left: 6%;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(92, 26, 195, 0.5) 0%, rgba(72, 209, 189, 0.15) 60%, transparent 75%);
  filter: blur(20px);
  pointer-events: none;
}

.nexus-star {
  position: absolute;
  background: #ffffff;
  border-radius: 50%;
  opacity: 0.35;
  pointer-events: none;
}

/* Nav */
.nexus-gate-nav {
  position: absolute;
  top: 24px;
  left: 32px;
  right: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 20;
}

.nexus-nav-back-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: all 0.2s ease;
}

.nexus-nav-back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #48D1BD;
}

.nexus-nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.nexus-badge-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, #5c1ac3, #48D1BD);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 900;
  font-size: 11px;
}

/* Central Card */
.nexus-oauth-dialog-card {
  background: #151624;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 20px;
  width: 100%;
  max-width: 490px;
  padding: 32px 34px;
  box-shadow: 0 24px 75px rgba(0, 0, 0, 0.8), 0 0 24px rgba(92, 26, 195, 0.25);
  position: relative;
  z-index: 10;
  text-align: center;
}

.nexus-avatar-connect-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.nexus-app-avatar {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, #e51d24, #991b1b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 4px 18px rgba(229, 29, 36, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.nexus-connect-dots {
  color: #48D1BD;
  font-size: 1.2rem;
  letter-spacing: 3px;
  animation: pulseNexusDots 2s infinite ease-in-out;
}

@keyframes pulseNexusDots {
  0%, 100% { opacity: 0.45; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.08); filter: drop-shadow(0 0 8px #48D1BD); }
}

.nexus-target-avatar {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, #5c1ac3, #48D1BD);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 4px 20px rgba(72, 209, 189, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.nexus-dialog-header {
  margin-bottom: 22px;
}

.nexus-dialog-title {
  color: #ffffff;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.nexus-dialog-sub {
  color: #94a3b8;
  font-size: 0.88rem;
  line-height: 1.45;
}

/* Benefits list */
.nexus-benefits-list {
  background: #0f101b;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nexus-benefit-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.4;
}

.nexus-check-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #22c55e;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  flex-shrink: 0;
  margin-top: 1px;
}

.nexus-benefit-item code {
  background: rgba(255, 255, 255, 0.08);
  padding: 1px 6px;
  border-radius: 4px;
  color: #48D1BD;
}

/* Connected Pill */
.nexus-account-pill-card {
  background: rgba(72, 209, 189, 0.08);
  border: 1px solid rgba(72, 209, 189, 0.35);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  text-align: left;
}

.nexus-pill-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nexus-user-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #5c1ac3, #48D1BD);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.nexus-pill-user {
  font-weight: 700;
  font-size: 0.92rem;
  color: #fff;
}

.nexus-pill-meta {
  font-size: 0.74rem;
  color: #94a3b8;
}

.nexus-pill-status {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid #22c55e;
  padding: 3px 8px;
  border-radius: 20px;
}

/* Ingest Summary Box */
.nexus-ingest-summary-box {
  background: #0f101b;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 22px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nexus-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
}

.nexus-summary-label {
  color: #888ea8;
  font-weight: 500;
}

.nexus-summary-val {
  color: #fff;
  font-weight: 600;
}

.nexus-summary-val.font-mono {
  font-family: monospace;
  color: #48D1BD;
}

/* Actions */
.nexus-dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.nexus-btn-secondary {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  padding: 10px 14px;
  border-radius: 6px;
  transition: color 0.2s;
}

.nexus-btn-secondary:hover {
  color: #ffffff;
  text-decoration: underline;
}

.nexus-btn-primary {
  background: linear-gradient(135deg, #5c1ac3, #48D1BD);
  border: none;
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(72, 209, 189, 0.35);
  transition: all 0.2s ease;
  flex: 1;
  justify-content: center;
}

.nexus-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(72, 209, 189, 0.5);
}

.nexus-lightning-icon {
  font-size: 14px;
}

@media (max-width: 600px) {
  .nexus-oauth-dialog-card {
    padding: 24px 20px;
  }
  .nexus-dialog-actions {
    flex-direction: column-reverse;
    gap: 10px;
  }
  .nexus-btn-primary, .nexus-btn-secondary {
    width: 100%;
    text-align: center;
  }
}
