/* MODAL STYLES */
.modal-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal-backdrop.hidden { display: none; }

.modal-card {
  width: 460px;
  background: var(--bg-drawer);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-main);
  overflow: hidden;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-close-modal {
  background: none; border: none; color: var(--text-muted); font-size: 1.1rem; cursor: pointer;
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.audio-input-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
}

.modal-tab {
  flex: 1;
  padding: 8px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-tab.active {
  border-bottom: 2px solid var(--accent-primary);
  color: #fff;
  font-weight: 600;
}

.record-visualizer-box {
  background: rgba(0,0,0,0.4);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.rec-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--text-dim);
}

.rec-dot.recording {
  background: var(--accent-danger);
  animation: pulse-ring 1s infinite;
}

#rec-timer {
  font-family: var(--font-mono);
  font-size: 1.5rem;
}

.record-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.btn-danger {
  background: var(--accent-danger);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
}

.btn-secondary {
  background: rgba(255,255,255,0.1);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.modal-footer {
  padding: 14px 20px;
  background: rgba(0,0,0,0.2);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.hidden { display: none !important; }

/* DYNAMIC CUSTOM BACKGROUND LAYER */
.custom-bg-layer {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 1;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: filter 0.3s ease, background-image 0.5s ease;
}

/* LOGIN & AUTHENTICATION SCREEN */
.login-screen-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(11, 10, 9, 0.95);
  backdrop-filter: blur(25px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  width: 420px;
  max-width: 95vw;
  background: rgba(20, 18, 16, 0.9);
  border: 1px solid rgba(167, 43, 32, 0.25);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(167, 43, 32, 0.15);
  text-align: center;
}

.login-brand {
  margin-bottom: 28px;
}

.login-logo-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: #fff;
  box-shadow: 0 0 24px var(--accent-glow);
}

.login-brand h2 {
  font-size: 1.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-main);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.login-subtitle {
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-buttons-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-auth {
  width: 100%;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.btn-auth:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.btn-google { background: #ffffff; color: #1f1f1f; }
.btn-email { background: rgba(255, 255, 255, 0.08); color: #ffffff; border-color: rgba(255, 255, 255, 0.15); }
.btn-phone { background: rgba(255, 255, 255, 0.08); color: #ffffff; border-color: rgba(255, 255, 255, 0.15); }

.auth-divider {
  display: flex;
  align-items: center;
  margin: 6px 0;
  color: var(--text-dim);
  font-size: 0.75rem;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: rgba(255,255,255,0.08);
}
.auth-divider span { padding: 0 10px; }

.btn-guest {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.guest-info-footnote {
  margin-top: 20px;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}



