:root {
    --brand-blue: #1e3a8a;
    --brand-accent: #3b82f6;
    --brand-peach: #fff7ed;
    --brand-peach-dark: #ffedd5;
    --brand-gold: #fbbf24;
}

body {
    font-family: 'Nunito', sans-serif;
    background-color: var(--brand-peach);
    color: #1e3a8a;
    /* CHANGED: Removed overflow-hidden and h-screen to allow full page scrolling */
    min-height: 100vh;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* QURAN TEXT */
.quran-text {
    font-family: 'Amiri', serif;
    line-height: 2.8; 
    direction: rtl;
}

/* --- WAQF BOX --- */
.rule-waqf-symbol {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #fef9c3;
    color: #b45309;
    border: 1px solid #d97706;
    border-radius: 6px; 
    min-width: 32px;
    height: 30px;
    margin: 0 5px; 
    padding: 0 4px;
    font-family: 'Amiri', serif;
    font-size: 1.0rem;
    font-weight: bold;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    vertical-align: middle;
    cursor: pointer;
    position: relative;
    top: -5px;
}

/* INTERACTIVE WORDS */
.interactive-word {
    display: inline-block;
    padding: 2px 0;
    border-radius: 6px;
    cursor: pointer;
}
.interactive-word:hover {
    background-color: rgba(30, 58, 138, 0.08);
}

/* --- CONNECTED LETTERS --- */
.tajweed-char { 
    display: inline; 
    cursor: pointer;
    border-bottom: 2px solid currentColor;
}

/* COLORS */
.rule-madd { color: #dc2626; }       /* Red */
.rule-ghunna { color: #16a34a; }     /* Green */
.rule-qalqalah { color: #2563eb; }   /* Blue */

/* --- FLOATING MIC BUTTON --- */
.mic-fab {
    position: fixed;
    bottom: 30px; /* Moved lower since we removed bottom nav padding constraint */
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #dc2626;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.4);
    z-index: 50;
    cursor: pointer;
    transition: transform 0.2s;
}
.mic-fab:hover { transform: scale(1.1); }
.mic-fab:active { transform: scale(0.9); }

/* --- RECORDER MODAL --- */
.recorder-ring {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: #fee2e2;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 16px auto;
    cursor: pointer;
}
.is-recording-anim { animation: pulse-red 1.5s infinite; background-color: #fecaca; }
@keyframes pulse-red { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }

.custom-range {
    -webkit-appearance: none; width: 100%; height: 6px;
    background: #e5e7eb; border-radius: 5px; outline: none;
}
.custom-range::-webkit-slider-thumb {
    -webkit-appearance: none; width: 16px; height: 16px;
    border-radius: 50%; background: #1e3a8a; cursor: pointer;
}

.rec-controls {
    display: flex; gap: 15px; justify-content: center; margin-top: 15px; padding-top: 15px; border-top: 1px solid #f3f4f6;
}
.btn-round-action {
    width: 45px; height: 45px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 1.1rem; transition: all 0.2s;
}
.btn-save { background-color: #dbeafe; color: #2563eb; }
.btn-save:hover { background-color: #bfdbfe; }
.btn-del { background-color: #fee2e2; color: #dc2626; }
.btn-del:hover { background-color: #fecaca; }

/* LEGEND & ANIMATIONS */
.legend-item { display: flex; align-items: center; font-size: 0.75rem; margin-right: 12px; margin-bottom: 4px; font-weight: 700; color: #4b5563; }
.legend-dot { width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; }

@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.animate-slide-in { animation: slideIn 0.3s ease-out forwards; }
@keyframes slideInRight { from { transform: translateX(100%); } to { transform: translateX(0); } }
.animate-slide-right { animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.animate-slide-up { animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes popIn { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.animate-pop-in { animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }

.ayah-container { 
    border-radius: 16px; padding: 20px 16px; 
    transition: all 0.2s ease; border-bottom: 1px solid rgba(0,0,0,0.05);
    background: rgba(255,255,255,0.8); margin-bottom: 12px;
}
.ayah-container:hover { background-color: #fff; box-shadow: 0 4px 10px -2px rgba(0, 0, 0, 0.1); }
.ayah-playing { background-color: #f0fdf4 !important; border-right: 4px solid #10b981; }
.ayah-end { color: #d97706; font-family: 'Amiri', serif; font-size: 1.2em; margin-right: 12px; display: inline-block; vertical-align: middle; }
.nav-btn.active i, .nav-btn.active span { color: inherit; }