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

body {
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
  background: #0f1117;
  color: #e8e8e8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#app {
  width: 100%;
  max-width: 680px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  text-align: center;
  padding: 1.5rem 0 1rem;
}

.disclosure-banner {
  background: #1e2230;
  border: 1px solid #2d3350;
  border-radius: 8px;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  color: #a0a8c0;
  margin-bottom: 1rem;
}

h1 {
  font-size: 2rem;
  color: #7c9ef8;
  letter-spacing: 2px;
}

.subtitle {
  color: #606880;
  margin-top: 0.25rem;
  font-size: 0.9rem;
}

#chat-area {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.bubble {
  max-width: 80%;
  padding: 0.75rem 1rem;
  border-radius: 16px;
  line-height: 1.55;
  font-size: 0.95rem;
  white-space: pre-wrap;
}

.bubble.user {
  align-self: flex-start;
  background: #1e2a4a;
  border-bottom-left-radius: 4px;
}

.bubble.nadeem {
  align-self: flex-end;
  background: #1a3a2a;
  border-bottom-right-radius: 4px;
}

.bubble.nadeem.flagged {
  background: #3a2a1a;
  border: 1px solid #7a5a30;
}

#transcript-preview {
  min-height: 1.5rem;
  color: #606880;
  font-style: italic;
  font-size: 0.875rem;
  text-align: center;
  padding: 0.25rem;
}

#controls {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  padding: 1rem 0 0.5rem;
}

button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}

button:active { transform: scale(0.97); }
button:disabled { opacity: 0.35; cursor: not-allowed; }

#start-btn { background: #4a6ef5; color: #fff; }
#mic-btn   { background: #2d8c5e; color: #fff; }
#mic-btn.listening { background: #c0392b; animation: pulse 1s infinite; }
#lang-btn  { background: #2d3350; color: #a0a8c0; font-size: 0.85rem; padding: 0.75rem 0.9rem; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

#text-input-area {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 0;
}

#text-input {
  flex: 1;
  padding: 0.65rem 0.9rem;
  background: #1e2230;
  border: 1px solid #2d3350;
  border-radius: 10px;
  color: #e8e8e8;
  font-size: 0.95rem;
  direction: rtl;
}

#send-btn {
  background: #4a6ef5;
  color: #fff;
  padding: 0.65rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
}

#status {
  text-align: center;
  font-size: 0.8rem;
  color: #505870;
  padding-bottom: 1rem;
  min-height: 1.2rem;
}

/* Mobile tweaks */
@media (max-width: 480px) {
  h1 { font-size: 1.5rem; }
  .bubble { max-width: 92%; font-size: 0.9rem; }
  button { padding: 0.65rem 1.1rem; font-size: 0.9rem; }
}
