:root {
  font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  font-weight: 400;

  color-scheme: dark;
  color: rgba(255, 255, 255, 0.87);
  background-color: #000000;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background-color: #000000;
  color: #ffffff;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: #000000;
}

/* Header Styles */
.header {
  background-color: #000000;
  border-bottom: 1px solid #1f2937;
  padding: 1.5rem 1.5rem;
}

.header-content {
  max-width: 64rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: bold;
  color: #ffffff;
  margin: 0;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.iskcon-link {
  color: #d1d5db;
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 4px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.iskcon-link:hover {
  color: #fb923c;
  background-color: rgba(251, 146, 60, 0.1);
  text-decoration: none;
}

.external-icon {
  width: 1rem;
  height: 1rem;
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  min-height: calc(100vh - 120px);
}

.interface-container {
  width: 100%;
  max-width: 42rem;
}

/* Title Section */
.title-section {
  text-align: center;
  margin-bottom: 3rem;
}

.subtitle {
  color: #9ca3af;
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.description {
  color: #6b7280;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* Voice Interface */
.voice-interface {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mode-switcher {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.mode-btn {
  padding: 0.6rem 1.2rem;
  border-radius: 9999px;
  border: 1px solid #4b5563;
  background: #111827;
  color: #f9fafb;
  cursor: pointer;
  font-weight: 600;
}

.mode-btn.active {
  background: #2563eb;
  border-color: #60a5fa;
}

.text-interface {
  width: 100%;
  max-width: 40rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid #374151;
  border-radius: 1rem;
  padding: 1rem;
}

.text-interface.hidden {
  display: none;
}

.text-chat {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 24rem;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.text-bubble {
  max-width: 90%;
  padding: 0.75rem 0.9rem;
  border-radius: 1rem;
  line-height: 1.4;
  font-size: 0.95rem;
}

.text-bubble.assistant {
  background: #1f2937;
  color: #f3f4f6;
  align-self: flex-start;
}

.text-bubble.user {
  background: #2563eb;
  color: white;
  align-self: flex-end;
}

.text-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.option-pill {
  border: none;
  border-radius: 9999px;
  background: #374151;
  color: white;
  padding: 0.6rem 0.9rem;
  cursor: pointer;
  font-size: 0.95rem;
}

.result-card {
  background: linear-gradient(135deg, #1d4ed8, #0f766e);
  color: white;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.result-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.result-card p {
  margin: 0.2rem 0;
}

.email-section {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.email-section.hidden {
  display: none;
}

.email-section input {
  flex: 1;
  border-radius: 9999px;
  border: 1px solid #6b7280;
  padding: 0.65rem 0.9rem;
  font-size: 0.95rem;
}

/* Error Display */
.error-display {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: rgba(127, 29, 29, 0.5);
  border: 1px solid #991b1b;
  border-radius: 1rem;
  max-width: 28rem;
  width: 100%;
}

.error-display.hidden {
  display: none;
}

.error-text {
  color: #fca5a5;
  font-size: 0.875rem;
  text-align: center;
}

/* Voice Button */
.voice-button {
  position: relative;
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.5s ease-in-out;
  cursor: pointer;
  border: 4px solid;
}

/* Button States */
.voice-button.disconnected {
  background: linear-gradient(to bottom right, #1f2937, #111827);
  border-color: #4b5563;
}

.voice-button.disconnected:hover {
  border-color: #6b7280;
}

.voice-button.connecting {
  background: linear-gradient(to bottom right, #78350f, #713f12);
  border-color: #fbbf24;
}

.voice-button.idle {
  background: linear-gradient(to bottom right, #14532d, #166534);
  border-color: #4ade80;
  cursor: pointer;
}

.voice-button.idle:hover {
  border-color: #86efac;
}

.voice-button.recording {
  background: linear-gradient(to bottom right, #1e3a8a, #1e40af);
  border-color: #60a5fa;
}

.voice-button.bhajan {
  background: linear-gradient(to bottom right, #581c87, #6b21a8);
  border-color: #c084fc;
}

/* Button Icon */
.button-icon {
  width: 4rem;
  height: 4rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.button-icon svg {
  width: 100%;
  height: 100%;
  color: #d1d5db;
}

/* Status Text */
.status-text {
  font-size: 1.125rem;
  font-weight: 500;
  text-align: center;
  margin: 0;
}

.voice-button.disconnected .status-text {
  color: #9ca3af;
}

.voice-button.connecting .status-text {
  color: #fbbf24;
}

.voice-button.idle .status-text {
  color: #4ade80;
}

.voice-button.recording .status-text {
  color: #60a5fa;
}

.voice-button.bhajan .status-text {
  color: #c084fc;
}

/* Pulse Animation for Recording */
.voice-button.recording::before,
.voice-button.recording::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background-color: #60a5fa;
  opacity: 0.2;
  animation: pulse 1.5s infinite ease-in-out;
}

.voice-button.recording::after {
  animation-delay: 0.5s;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.2;
  }

  50% {
    transform: scale(1.1);
    opacity: 0;
  }
}

/* Recording Waves */
.recording-waves {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  height: 3rem;
  margin-bottom: 1rem;
}

.wave-bar {
  width: 0.5rem;
  background-color: #60a5fa;
  border-radius: 9999px;
  animation: wave 1.5s infinite ease-in-out;
}

.wave-bar:nth-child(2) {
  animation-delay: 0.1s;
}

.wave-bar:nth-child(3) {
  animation-delay: 0.2s;
}

.wave-bar:nth-child(4) {
  animation-delay: 0.3s;
}

.wave-bar:nth-child(5) {
  animation-delay: 0.4s;
}

.wave-bar:nth-child(6) {
  animation-delay: 0.5s;
}

.wave-bar:nth-child(7) {
  animation-delay: 0.6s;
}

@keyframes wave {

  0%,
  100% {
    height: 1rem;
  }

  50% {
    height: 2.5rem;
  }
}

/* Spinner */
.spinner {
  width: 4rem;
  height: 4rem;
  border: 4px solid #713f12;
  border-top-color: #fbbf24;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Connection Status */
.connection-status {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.5rem;
}

.status-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  margin-right: 0.5rem;
}

.status-dot.connected {
  background-color: #22c55e;
}

.status-dot.disconnected {
  background-color: #ef4444;
}

.status-label {
  font-size: 0.875rem;
  color: #6b7280;
}

/* Controls */
.controls {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
}

.controls.hidden {
  display: none;
}

.control-button {
  padding: 0.5rem 1.5rem;
  font-weight: 600;
  border-radius: 9999px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  font-size: 1rem;
  font-family: inherit;
}

.stop-button {
  background-color: #dc2626;
  color: white;
}

.stop-button:hover {
  background-color: #b91c1c;
}

.disconnect-button {
  background-color: #374151;
  color: white;
}

.disconnect-button:hover {
  background-color: #1f2937;
}

/* Bhajan Controls */
.bhajan-controls {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
}

.bhajan-controls.hidden {
  display: none;
}

.bhajan-button {
  background-color: #7c3aed;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bhajan-button:hover {
  background-color: #6d28d9;
}

.button-icon-svg {
  width: 1rem;
  height: 1rem;
}

.stop-bhajan-button {
  background-color: #dc2626;
  color: white;
}

.stop-bhajan-button:hover {
  background-color: #b91c1c;
}

.hidden {
  display: none;
}


/* Responsive Design */
@media (max-width: 768px) {
  .header {
    padding: 1rem;
  }

  .header-content {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }

  .header-right {
    width: 100%;
    justify-content: flex-start;
  }

  .logo-text {
    font-size: 1.25rem;
  }

  .voice-button {
    width: 10rem;
    height: 10rem;
  }

  .button-icon {
    width: 3rem;
    height: 3rem;
  }

  .status-text {
    font-size: 1rem;
  }

  .title-section {
    margin-bottom: 2rem;
  }

  .subtitle {
    font-size: 1rem;
  }

  .description {
    font-size: 0.8rem;
  }

  .control-button {
    padding: 0.4rem 1.2rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: 1rem;
  }

  .voice-button {
    width: 9rem;
    height: 9rem;
  }

  .button-icon {
    width: 2.5rem;
    height: 2.5rem;
  }

  .status-text {
    font-size: 0.9rem;
  }

  .controls,
  .bhajan-controls {
    flex-direction: column;
    width: 100%;
    max-width: 16rem;
  }

  .control-button {
    width: 100%;
  }

  .iskcon-link {
    font-size: 0.875rem;
  }
}

/* Name / Email / Phone Confirmation Modal */
.confirm-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 50;
}

.confirm-modal.hidden {
  display: none;
}

.confirm-modal-card {
  width: 100%;
  max-width: 26rem;
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid #374151;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.confirm-modal-question {
  font-size: 1.05rem;
  color: #f9fafb;
  text-align: center;
  line-height: 1.5;
}

.confirm-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.confirm-yes-button {
  background-color: #16a34a;
  color: white;
}

.confirm-yes-button:hover {
  background-color: #15803d;
}

.confirm-no-button {
  background-color: #374151;
  color: white;
}

.confirm-no-button:hover {
  background-color: #1f2937;
}

.confirm-modal-edit {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.confirm-modal-edit.hidden {
  display: none;
}

.confirm-modal-edit input {
  flex: 1;
  border-radius: 9999px;
  border: 1px solid #6b7280;
  padding: 0.65rem 0.9rem;
  font-size: 0.95rem;
  background: #111827;
  color: #f9fafb;
  font-family: inherit;
}

.confirm-modal-error {
  color: #f87171;
  font-size: 0.85rem;
  text-align: center;
}

.confirm-modal-error.hidden {
  display: none;
}
/* Choose Your Next Path Menu */
.next-path-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #f9fafb;
  text-align: center;
  margin: 0;
}

.next-path-subtitle {
  font-size: 0.85rem;
  color: #9ca3af;
  text-align: center;
  margin: -0.5rem 0 0;
  line-height: 1.4;
}

.next-path-subtitle.hidden {
  display: none;
}

.next-path-options {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.next-path-option {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  border: none;
  border-radius: 0.75rem;
  background: #1f2937;
  color: #f9fafb;
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.next-path-option:hover {
  background: #374151;
}

.next-path-option:disabled,
.next-path-option.done {
  cursor: default;
  opacity: 0.75;
}

.next-path-option-icon {
  font-size: 1.2rem;
  line-height: 1;
}

.next-path-option-label {
  flex: 1;
}

.next-path-option-arrow {
  color: #6b7280;
  font-size: 0.85rem;
}