/* ========================================================
   زاد المسلم — ورقة الأنماط الرئيسية (الهوية العربية والتصميم العصري)
   Zad Al-Muslim - Main Stylesheet (Modern Islamic Design & Continuous Mushaf)
   ======================================================== */

@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Cairo:wght@400;600;700;800&family=Scheherazade+New:wght@400;700&display=swap');

:root {
    --primary: #14532d;
    --primary-light: #166534;
    --primary-lighter: #dcfce7;
    --primary-dark: #052e16;
    --accent-gold: #d97706;
    --accent-gold-light: #fef3c7;
    --emerald: #059669;
    --emerald-light: #10b981;
    --bg-main: #fcfbf7;
    --card-bg: #ffffff;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --border-accent: #f59e0b;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --font-ui: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
    --font-quran: 'Amiri', 'Scheherazade New', 'Traditional Arabic', serif;
    --bottom-nav-height: 64px;
    --header-height: 68px;
    --transition: all 0.25s ease-in-out;
}

/* الوضع الليلي الراقي والمريح للعين (بدون ألوان حادة أو حدود صفراء مزعجة) */
[data-theme="dark"] {
    --primary: #10b981;
    --primary-light: #34d399;
    --primary-lighter: #064e3b;
    --primary-dark: #022c22;
    --accent-gold: #f59e0b;
    --accent-gold-light: #78350f;
    --bg-main: #0f172a;       /* كحلي رمادي هادئ ومريح للعين */
    --card-bg: #1e293b;       /* أسطح بطاقات ناعمة */
    --text-main: #f1f5f9;     /* نص أبيض مائل للعاجي */
    --text-muted: #94a3b8;    /* نص ثانوي متناسق */
    --border-color: #334155;  /* حدود خفيفة غير فاقعة */
    --border-accent: #f59e0b;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.5);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.6);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    direction: rtl;
}

body {
    font-family: var(--font-ui);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Base Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}
[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3 {
    color: #f1f5f9;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--accent-gold);
}

button {
    font-family: var(--font-ui);
    cursor: pointer;
    border: none;
    outline: none;
    transition: var(--transition);
}

/* Header & Navigation Bar */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
}

.brand-area {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}
.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}
.brand-text h1 {
    font-size: 1.25rem;
    line-height: 1.2;
    margin: 0;
    color: var(--primary);
}
[data-theme="dark"] .brand-text h1 {
    color: var(--emerald-light);
}
.brand-text p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 1.1rem;
}
.nav-link {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.nav-link:hover, .nav-link.active {
    background-color: var(--primary-lighter);
    color: var(--primary);
}
[data-theme="dark"] .nav-link:hover, [data-theme="dark"] .nav-link.active {
    background-color: var(--primary-dark);
    color: var(--emerald-light);
}

.header-tools {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.font-controller-box {
    display: flex;
    align-items: center;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2px 6px;
    gap: 4px;
}
.font-ctrl-btn {
    background: transparent;
    color: var(--text-main);
    font-weight: bold;
    font-size: 0.85rem;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.font-ctrl-btn:hover {
    background: var(--primary-lighter);
    color: var(--primary);
}
.font-percent-text {
    font-size: 0.8rem;
    font-weight: bold;
    min-width: 38px;
    text-align: center;
    color: var(--text-muted);
}

.tool-btn {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}
.tool-btn:hover {
    background: var(--primary-lighter);
    color: var(--primary);
    border-color: var(--primary);
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.06);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
    padding: 0 0.5rem;
}
.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    flex: 1;
    height: 100%;
}
.mobile-nav-item svg, .mobile-nav-item span:first-child {
    font-size: 1.25rem;
    margin-bottom: 2px;
}
.mobile-nav-item.active, .mobile-nav-item:hover {
    color: var(--primary);
}
[data-theme="dark"] .mobile-nav-item.active {
    color: var(--emerald-light);
}

/* Main Container Layout */
.main-wrapper {
    flex: 1;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* Hero & Search Banner */
.hero-banner {
    background: linear-gradient(135deg, var(--primary) 0%, #064e3b 100%);
    color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 2.2rem 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
[data-theme="dark"] .hero-banner {
    background: linear-gradient(135deg, #064e3b 0%, #0f172a 100%);
}

.hero-banner::after {
    content: "";
    position: absolute;
    left: -40px;
    bottom: -40px;
    width: 220px;
    height: 220px;
    border: 3px solid rgba(245, 158, 11, 0.15);
    border-radius: 50%;
    pointer-events: none;
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
}
.hero-title {
    font-size: 2rem;
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-weight: 800;
}
.hero-subtitle {
    font-size: 1.05rem;
    color: #cbd5e1;
    margin-bottom: 1.5rem;
}

.search-box-container {
    position: relative;
    max-width: 680px;
}
.search-input {
    width: 100%;
    padding: 1rem 3.2rem 1rem 1.2rem;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    font-size: 1.05rem;
    font-family: var(--font-ui);
    box-shadow: var(--shadow-lg);
    background: var(--card-bg);
    color: var(--text-main);
    outline: none;
    transition: var(--transition);
}
.search-input:focus {
    border-color: var(--accent-gold);
}
.search-icon {
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.3rem;
}

/* Quick Action Buttons */
.quick-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.2rem;
}
.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.2rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}
.btn-gold {
    background: var(--accent-gold);
    color: #ffffff;
}
.btn-gold:hover {
    background: #b45309;
}
.btn-outline-white {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
}
.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* Feature Grid Cards */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.card-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.card-tag {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-sm);
    background: var(--primary-lighter);
    color: var(--primary);
}
[data-theme="dark"] .card-tag {
    background: var(--primary-dark);
    color: var(--emerald-light);
}

.ayah-highlight-card {
    border-right: 4px solid var(--accent-gold);
}
.quran-verse-text {
    font-family: var(--font-quran);
    font-size: 1.55rem;
    line-height: 2.1;
    color: var(--primary-dark);
    margin: 0.8rem 0;
    text-align: justify;
}
[data-theme="dark"] .quran-verse-text {
    color: #fef3c7; /* لون عاجي مريح جداً في الوضع الليلي */
}
.source-citation {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Prayer Times Widget */
.prayer-widget-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
    margin: 1rem 0;
}
.prayer-time-box {
    text-align: center;
    padding: 0.75rem 0.4rem;
    border-radius: var(--radius-md);
    background: var(--bg-main);
    border: 1px solid var(--border-color);
}
.prayer-time-box.active-prayer {
    background: var(--primary-lighter);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: bold;
}
[data-theme="dark"] .prayer-time-box.active-prayer {
    background: var(--primary-dark);
    border-color: var(--emerald-light);
    color: var(--emerald-light);
}
.prayer-name {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}
.prayer-time {
    font-size: 1rem;
    font-weight: 700;
}

/* Service Shortcuts Grid */
.services-shortcuts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
    margin-bottom: 2.5rem;
}
.service-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 0.75rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.95rem;
    gap: 0.6rem;
    transition: var(--transition);
    text-align: center;
}
.service-btn:hover {
    border-color: var(--primary);
    background: var(--primary-lighter);
    color: var(--primary);
    transform: translateY(-2px);
}
[data-theme="dark"] .service-btn:hover {
    background: var(--primary-dark);
    color: var(--emerald-light);
}

/* Views Section Styling */
.view-panel {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}
.view-panel.active-view {
    display: block;
}

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

/* ========================================================
   تصميم المصحف الشريف المتصل الصفحي (Continuous Mushaf Page)
   ======================================================== */
.mushaf-page-container {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

/* الإطار الجمالي المستوحى من صفحات المصحف الورقي */
.mushaf-page-container::before {
    content: "";
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 10px;
    right: 10px;
    border: 1px solid rgba(217, 119, 6, 0.25);
    border-radius: var(--radius-md);
    pointer-events: none;
}

.mushaf-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.8rem;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.mushaf-text-flow {
    font-family: var(--font-quran);
    font-size: 1.85rem;
    line-height: 2.7;
    text-align: justify;
    text-align-last: center;
    color: var(--text-main);
    word-spacing: 2px;
}
[data-theme="dark"] .mushaf-text-flow {
    color: #fef3c7;
}

.mushaf-ayah {
    display: inline;
    padding: 3px 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.mushaf-ayah:hover {
    background-color: rgba(217, 119, 6, 0.15);
}
.mushaf-ayah.selected-ayah {
    background-color: rgba(217, 119, 6, 0.25);
}
.mushaf-ayah.current-playing {
    background-color: var(--primary-lighter);
    color: var(--primary-dark);
}
[data-theme="dark"] .mushaf-ayah.current-playing {
    background-color: var(--primary-dark);
    color: #6ee7b7;
}

.ayah-end-symbol {
    font-family: var(--font-quran);
    color: var(--accent-gold);
    font-size: 1.35rem;
    margin: 0 4px;
    user-select: none;
    display: inline-block;
}

/* شريط التحكم بالآية المحددة Floating Ayah Toolbar */
.ayah-floating-menu {
    display: none;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: 0.6rem 1rem;
    margin-top: 1rem;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}
.ayah-floating-menu.active {
    display: flex;
    animation: fadeIn 0.25s ease;
}

/* أزرار تقليب صفحات المصحف */
.mushaf-pagination-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}
.page-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-md);
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-weight: bold;
    font-size: 0.9rem;
    cursor: pointer;
}
.page-nav-btn:hover:not(:disabled) {
    background: var(--primary-lighter);
    color: var(--primary);
    border-color: var(--primary);
}
.page-nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Quran Reader Controls Bar */
.quran-controls-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.8rem 1.2rem;
    margin-bottom: 1.5rem;
    gap: 0.8rem;
}
.select-input {
    padding: 0.5rem 0.8rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-main);
    font-family: var(--font-ui);
    font-size: 0.9rem;
}

.ayah-box {
    padding: 1.4rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--card-bg);
    transition: var(--transition);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
}
.ayah-box.current-playing {
    border-right: 4px solid var(--accent-gold);
    background: var(--primary-lighter);
}
[data-theme="dark"] .ayah-box.current-playing {
    background: var(--primary-dark);
}
.ayah-actions-bar {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}
.btn-icon-sm {
    padding: 0.35rem 0.65rem;
    border-radius: var(--radius-sm);
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
.btn-icon-sm:hover {
    background: var(--primary-lighter);
    color: var(--primary);
}

/* Smart Quran Voice Teacher («معلّم القرآن الذكي») */
.teacher-mode-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.tab-btn {
    padding: 0.7rem 1.2rem;
    border-radius: var(--radius-md);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
}
.tab-btn.active-tab {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
}
[data-theme="dark"] .tab-btn.active-tab {
    background: var(--emerald);
}

.mic-stage-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: var(--card-bg);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
}
.mic-big-btn {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 15px rgba(20, 83, 45, 0.4);
    margin-bottom: 1rem;
    position: relative;
}
.mic-big-btn.listening {
    background: #dc2626;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.6); }
    70% { box-shadow: 0 0 0 20px rgba(220, 38, 38, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

.word-span {
    display: inline-block;
    padding: 0 4px;
    border-radius: 4px;
    transition: var(--transition);
}
.word-span.matched {
    background-color: #bbf7d0;
    color: #14532d;
    font-weight: bold;
}
.word-span.error-flagged {
    background-color: #fecaca;
    color: #991b1b;
    text-decoration: underline wavy #dc2626;
}
.word-span.hidden-mode {
    background-color: #e2e8f0;
    color: transparent;
    user-select: none;
}
[data-theme="dark"] .word-span.matched {
    background-color: #064e3b;
    color: #6ee7b7;
}

/* Audio Player Bottom Floating Bar */
.audio-player-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
    padding: 0.8rem 1.5rem;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
}
.audio-player-bar.active {
    transform: translateY(0);
}
.player-info {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}
.player-controls {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.btn-round {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
}
.btn-round.play-main {
    width: 46px;
    height: 46px;
    background: var(--primary);
    color: #ffffff;
    border: none;
}

/* Smart Islamic Assistant «اسأل زاد» Chat UI */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 220px);
    min-height: 480px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.chat-messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.message-bubble {
    max-width: 85%;
    padding: 1.1rem 1.4rem;
    border-radius: var(--radius-lg);
    line-height: 1.7;
    font-size: 0.98rem;
}
.message-bubble.user-message {
    align-self: flex-start;
    background: var(--primary-lighter);
    color: var(--primary-dark);
    border-bottom-right-radius: 4px;
}
.message-bubble.bot-message {
    align-self: flex-end;
    background: var(--bg-main);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-bottom-left-radius: 4px;
}
[data-theme="dark"] .message-bubble.user-message {
    background: var(--primary-dark);
    color: #6ee7b7;
}

.source-card-badge {
    background: var(--card-bg);
    border: 1px solid var(--accent-gold);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.9rem;
    margin-top: 0.8rem;
    font-size: 0.85rem;
}

.chat-input-row {
    padding: 1rem;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.6rem;
    align-items: center;
}
.chat-input-text {
    flex: 1;
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    font-family: var(--font-ui);
    background: var(--bg-main);
    color: var(--text-main);
    font-size: 0.95rem;
}

/* Voice status and waveform in chat */
.voice-status-bar {
    padding: 0.6rem 1.2rem;
    background: rgba(16, 185, 129, 0.12);
    border-top: 1px solid rgba(16, 185, 129, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    font-size: 0.88rem;
    color: var(--primary);
}
.voice-status-bar.warning {
    background: rgba(245, 158, 11, 0.12);
    border-top-color: rgba(245, 158, 11, 0.4);
    color: #b45309;
}
.voice-status-bar.error {
    background: rgba(239, 68, 68, 0.12);
    border-top-color: rgba(239, 68, 68, 0.4);
    color: #dc2626;
}
.voice-pulse-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #dc2626;
    border-radius: 50%;
    animation: pulseMic 1.2s infinite ease-in-out;
}
@keyframes pulseMic {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.35); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.6; }
}
.chat-quick-chips {
    padding: 0.65rem 1rem;
    background: var(--card-bg);
    border-top: 1px dashed var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: thin;
}
.chip-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: bold;
    flex-shrink: 0;
}
.chip-btn {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0.35rem 0.85rem;
    font-size: 0.82rem;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    font-family: var(--font-ui);
}
.chip-btn:hover {
    background: var(--primary);
    color: #ffffff;
    border-color: var(--primary);
    transform: translateY(-1px);
}
.mic-btn-active {
    background: #fee2e2 !important;
    color: #dc2626 !important;
    border-color: #ef4444 !important;
    animation: pulseMic 1.4s infinite ease-in-out;
}

/* Footer Styling */
.site-footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 1.5rem;
    margin-top: auto;
}
.footer-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-bottom: 1.8rem;
}
.footer-col h4 {
    font-size: 1.05rem;
    margin-bottom: 0.9rem;
    color: var(--primary);
}
.footer-links {
    list-style: none;
}
.footer-links li {
    margin-bottom: 0.5rem;
}
.footer-bottom {
    max-width: 1280px;
    margin: 0 auto;
    border-top: 1px solid var(--border-color);
    padding-top: 1.2rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Responsive Breakpoints */
@media (max-width: 900px) {
    .desktop-nav {
        display: none;
    }
    .mobile-bottom-nav {
        display: flex;
    }
    body {
        padding-bottom: var(--bottom-nav-height);
    }
    .prayer-widget-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .hero-title {
        font-size: 1.6rem;
    }
    .mushaf-text-flow {
        font-size: 1.5rem;
        line-height: 2.4;
    }
}
