/* MosqAI - Global Stylesheet (High Legibility & Mosque-Ready) */
:root {
  --primary: #065f46;
  --primary-light: #047857;
  --primary-dark: #064e3b;
  --accent-gold: #d97706;
  --accent-gold-light: #fbbf24;
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --bg-card-border: #334155;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --danger: #ef4444;
  --success: #10b981;
  --radius: 12px;
  --font-arabic: 'Amiri', 'Traditional Arabic', 'Scheherazade New', serif;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
}

/* Common Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--bg-card-border);
  margin-bottom: 1.5rem;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--primary-light), var(--accent-gold));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
}

.logo-title h1 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-title p {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* Status Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-live {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-live .pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

.badge-idle {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-secondary);
  border: 1px solid var(--bg-card-border);
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
}
.btn-primary:hover {
  background-color: var(--primary-light);
}

.btn-accent {
  background-color: var(--accent-gold);
  color: white;
}
.btn-accent:hover {
  background-color: var(--accent-gold-light);
}

.btn-danger {
  background-color: var(--danger);
  color: white;
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--bg-card-border);
}
.btn-secondary:hover {
  background-color: #273549;
}

/* Cards & Grid */
.grid-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .grid-layout {
    grid-template-columns: 1fr;
  }
}

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Quranic Ayah Card (Sacred Highlight) */
.ayah-card {
  background: linear-gradient(135deg, rgba(6, 95, 70, 0.4), rgba(217, 119, 6, 0.15));
  border: 2px solid var(--accent-gold);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1rem 0;
  position: relative;
  box-shadow: 0 4px 20px rgba(217, 119, 6, 0.2);
  animation: glowIn 0.4s ease-out;
}

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

.ayah-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.ayah-badge {
  background: var(--accent-gold);
  color: #1e1e1e;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.ayah-arabic {
  font-family: var(--font-arabic);
  font-size: 1.7rem;
  line-height: 2.2;
  text-align: right;
  direction: rtl;
  color: #fef08a;
  margin-bottom: 0.5rem;
}

.ayah-translation {
  font-size: 1.05rem;
  color: #e2e8f0;
  font-style: italic;
  line-height: 1.6;
}

/* Live Feed / Transcript Stream */
.stream-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-height: 520px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.stream-container::-webkit-scrollbar {
  width: 6px;
}
.stream-container::-webkit-scrollbar-thumb {
  background: var(--bg-card-border);
  border-radius: 4px;
}

.speech-bubble {
  background: #152238;
  border-left: 4px solid var(--primary-light);
  border-radius: 8px;
  padding: 1rem;
  transition: all 0.2s;
}

.speech-bubble.latest {
  border-left-color: var(--accent-gold);
  background: #1b283f;
}

.arabic-text {
  font-family: var(--font-arabic);
  font-size: 1.35rem;
  text-align: right;
  direction: rtl;
  color: #cbd5e1;
  margin-bottom: 0.4rem;
}

.translated-text {
  font-size: 1rem;
  color: #ffffff;
  font-weight: 500;
}

/* TV / Projector Display Mode */
.tv-body {
  background-color: #030712;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.tv-header {
  padding: 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #1f2937;
}

.tv-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem 5rem;
  text-align: center;
}

.tv-arabic {
  font-family: var(--font-arabic);
  font-size: 3rem;
  line-height: 1.8;
  color: #fde047;
  direction: rtl;
  margin-bottom: 2rem;
  max-width: 90%;
}

.tv-translated {
  font-size: 2.5rem;
  font-weight: 600;
  line-height: 1.4;
  color: #ffffff;
  max-width: 90%;
}

.tv-ayah-box {
  background: rgba(6, 78, 59, 0.4);
  border: 3px solid var(--accent-gold);
  border-radius: 20px;
  padding: 2.5rem;
  max-width: 90%;
  margin-bottom: 2rem;
  box-shadow: 0 0 50px rgba(217, 119, 6, 0.3);
}

.tv-ayah-arabic {
  font-family: var(--font-arabic);
  font-size: 3.5rem;
  line-height: 1.9;
  color: #fef08a;
  direction: rtl;
  margin-bottom: 1.5rem;
}

.tv-ayah-translation {
  font-size: 2.2rem;
  color: #f1f5f9;
  font-weight: 500;
}

/* Attendee Mobile Join Experience */
.mobile-wrap {
  max-width: 500px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-dark);
}

.mobile-header {
  position: sticky;
  top: 0;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  padding: 1rem;
  border-bottom: 1px solid var(--bg-card-border);
  z-index: 10;
}

.audio-player-banner {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.earbud-icon {
  font-size: 1.6rem;
}

.form-select {
  width: 100%;
  padding: 0.65rem;
  background-color: #0f172a;
  border: 1px solid var(--bg-card-border);
  color: white;
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
}
