/* ==============================================================================
   SMART IQRA - MODERN ISLAMIC PREMIUM DESIGN SYSTEM
   Palette: Emerald, Warm Gold, Soft Pearl, Deep Slate
   Fonts: Plus Jakarta Sans & Amiri / Scheherazade New
   ============================================================================== */

:root {
    --primary: #059669;
    --primary-dark: #064e3b;
    --primary-light: #10b981;
    --primary-gradient: linear-gradient(135deg, #064e3b 0%, #059669 60%, #10b981 100%);
    --gold: #d97706;
    --gold-light: #fbbf24;
    --gold-gradient: linear-gradient(135deg, #d97706 0%, #f59e0b 50%, #fbbf24 100%);
    --bg-page: #f8fafc;
    --surface: #ffffff;
    --surface-glass: rgba(255, 255, 255, 0.88);
    --border-color: rgba(16, 185, 129, 0.15);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --shadow-sm: 0 2px 8px -2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 10px 25px -5px rgba(6, 78, 59, 0.08), 0 8px 10px -6px rgba(6, 78, 59, 0.04);
    --shadow-lg: 0 20px 35px -8px rgba(6, 78, 59, 0.14), 0 10px 15px -5px rgba(6, 78, 59, 0.06);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    --arabic-font: 'Amiri', 'Scheherazade New', 'Traditional Arabic', serif;
    --sans-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Global Reset & Base */
body {
    font-family: var(--sans-font);
    background-color: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-image: 
        radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.06) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(217, 119, 6, 0.04) 0px, transparent 50%);
    background-attachment: fixed;
    padding-bottom: 80px; /* Space for Mobile Bottom Nav */
}

@media (min-width: 992px) {
    body {
        padding-bottom: 0;
    }
}

.wrapper {
    background-color: transparent !important;
}

/* ==============================================================================
   Top Navigation Bar (Glassmorphic)
   ============================================================================== */
.main-header.navbar {
    background: var(--surface-glass) !important;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1030;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary-dark) !important;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.brand-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.15rem;
    box-shadow: 0 4px 10px rgba(5, 150, 105, 0.25);
}

.brand-text-subtitle {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: -2px;
}

.nav-action-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: #ffffff;
    color: var(--primary-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.nav-action-btn:hover {
    background: var(--primary);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

/* ==============================================================================
   Modern Islamic Cards & Surfaces
   ============================================================================== */
.iqra-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.iqra-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(16, 185, 129, 0.35);
}

.iqra-card-header {
    background: var(--primary-gradient);
    color: #ffffff;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    position: relative;
}

.iqra-card-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gold-gradient);
}

.iqra-card-body {
    padding: 1.5rem;
}

/* ==============================================================================
   Buttons & Interactive Elements
   ============================================================================== */
.btn-iqra-primary {
    background: var(--primary-gradient);
    color: #ffffff !important;
    border: none;
    border-radius: var(--radius-full);
    padding: 0.65rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.28);
    transition: all 0.25s ease;
    cursor: pointer;
}

.btn-iqra-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.35);
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
}

.btn-iqra-gold {
    background: var(--gold-gradient);
    color: #ffffff !important;
    border: none;
    border-radius: var(--radius-full);
    padding: 0.65rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(217, 119, 6, 0.28);
    transition: all 0.25s ease;
}

.btn-iqra-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(217, 119, 6, 0.38);
}

.btn-iqra-outline {
    background: #ffffff;
    color: var(--primary-dark) !important;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-full);
    padding: 0.6rem 1.4rem;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.25s ease;
}

.btn-iqra-outline:hover {
    background: rgba(16, 185, 129, 0.08);
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* ==============================================================================
   Hero Section & Welcome Styling
   ============================================================================== */
.hero-card {
    background: var(--primary-gradient);
    color: #ffffff;
    border-radius: var(--radius-lg);
    padding: 2.25rem 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-card::before {
    content: '﷽';
    font-family: var(--arabic-font);
    position: absolute;
    right: -20px;
    bottom: -30px;
    font-size: 8rem;
    opacity: 0.08;
    color: #ffffff;
    pointer-events: none;
    user-select: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    padding: 0.35rem 0.9rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.hero-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.hero-desc {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    max-width: 600px;
    margin-bottom: 1.5rem;
}

/* Quick Features Grid */
.feature-box {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.feature-box:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.feature-icon-wrapper {
    width: 68px;
    height: 68px;
    border-radius: 20px;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    transition: transform 0.3s ease;
}

.feature-box:hover .feature-icon-wrapper {
    transform: scale(1.1) rotate(4deg);
}

.feature-icon-green {
    background: rgba(16, 185, 129, 0.12);
    color: var(--primary);
}

.feature-icon-gold {
    background: rgba(245, 158, 11, 0.14);
    color: var(--gold);
}

.feature-icon-blue {
    background: rgba(14, 165, 233, 0.14);
    color: #0284c7;
}

.feature-icon-purple {
    background: rgba(168, 85, 247, 0.14);
    color: #9333ea;
}

/* ==============================================================================
   Home Interactive Menu Grid (Mobile First & Modern)
   ============================================================================== */
.home-menu-section {
    margin-bottom: 2rem;
}

.home-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 768px) {
    .home-menu-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }
}

.home-menu-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 1.15rem 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none !important;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    color: var(--text-primary);
}

.home-menu-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(16, 185, 129, 0.35);
    color: var(--text-primary);
}

.home-menu-card:active {
    transform: scale(0.97);
}

.home-menu-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 0.85rem;
    transition: transform 0.25s ease;
}

.home-menu-card:hover .home-menu-icon {
    transform: scale(1.12) rotate(3deg);
}

.home-menu-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.home-menu-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 3px;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.home-menu-desc {
    font-size: 0.76rem;
    color: var(--text-muted);
    line-height: 1.35;
    margin-bottom: 0;
}

.home-menu-action {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 0.75rem;
    transition: gap 0.2s ease;
}

.home-menu-card:hover .home-menu-action {
    gap: 7px;
}

/* Card variant colors */
.menu-green .home-menu-icon {
    background: rgba(16, 185, 129, 0.14);
    color: var(--primary);
}
.menu-green .home-menu-badge {
    background: rgba(16, 185, 129, 0.12);
    color: var(--primary-dark);
}
.menu-green .home-menu-action {
    color: var(--primary);
}

.menu-gold .home-menu-icon {
    background: rgba(245, 158, 11, 0.15);
    color: var(--gold);
}
.menu-gold .home-menu-badge {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
}
.menu-gold .home-menu-action {
    color: var(--gold);
}

.menu-blue .home-menu-icon {
    background: rgba(14, 165, 233, 0.15);
    color: #0284c7;
}
.menu-blue .home-menu-badge {
    background: rgba(14, 165, 233, 0.12);
    color: #0369a1;
}
.menu-blue .home-menu-action {
    color: #0284c7;
}

.menu-purple .home-menu-icon {
    background: rgba(236, 72, 153, 0.15);
    color: #db2777;
}
.menu-purple .home-menu-badge {
    background: rgba(236, 72, 153, 0.12);
    color: #be185d;
}
.menu-purple .home-menu-action {
    color: #db2777;
}

/* Mobile Hero & Menu Tuning */
@media (max-width: 576px) {
    .hero-card {
        padding: 1.25rem 1.15rem;
        margin-bottom: 1.15rem;
        border-radius: var(--radius-md);
    }
    .hero-card::before {
        font-size: 5rem;
        right: -10px;
        bottom: -20px;
    }
    .hero-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.6rem;
        margin-bottom: 0.4rem;
    }
    .hero-title {
        font-size: 1.35rem;
        line-height: 1.25;
        margin-bottom: 0.35rem;
    }
    .hero-desc {
        font-size: 0.8rem;
        margin-bottom: 0.75rem;
        line-height: 1.35;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .home-menu-card {
        padding: 0.9rem 0.8rem;
    }
    .home-menu-icon {
        width: 42px;
        height: 42px;
        font-size: 1.15rem;
        border-radius: 12px;
        margin-bottom: 0.6rem;
    }
    .home-menu-title {
        font-size: 0.88rem;
    }
    .home-menu-desc {
        font-size: 0.68rem;
    }
    .home-menu-badge {
        font-size: 0.58rem;
        padding: 2px 6px;
    }
    .home-menu-action {
        margin-top: 0.5rem;
        font-size: 0.68rem;
    }
}

/* ==============================================================================
   Arabic Typography & Controls
   ============================================================================== */
.arabic-box {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.arabic-header-ornament {
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
}

.arabic-header-ornament::before,
.arabic-header-ornament::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 25%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold-light), transparent);
}

.arabic-header-ornament::before { left: 5%; }
.arabic-header-ornament::after { right: 5%; }

.letter-doa, .arabic-text {
    direction: rtl;
    font-family: var(--arabic-font);
    font-weight: 700;
    line-height: 2.2;
    color: #1e293b;
    text-align: center;
    margin: 1.5rem 0;
    word-spacing: 4px;
    transition: font-size 0.25s ease;
}

/* Arabic Text Font Size Modifiers (Scoped strictly to Arabic text elements) */
.arabic-text.font-size-sm, .letter-doa.font-size-sm { font-size: 1.85rem !important; line-height: 2 !important; }
.arabic-text.font-size-md, .letter-doa.font-size-md { font-size: 2.35rem !important; line-height: 2.2 !important; }
.arabic-text.font-size-lg, .letter-doa.font-size-lg { font-size: 2.9rem !important; line-height: 2.3 !important; }
.arabic-text.font-size-xl, .letter-doa.font-size-xl { font-size: 3.5rem !important; line-height: 2.4 !important; }

/* General UI Text Size Utilities (for badges, labels, and small text) */
.font-size-xs { font-size: 0.75rem !important; line-height: 1.3 !important; }
.font-size-sm { font-size: 0.85rem !important; line-height: 1.4 !important; }
.font-size-base { font-size: 1rem !important; line-height: 1.5 !important; }
.font-size-lg { font-size: 1.25rem !important; line-height: 1.5 !important; }

/* Font Size Control Toolbar */
.font-size-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f1f5f9;
    border-radius: var(--radius-full);
    padding: 4px 6px;
    border: 1px solid #e2e8f0;
}

.font-size-btn {
    border: none;
    background: transparent;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.font-size-btn.active, .font-size-btn:hover {
    background: #ffffff;
    color: var(--primary-dark);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* ==============================================================================
   Speech Recognition & Microphone Wave Animation
   ============================================================================== */
.voice-test-panel {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    padding: 1.75rem 1.5rem;
    text-align: center;
    margin-top: 1.5rem;
    position: relative;
}

.mic-button-wrapper {
    position: relative;
    display: inline-block;
    margin: 1rem auto;
}

.btn-mic {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    border: none;
    background: var(--primary-gradient);
    color: #ffffff;
    font-size: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(5, 150, 105, 0.35);
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    z-index: 2;
}

.btn-mic:hover {
    transform: scale(1.08);
    box-shadow: 0 12px 30px rgba(5, 150, 105, 0.45);
}

.btn-mic.listening {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.45);
}

/* Radar Pulse Wave Animation */
.mic-pulse-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 74px;
    height: 74px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.35);
    z-index: 1;
    pointer-events: none;
    display: none;
}

.listening .mic-pulse-ring,
.is-listening .mic-pulse-ring {
    display: block;
    animation: radarPulse 1.6s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes radarPulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(2.2);
        opacity: 0;
    }
}

/* Audio Waveform Bars */
.waveform-bars {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 24px;
    margin: 10px auto;
}

.is-listening .waveform-bars {
    display: flex;
}

.wave-bar {
    width: 4px;
    background: #ef4444;
    border-radius: 2px;
    animation: waveAnimation 1s ease-in-out infinite alternate;
}

.wave-bar:nth-child(1) { height: 8px; animation-delay: 0.1s; }
.wave-bar:nth-child(2) { height: 16px; animation-delay: 0.25s; }
.wave-bar:nth-child(3) { height: 24px; animation-delay: 0.4s; }
.wave-bar:nth-child(4) { height: 14px; animation-delay: 0.15s; }
.wave-bar:nth-child(5) { height: 9px; animation-delay: 0.3s; }

@keyframes waveAnimation {
    0% { height: 6px; }
    100% { height: 26px; }
}

.speech-feedback-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin-top: 1rem;
    font-size: 0.95rem;
    min-height: 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.3s ease;
}

.spoken-result-display {
    min-height: 42px;
    font-family: var(--arabic-font), var(--sans-font);
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    direction: rtl;
    text-align: center;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: var(--radius-sm);
    border: 1px dashed #cbd5e1;
    word-break: break-word;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modern Result Feedback Cards (Success / Warning) */
.result-feedback-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 14px;
    margin-top: 10px;
    text-align: left;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    animation: fadeInSlideUp 0.35s ease forwards;
    max-width: 100%;
    box-sizing: border-box;
}

.result-feedback-box.success-feedback {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #10b981;
    color: #065f46;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.14);
}

.result-feedback-box.warning-feedback {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #f59e0b;
    color: #92400e;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.14);
}

.feedback-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.15rem;
}

.success-feedback .feedback-icon-wrap {
    background: #10b981;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.warning-feedback .feedback-icon-wrap {
    background: #f59e0b;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.3);
}

.feedback-content {
    flex: 1;
    min-width: 0;
}

.feedback-title {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.3;
    margin-bottom: 2px;
}

.feedback-desc {
    font-size: 0.8rem;
    line-height: 1.35;
    opacity: 0.9;
}

@keyframes fadeInSlideUp {
    0% {
        opacity: 0;
        transform: translateY(8px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animated feedback on reading */
.reading-success {
    animation: successPulse 0.8s ease-in-out;
    border-color: #10b981 !important;
    background-color: rgba(16, 185, 129, 0.08) !important;
}

.reading-error {
    animation: errorShake 0.6s ease-in-out;
    border-color: #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.08) !important;
}

@keyframes successPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); box-shadow: 0 0 25px rgba(16, 185, 129, 0.4); }
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}

/* ==============================================================================
   Favorites & Bookmark Floating Actions
   ============================================================================== */
.btn-bookmark {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn-bookmark:hover {
    color: #ef4444;
    transform: scale(1.1);
}

.btn-bookmark.bookmarked {
    color: #ef4444;
    background: #fef2f2;
    border-color: #fecaca;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

/* ==============================================================================
   Mobile Bottom Navigation Bar
   ============================================================================== */
.mobile-bottom-nav {
    position: fixed;
    bottom: 12px;
    left: 12px;
    right: 12px;
    margin: 0 auto;
    width: auto;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-full);
    border: 1px solid rgba(16, 185, 129, 0.25);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.16);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 6px 4px;
    z-index: 1050;
    box-sizing: border-box;
}

@media (min-width: 992px) {
    .mobile-bottom-nav {
        display: none !important;
    }
}

.mobile-nav-item {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 4px 2px;
    border-radius: 12px;
    transition: all 0.2s ease;
    text-align: center;
}

.mobile-nav-item span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
    line-height: 1.2;
}

.mobile-nav-item i {
    font-size: 1.15rem;
    margin-bottom: 2px;
    transition: transform 0.2s ease;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    color: var(--primary);
    background: rgba(16, 185, 129, 0.12);
}

.mobile-nav-item.active i {
    transform: translateY(-1px);
}

@media (max-width: 360px) {
    .mobile-bottom-nav {
        left: 8px;
        right: 8px;
        padding: 5px 2px;
    }
    .mobile-nav-item {
        font-size: 0.63rem;
        padding: 3px 1px;
    }
    .mobile-nav-item i {
        font-size: 1rem;
    }
}

/* ==============================================================================
   Doa Single Header & Navigation Pagination Styling
   ============================================================================== */
.btn-back-compact {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none !important;
    box-shadow: var(--shadow-xs);
    transition: all 0.2s ease;
}

.btn-back-compact:hover {
    background: #ecfdf5;
    border-color: var(--primary-light);
    color: var(--primary-dark);
    transform: translateX(-2px);
}

.btn-action-round {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xs);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-action-round:hover {
    color: var(--primary);
    border-color: var(--primary-light);
    transform: scale(1.08);
}

.doa-nav-pagination {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 12px;
    margin-top: 1.5rem;
}

.doa-nav-btn {
    flex: 1;
    min-width: 0;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-xs);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    color: var(--text-primary);
}

.doa-nav-btn:hover:not(.disabled) {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--primary-dark);
}

.doa-nav-btn.prev {
    text-align: left;
}

.doa-nav-btn.next {
    text-align: right;
    justify-content: flex-end;
}

.doa-nav-btn .nav-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.doa-nav-btn:hover:not(.disabled) .nav-icon {
    background: var(--primary-gradient);
    color: #ffffff;
}

.doa-nav-btn .nav-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.doa-nav-btn .nav-title {
    font-size: 0.88rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

/* ==============================================================================
   Audio Custom Player Styling
   ============================================================================== */
.custom-audio-wrapper {
    background: #f1f5f9;
    border-radius: var(--radius-full);
    padding: 6px 14px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 420px;
    margin: 0.75rem auto;
}

.audio-btn-play {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-gradient);
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(5, 150, 105, 0.25);
    cursor: pointer;
    transition: all 0.2s ease;
}

.audio-btn-play:hover {
    transform: scale(1.08);
}

audio {
    width: 100%;
    height: 36px;
    border-radius: 18px;
}

/* ==============================================================================
   Alphabet / Huruf Grid Cards
   ============================================================================== */
.huruf-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    height: 100%;
}

.huruf-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.letter-symbol-badge {
    font-family: var(--arabic-font);
    font-size: 3.2rem;
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.2;
    margin: 0.75rem 0;
    display: inline-block;
    transition: transform 0.25s ease;
}

.huruf-card:hover .letter-symbol-badge {
    transform: scale(1.1);
    color: var(--primary);
}

/* ==============================================================================
   Footer Styling
   ============================================================================== */
.main-footer {
    background: #ffffff;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-color);
    padding: 1.75rem 1rem;
    text-align: center;
    font-size: 0.88rem;
    margin-top: auto;
}

.main-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.main-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ==============================================================================
   Hafalan Sticky Controller Bar
   ============================================================================== */
.hafalan-controller-bar {
    position: sticky;
    bottom: 20px;
    z-index: 1020;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-color);
}

@media (max-width: 991px) {
    .hafalan-controller-bar {
        bottom: 78px !important;
    }
}

/* ==============================================================================
   Toast & Modals
   ============================================================================== */
.iqra-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    background: #ffffff;
    color: var(--text-primary);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1090;
    opacity: 0;
    transform: translateY(-15px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.iqra-toast.show {
    opacity: 1;
    transform: translateY(0);
}