/* style.css */
      * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: "Amiri", serif;

        }

        :root {
            --bg-primary: #f5f5f5;
            --bg-secondary: #ffffff;
            --text-primary: #504f4f;
            --text-secondary: #666666;
            --accent-color: #299d67;
            --accent-hover: #034d05;
            --border-color: #dddddd;
            --shadow-color: rgba(0, 0, 0, 0.1);
            --success-bg: #d4edda;
            --success-text: #155724;
            --success-border: #c3e6cb;
            --error-bg: #f8d7da;
            --error-text: #721c24;
            --error-border: #f5c6cb;
            --progress-bg: #e0e0e0;

            /* Spacing/radius/easing tokens — additive, not yet used everywhere */
            --space-xs: 4px;
            --space-sm: 8px;
            --space-md: 16px;
            --space-lg: 24px;
            --space-xl: 32px;
            --radius-sm: 8px;
            --radius-md: 16px;
            --radius-pill: 50px;
            --ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
            --transition-fast: 0.2s var(--ease-standard);
            --transition-base: 0.3s var(--ease-standard);
        }

        .dark-mode {
            /* Near-black base + a clearly lighter surface tone for real
               elevation contrast between page background and cards — the
               previous pair (#494848/#343534) were only ~9% apart in
               lightness, reading flat rather than "dark mode". */
            --bg-primary: #16181a;
            --bg-secondary: #1f2225;
            --text-primary: #ececec;
            --text-secondary: #a8adb3;
            --accent-color: #34b878;
            --accent-hover: #2a9c65;
            --border-color: #34383c;
            --shadow-color: rgba(0, 0, 0, 0.5);
            --success-bg: #133a1b;
            --success-text: #a2d9a5;
            --success-border: #1c5721;
            --error-bg: #3c1518;
            --error-text: #e4a7a7;
            --error-border: #5c2329;
            --progress-bg: #2a2d31;
        }

        body {
            background-color: var(--bg-primary);
            color: var(--text-primary);
            line-height: 1.6;
            transition: background-color 0.3s, color 0.3s;
        }

        /* Toast Notification Styles */
        .toast-container {
            position: fixed;
            top: 20px;
            right: 20px;
            z-index: 10000;
            display: flex;
            flex-direction: column;
            gap: 10px;
            max-width: 400px;
        }

        .toast {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 16px 20px;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
            background: var(--bg-secondary);
            border-left: 4px solid var(--accent-color);
            opacity: 0;
            transform: translateX(400px);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .toast-show {
            opacity: 1;
            transform: translateX(0);
        }

        .toast-hide {
            opacity: 0;
            transform: translateX(400px);
        }

        .toast-icon {
            font-size: 20px;
            flex-shrink: 0;
        }

        .toast-message {
            flex: 1;
            font-size: 14px;
            line-height: 1.4;
            color: var(--text-primary);
        }

        .toast-close {
            background: none;
            border: none;
            font-size: 20px;
            cursor: pointer;
            color: var(--text-secondary);
            padding: 0;
            width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 4px;
            transition: background-color 0.2s;
        }

        .toast-close:hover {
            background-color: var(--border-color);
        }

        .toast-success {
            border-left-color: #4caf50;
            background: var(--success-bg);
        }

        .toast-error {
            border-left-color: #f44336;
            background: var(--error-bg);
        }

        .toast-warning {
            border-left-color: #ff9800;
            background: #fff3e0;
        }

        .dark-mode .toast-warning {
            background: #4a3800;
        }

        .toast-info {
            border-left-color: #2196f3;
            background: #e3f2fd;
        }

        .dark-mode .toast-info {
            background: #1a3a52;
        }

        @media (max-width: 768px) {
            .toast-container {
                top: 10px;
                right: 10px;
                left: 10px;
                max-width: none;
            }

            .toast {
                padding: 12px 16px;
            }
        }

        .container {
            max-width: 1200px;
            margin: 0 auto;
            padding: 14px 20px;
        }

        header {
            background-color: var(--accent-color);
            color: white;
            padding: 14px 0;
            text-align: center;
            margin-bottom: 30px;
            border-radius: 5px;
            position: relative;
        }

        h1 {
            margin-bottom: 10px;
        }

        .theme-toggle {
            position: absolute;
            top: 20px;
            right: 20px;
            display: flex;
            align-items: center;
        }

        .theme-switch {
            position: relative;
            display: inline-block;
            width: 60px;
            height: 30px;
        }

        .theme-switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            transition: .4s;
            border-radius: 34px;
        }

        .slider:before {
            position: absolute;
            content: "☀️";
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 13px;
            line-height: 1;
            height: 22px;
            width: 22px;
            left: 4px;
            bottom: 4px;
            background-color: white;
            transition: .4s;
            border-radius: 50%;
        }

        input:checked + .slider {
            background-color: #0f222f;
        }

        input:checked + .slider:before {
            content: "🌙";
            transform: translateX(30px);
            background-color: #2c2f36;
        }

        .theme-icons {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-right: 10px;
            color: white;
        }

        .surah-list {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 20px;
            margin: 30px 0;
            padding: 10px;
            animation: fadeIn 0.5s ease-in-out;
            direction: rtl; /* Add this line */
        }

        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* Note: previously the styles here suppressed all error messages and browser dialogs.
           That behavior made debugging and user-feedback impossible; explicit visibility
           control should be handled via JS toggling classes instead of global !important rules. */

        .surah-item {
            display: flex;
            flex-direction: column;
            padding: 20px;
            border-radius: 15px;
            box-shadow: 0 2px 5px var(--shadow-color);
            transition: all 0.3s ease;
            border: 1px solid var(--border-color);
            background: linear-gradient(145deg, var(--bg-secondary), var(--bg-primary));
            cursor: pointer;
            position: relative;
            overflow: hidden;
        }

        .surah-item:hover {
            transform: translateY(-5px) scale(1.02);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
            border-color: var(--accent-color);
        }

        /* Corner ribbon indicating a surah has been opened (persisted in
           quranReadingProgress). Uses a diagonal triangle overlay + tiny
           checkmark for a clear "read" affordance without cluttering the
           row content. */
        .surah-item.surah-read::before {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            border-width: 0 44px 44px 0;
            border-style: solid;
            border-color: transparent var(--accent-color) transparent transparent;
            pointer-events: none;
        }
        .surah-item.surah-read::after {
            content: '\f00c'; /* fa-check */
            font-family: 'Font Awesome 6 Free';
            font-weight: 900;
            position: absolute;
            top: 4px;
            right: 4px;
            color: #fff;
            font-size: 11px;
            pointer-events: none;
        }

        .surah-name {
            font-weight: bold;
            font-size: 18px;
            margin-bottom: 5px;
        }

        .surah-info {
            color: var(--text-secondary);
            font-size: 14px;
        }

        .quran-content {
            background-color: var(--bg-secondary);
            padding: 30px;
            border-radius: 5px;
            box-shadow: 0 2px 5px var(--shadow-color);
            margin-bottom: 30px;
            direction: rtl;
            text-align: right;
            line-height: 2;
        }

        .surah-title {
            text-align: center;
            margin-bottom: 20px;
            font-size: 28px;
            color: var(--accent-color);
        }

        .verse {
            margin-bottom: 15px;
            font-size: 18px;
            position: relative;
            padding-right: 40px;
        }

        .verse-number {
            display: inline-block;
            width: 35px;
            height: 35px;
            background-color: var(--accent-color);
            color: white;
            border-radius: 50%;
            text-align: center;
            line-height: 35px;
            font-size: 14px;
            position: absolute;
            right: 0;
            top: 5px;
        }

        .notification-title {
            font-size: 20px;
            margin-bottom: 15px;
            color: var(--accent-color);
        }

        .back-to-top {
            position: fixed;
            bottom: 20px;
            right: 20px;
            background-color: var(--accent-color);
            color: white;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            justify-content: center;
            align-items: center;
            cursor: pointer;
            box-shadow: 0 2px 10px var(--shadow-color);
            transition: background-color 0.3s;
            opacity: 0;
            visibility: hidden;
        }

        .back-to-top {
            transition: opacity 0.25s ease, visibility 0.25s ease, background-color 0.3s, bottom 0.3s ease;
            z-index: 100;
        }

        .back-to-top.visible {
            opacity: 1;
            visibility: visible;
        }

        .back-to-top.with-install-banner {
            bottom: 96px;
        }

        .back-to-top:hover {
            background-color: var(--accent-hover);
        }

        @media (max-width: 480px) {
            .back-to-top {
                width: 44px;
                height: 44px;
                bottom: 16px;
                right: 16px;
            }
            .back-to-top.with-install-banner {
                bottom: 110px;
            }
        }

        .loading {
            text-align: center;
            padding: 40px;
            font-size: 20px;
            color: var(--text-secondary);
        }

        footer {
            text-align: center;
            padding: 20px;
            margin-top: 30px;
            color: var(--text-secondary);
            border-top: 1px solid var(--border-color);
        }

        .app-footer {
            position: relative;
            background: var(--bg-secondary);
            margin-top: 60px;
            padding: 40px 0 20px;
            border-top: none;
            box-shadow: 0 -4px 16px var(--shadow-color);
        }

        .app-footer::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, var(--accent-color) 0%, #62d19a 50%, var(--accent-color) 100%);
            background-size: 200% 100%;
            animation: gradient-slide 5s linear infinite;
        }

        .footer-inner {
            display: flex;
            flex-wrap: wrap;
            justify-content: space-around;
            align-items: center;
            gap: 30px;
            padding-bottom: 24px;
            border-bottom: 1px solid var(--border-color);
        }

        .footer-brand {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
        }

        .footer-brand .logo {
            max-width: 140px;
        }

        .footer-tagline {
            font-family: 'Amiri', 'Traditional Arabic', serif;
            color: var(--accent-color);
            font-size: 17px;
            margin: 0;
            font-weight: 600;
        }

        .footer-mission {
            font-size: 12px;
            color: var(--text-secondary);
            margin: 4px 0 0;
        }

        .footer-contact {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
        }

        .footer-contact-heading {
            color: var(--text-primary);
            font-size: 14px;
            margin: 0;
            font-weight: 600;
        }

        .footer-contact .contact-link {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 10px 18px;
            background: var(--bg-primary);
            border: 1px solid var(--border-color);
            border-radius: 30px;
            color: var(--accent-color);
            text-decoration: none;
            font-size: 14px;
            transition: all 0.3s ease;
            margin: 0;
        }

        .footer-contact .contact-link:hover {
            background: var(--accent-color);
            color: white;
            border-color: var(--accent-color);
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(52, 184, 120, 0.35);
        }

        .footer-contact .contact-link i {
            font-size: 15px;
        }

        .footer-actions {
            display: flex;
            gap: 8px;
            margin-top: 4px;
        }

        .footer-action {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 8px 14px;
            font-size: 13px;
            background: transparent;
            border: 1px solid var(--border-color);
            border-radius: 20px;
            color: var(--text-primary);
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .footer-action:hover {
            border-color: var(--accent-color);
            color: var(--accent-color);
            transform: translateY(-1px);
        }

        .footer-action i {
            font-size: 12px;
        }

        .footer-bottom {
            text-align: center;
            padding-top: 20px;
            color: var(--text-secondary);
            font-size: 13px;
        }

        .footer-bottom p {
            margin: 0;
        }

        .footer-love {
            margin-top: 6px !important;
            font-size: 12px;
            color: var(--text-secondary);
        }

        .footer-love i {
            color: #e74c3c;
            margin: 0 3px;
            animation: love-beat 1.6s ease-in-out infinite;
        }

        @keyframes love-beat {
            0%, 100% { transform: scale(1); }
            25% { transform: scale(1.3); }
            50% { transform: scale(1); }
        }

        @media (max-width: 600px) {
            .footer-inner {
                flex-direction: column;
                gap: 24px;
            }
            .footer-brand .logo {
                max-width: 110px;
            }
        }

        @media (max-width: 768px) {
            .quran-content {
                padding: 20px;
            }

            .verse {
                font-size: 18px;
            }

            .search-section {
                flex-direction: column;
            }

            .search-section input {
                width: 100%;
                border-radius: 240px;
            }

            .theme-toggle {
                position: static;
                justify-content: center;
                margin-top: 15px;
            }
        }

        .notification-status {
            margin-top: 15px;
            padding: 10px;
            border-radius: 5px;
            display: none;
            opacity: 0;
            transform: translateY(-10px);
            transition: all 0.3s ease;
        }

        .notification-status.success {
            display: block;
            background-color: var(--success-bg);
            color: var(--success-text);
            border: 1px solid var(--success-border);
        }

        .notification-status.error {
            display: block;
            background-color: var(--error-bg);
            color: var(--error-text);
            border: 1px solid var(--error-border);
        }

        .reading-progress {
            position: relative;
            background: var(--bg-secondary);
            padding: 14px 18px;
            border-radius: 16px;
            box-shadow: 0 4px 16px var(--shadow-color);
            margin: 14px 0;
            animation: slideInUp 0.6s ease-out;
            border: 1px solid var(--border-color);
            transition: transform 0.3s ease, box-shadow 0.3s ease;
            overflow: hidden;
        }

        .reading-progress::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient(90deg, var(--accent-color), #62d19a, var(--accent-color));
            background-size: 200% 100%;
            animation: gradient-slide 4s linear infinite;
        }

        .reading-progress:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 22px var(--shadow-color);
        }

        .progress-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 12px;
            margin-bottom: 8px;
        }

        .reading-progress h3 {
            font-size: 16px;
            margin: 0;
            color: var(--text-primary);
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-weight: 600;
        }

        .reading-progress h3 i {
            color: var(--accent-color);
            font-size: 18px;
        }

        .progress-stat {
            font-size: 13px;
            color: var(--text-secondary);
            font-weight: 600;
            white-space: nowrap;
            padding: 3px 10px;
            border-radius: 12px;
            background: var(--bg-primary);
            border: 1px solid var(--border-color);
        }

        .progress-bar {
            height: 18px;
            background: var(--progress-bg);
            border-radius: 50px;
            overflow: hidden;
            box-shadow: inset 0 2px 6px rgba(0,0,0,0.15);
            position: relative;
        }

        .progress-fill {
            height: 100%;
            min-width: 2px;
            background: linear-gradient(90deg, var(--accent-color) 0%, #48c988 50%, var(--accent-hover) 100%);
            background-size: 200% 100%;
            animation: gradient-slide 3s linear infinite;
            width: 0%;
            border-radius: 50px;
            /* Bouncy width transition — settles with a light overshoot so the
               fill "arrives" at the current progress instead of just extending
               linearly. Keeps the visual playful without feeling frantic. */
            transition: width 1.1s cubic-bezier(0.34, 1.15, 0.55, 1);
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            font-size: 11px;
            color: #fff;
            text-shadow: 0 1px 3px rgba(0,0,0,0.35);
            box-shadow: 0 0 12px rgba(52, 184, 120, 0.5);
        }

        .progress-fill::before {
            /* Shimmer — parent `.progress-bar` has overflow:hidden so the
               translateX doesn't spill past the bar even though `.progress-fill`
               itself is now overflow:visible (to allow the end-dot to sit
               proud of the fill's trailing edge). */
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0; bottom: 0;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.35), transparent);
            animation: shimmer 2.2s infinite;
            pointer-events: none;
        }

        .progress-fill::after {
            /* "You are here" — a soft glowing dot pinned at the end of the fill,
               gently pulsing. Uses translate() to visually center on the leading
               edge of the fill regardless of the fill's current width. */
            content: '';
            position: absolute;
            top: 50%;
            right: 0;
            width: 10px;
            height: 10px;
            border-radius: 50%;
            background: #fff;
            box-shadow: 0 0 0 3px rgba(255,255,255,0.35), 0 0 10px rgba(255,255,255,0.6);
            transform: translate(50%, -50%);
            animation: progress-dot-pulse 1.6s ease-in-out infinite;
            pointer-events: none;
        }

        @keyframes progress-dot-pulse {
            0%, 100% { box-shadow: 0 0 0 3px rgba(255,255,255,0.35), 0 0 10px rgba(255,255,255,0.6); }
            50%      { box-shadow: 0 0 0 6px rgba(255,255,255,0.15), 0 0 14px rgba(255,255,255,0.8); }
        }

        @keyframes gradient-slide {
            0% { background-position: 0% 50%; }
            100% { background-position: 200% 50%; }
        }

        .progress-stats-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
            margin-top: 12px;
        }

        .progress-stat-card {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 12px;
            background: var(--bg-primary);
            border: 1px solid var(--border-color);
            border-radius: 12px;
            transition: transform 0.2s ease, border-color 0.2s ease;
        }

        .progress-stat-card:hover {
            transform: translateY(-2px);
            border-color: var(--accent-color);
        }

        .progress-stat-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            width: 34px;
            height: 34px;
            border-radius: 10px;
            background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
            color: white;
            font-size: 14px;
        }

        .progress-stat-body {
            display: flex;
            flex-direction: column;
            min-width: 0;
        }

        .progress-stat-value {
            font-size: 15px;
            font-weight: 700;
            color: var(--text-primary);
            line-height: 1.2;
        }

        .progress-stat-label {
            font-size: 11px;
            color: var(--text-secondary);
            line-height: 1.3;
            margin-top: 2px;
        }

        @media (max-width: 600px) {
            .progress-stats-grid {
                grid-template-columns: 1fr;
                gap: 6px;
            }
            .progress-stat-value {
                font-size: 14px;
            }
        }

        @keyframes slideInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes shimmer {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }
      * {
            -webkit-text-size-adjust: 100%;
            -ms-text-size-adjust: 100%;
        }

        @media screen and (max-width: 768px) {
            html {
                font-size: 14px;
            }
            
            .container {
                width: 100%;
                padding: 10px;
            }

            .verse {
                font-size: 1.2rem;
                line-height: 1.8;
            }

            .surah-title {
                font-size: 1.5rem;
            }
        }

        @media screen and (max-width: 480px) {
            html {
                font-size: 12px;
            }

            .verse {
                font-size: 1rem;
            }

            .surah-title {
                font-size: 1.3rem;
            }

            .bismillah {
                font-size: 1.1rem;
            }
        }
        /* .animated-logo's working animation lives in the inline <style> block
           in index.html's header markup (it sets .dark-mode .animated-logo to
           filter: brightness(1), which is what's actually live) — this dead
           commented-out block plus an inert, shadowed dark-mode override used
           to sit here doing nothing. */
        .notification-options {
                display: flex;
                gap: 20px;
                flex-wrap: wrap;
                margin: 25px 0;
                justify-content: center;
            }

            .notification-option {
                display: flex;
                align-items: center;
                gap: 10px;
                position: relative;
                width: 200px;
            }

            .notification-option label {
                cursor: pointer;
            }

            .notification-option input[type="radio"] {
                display: none;

            }

            .option-label {
                width: 100%;
                box-sizing: border-box;
                background: var(--bg-secondary);
                display: flex;
                justify-content: center;
                padding: 5px;
                border: 2px solid var(--border-color);
                border-radius: 15px;
                cursor: pointer;
                transition: all 0.3s ease;
            }

            .option-content {
                width: 100%;
                display: flex;
                align-items: center;
                justify-content: center;
                gap: 15px;
            }

            .option-icon {
                font-size: 24px;
                color: var(--accent-color);
            }

            .option-text {
                display: flex;
                flex-direction: column;
            }

            .option-title {
                font-size: 18px;
                font-weight: bold;
                color: var(--text-primary);
            }

            .option-desc {
                font-size: 14px;
                color: var(--text-secondary);
            }

            .notification-option input[type="radio"]:checked + .option-label {
                border-color: var(--accent-color);
                box-shadow: 0 0 15px rgba(41, 157, 103, 0.2);
                transform: translateY(-3px);
            }

            @media (max-width: 480px) {
                .notification-options {
                    flex-direction: column;
                }

                .notification-option {
                    width: 100%;
                }
            }
 .time-type-options {
                    display: flex;
                    gap: 20px;
                    justify-content: center;
                    margin: 20px 0;
                }

                .radio-card {
                    flex: 1;
                    max-width: 200px;
                }

                .radio-card input[type="radio"] {
                    display: none;
                }

                .radio-card label {
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    padding: 8px;
                    background: var(--bg-secondary);
                    border: 2px solid var(--border-color);
                    border-radius: 24px;
                    cursor: pointer;
                    transition: all 0.3s ease;
                }

                .radio-card input[type="radio"]:checked + label {
                    border-color: var(--accent-color);
                    background: var(--accent-color);
                    color: white;
                    transform: translateY(-3px);
                }

                .radio-icon {
                    font-size: 14px;
                    margin-bottom: 0px;
                }

                .radio-text {
                    font-weight: bold;
                }

                .prayer-options {
                    display: grid;
                    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
                    gap:5px;
                    margin: 20px 0;
                }

                .prayer-btn {
                    display: flex;
                    flex-direction: row;
                    align-items: center;
                    padding: 15px;
                    background: var(--bg-secondary);
                    border: 2px solid var(--border-color);
                    border-radius: 12px;
                    cursor: pointer;
                    transition: all 0.3s ease;
                }

                .prayer-btn:hover, .prayer-btn.active {
                    border-color: var(--accent-color);
                    background: var(--accent-color);
                    color: white;
                    transform: translateY(-3px);
                }

                .prayer-icon {
                    font-size: 14px;
                    margin-bottom: 0px;
                }

                .prayer-name {
                    font-weight: bold;
                    margin-bottom: 0px;
                }

                .prayer-time {
                    font-size: 14px;
                    opacity: 0.8;
                }

                .time-input-container {
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    gap: 10px;
                }

                .input-icon {
                    font-size: 1px;
                    margin-left: 8px;
                }

                .step-label {
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    gap: var(--space-sm);
                    color: var(--text-secondary);
                    font-size: 14px;
                    font-weight: bold;
                    margin-bottom: var(--space-sm);
                }

                .step-number {
                    display: inline-flex;
                    align-items: center;
                    justify-content: center;
                    width: 22px;
                    height: 22px;
                    border-radius: 50%;
                    background: var(--accent-color);
                    color: white;
                    font-size: 12px;
                }

                .settings-title-row {
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    gap: 10px;
                    margin-bottom: 14px;
                }

                .settings-bell-badge {
                    flex-shrink: 0;
                    display: inline-flex;
                    align-items: center;
                    justify-content: center;
                    width: 40px;
                    height: 40px;
                    border-radius: 50%;
                    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
                    color: white;
                    font-size: 17px;
                    box-shadow: 0 4px 12px rgba(52, 184, 120, 0.35);
                    animation: badge-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
                }

                @keyframes badge-pop {
                    0% { transform: scale(0); }
                    100% { transform: scale(1); }
                }

                .settings-sentence {
                    text-align: center;
                    font-size: 17px;
                    line-height: 1.8;
                    color: var(--text-primary);
                    margin: 0;
                    padding: 12px 16px;
                    background: var(--bg-primary);
                    border-radius: 14px;
                    border: 1px dashed var(--border-color);
                }

                .settings-sentence .settings-value {
                    color: var(--accent-color);
                    font-weight: bold;
                }

                .settings-sentence-sub {
                    display: inline-block;
                    font-size: 14px;
                    color: var(--text-secondary);
                }

.current-settings {
                position: relative;
                background: var(--bg-secondary);
                border-radius: 20px;
                padding: 24px 22px 22px;
                margin: 20px auto;
                box-shadow: 0 8px 25px var(--shadow-color);
                border: 1px solid var(--border-color);
                border-top: none;
                overflow: hidden;
                transition: transform 0.3s ease, box-shadow 0.3s ease;
                animation: fadeInSettings 0.6s ease-out;
                max-width: 1200px; /* Increased max-width */
                width: 95%; /* Adjusted width */
            }

            .current-settings:hover {
                transform: translateY(-5px);
                box-shadow: 0 12px 30px var(--shadow-color);
            }

            .current-settings::before {
                content: '';
                position: absolute;
                top: 0;
                left: 0;
                right: 0;
                height: 4px;
                background: linear-gradient(90deg, var(--accent-color) 0%, #62d19a 50%, var(--accent-color) 100%);
                background-size: 200% 100%;
                animation: gradient-slide 4s linear infinite;
            }

            .settings-title {
                color: var(--text-primary);
                font-size: 18px;
                text-align: center;
                font-weight: 700;
                display: inline-block;
                margin: 0;
                width: auto;
            }

            .settings-summary {
                display: flex;
                flex-direction: row;
                justify-content: center;
                gap: 15px;
                padding: 10px;
                flex-wrap: nowrap; /* Changed to nowrap to keep items in one line */
            }

            .settings-item {
                flex: 1; /* Changed to flex 1 for equal width distribution */
                min-width: 200px; /* Set minimum width */
                display: flex;
                align-items: center;
                gap: 12px;
                padding: 15px;
                border-radius: 15px;
                background: var(--bg-primary);
                transition: all 0.3s ease;
                border: 1px solid var(--border-color);
                position: relative;
                overflow: hidden;
            }

            /* Rest of styles remain the same */
            .settings-item:hover {
                transform: translateY(-3px);
                box-shadow: 0 5px 15px var(--shadow-color);
                border-color: var(--accent-color);
            }

            .settings-icon {
                font-size: 18px;
                width: 35px;
                height: 35px;
                display: flex;
                align-items: center;
                justify-content: center;
                background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
                border-radius: 50%;
                color: white;
                box-shadow: 0 3px 10px rgba(41, 157, 103, 0.2);
                transition: transform 0.3s ease;
            }

            .settings-item:hover .settings-icon {
                transform: scale(1.1) rotate(360deg);
            }

            .settings-detail {
                flex: 1;
                position: relative;
                text-align: center;
            }

            .settings-detail label {
                display: block;
                color: var(--text-secondary);
                font-size: 13px;
                margin-bottom: 3px;
                transition: color 0.3s ease;
            }

            .settings-value {
                color: var(--text-primary);
                font-weight: bold;
                font-size: 15px;
                transition: color 0.3s ease;
            }

            .settings-item:hover .settings-detail label {
                color: var(--accent-color);
            }

            @keyframes fadeInSettings {
                from {
                    opacity: 0;
                    transform: translateY(30px);
                }
                to {
                    opacity: 1;
                    transform: translateY(0);
                }
            }

            @media (max-width: 768px) {
                .settings-summary {
                    flex-wrap: wrap; /* Allow wrapping on smaller screens */
                    justify-content: center;
                }
                
                .settings-item {
                    flex: 1 1 100%; /* Full width on mobile */
                    max-width: 300px;
                    margin-bottom: 10px;
                }
            }
            .time-input-container {
            text-align: center;
            margin: 20px 0;
            }

            .time-input-container label {
            display: block;
            margin-bottom: 10px;
            font-size: 16px;
            color: var(--text-primary);
            }

            /* This ID rule and .notification-time (the class on this same
               element) used to both style it — ID always wins over class
               regardless of source order, so .notification-time's own
               enhancement (bigger touch target, radius-pill token) was
               silently never actually applying. Consolidated here, since
               this is the rule specificity always picks. */
            #custom-time-input {
            padding: 16px 28px;
            border-radius: var(--radius-pill);
            border: 2px solid var(--accent-color);
            background: var(--bg-secondary);
            color: var(--text-primary);
            font-size: 20px;
            font-weight: bold;
            width: 220px;
            min-height: 56px;
            text-align: center;
            cursor: pointer;
            transition: border-color var(--transition-base), box-shadow var(--transition-base);
            }

            #custom-time-input:focus {
            outline: none;
            box-shadow: 0 0 0 4px rgba(41, 157, 103, 0.15);
            }
 .notification-section {
            direction: rtl;
            background: var(--bg-secondary);
            padding: 20px;
            border-radius: 20px;
            box-shadow: 0 8px 25px var(--shadow-color);
            margin: 16px 0;
        }

        .notification-icon {
            color: var(--accent-color);
            margin-left: 10px;
            animation: bell-ring 2s infinite;
        }

        @keyframes bell-ring {
            0% { transform: rotate(0); }
            5% { transform: rotate(25deg); }
            10% { transform: rotate(-20deg); }
            15% { transform: rotate(15deg); }
            20% { transform: rotate(-10deg); }
            25% { transform: rotate(0); }
            100% { transform: rotate(0); }
        }

        .notification-card {
            background: var(--bg-secondary);
            padding: 25px;
            border-radius: 15px;
            margin-top: 20px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.05);
        }

        .notification-title {
            color: var(--accent-color);
            font-size: 22px;
            margin-bottom: 14px;
            text-align: center;
            font-weight: bold;
        }

        .prayer-times {
            margin: 25px 0;
            text-align: center;
        }

        .prayer-times h4 {
            color: var(--text-primary);
            margin-bottom: 15px;
            font-size: 18px;
        }

        .prayer-options {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            justify-content: center;
        }

        .prayer-btn {
            padding: 12px 20px;
            border-radius: 50px;
            border: 2px solid var(--accent-color);
            background: transparent;
            color: var(--text-primary);
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .prayer-btn:hover, .prayer-btn.active {
            background: var(--accent-color);
            color: white;
            transform: translateY(-2px);
        }

        .custom-time {
            text-align: center;
            margin: 25px 0;
        }

        .custom-time h4 {
            color: var(--text-primary);
            margin-bottom: 15px;
            font-size: 18px;
        }

        .time-presets {
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            gap: var(--space-sm);
            margin-bottom: var(--space-sm);
        }

        .time-preset-chip {
            padding: var(--space-sm) var(--space-md);
            border: 2px solid var(--border-color);
            border-radius: var(--radius-pill);
            background: var(--bg-secondary);
            color: var(--text-primary);
            font-family: inherit;
            font-size: 14px;
            cursor: pointer;
            transition: all var(--transition-fast);
        }

        .time-preset-chip:hover {
            border-color: var(--accent-color);
            color: var(--accent-color);
        }

        .time-preset-chip.active {
            background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
            border-color: var(--accent-color);
            color: white;
        }

        .notification-actions {
            display: flex;
            gap: 15px;
            justify-content: center;
            margin-top: 30px;
        }

        .set-notification-btn, .reset-notification-btn {
            padding: 15px 30px;
            border-radius: 50px;
            font-size: 16px;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .set-notification-btn {
            background:  var(--accent-hover);
            color: white;
            border: none;
        }

        .reset-notification-btn {
            background: transparent;
            color: var(--text-primary);
            border: 2px solid var(--accent-color);
        }

        .set-notification-btn:hover, .reset-notification-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 5px 15px rgba(0,0,0,0.2);
        }

        .notification-status {
            margin-top: 20px;
            padding: 15px;
            border-radius: 12px;
            text-align: center;
            font-weight: bold;
            transition: all 0.3s ease;
        }

        @media (max-width: 768px) {
            .notification-section {
            padding: 20px;
            }
            
            .prayer-options {
            flex-direction: row;
            }
            
            #custom-time-input {
            width: 100%;
            }
            
            .notification-actions {
            flex-direction: column;
            }
            
            .set-notification-btn, .reset-notification-btn {
            width: 100%;
            justify-content: center;
            }
        }
 .search-section {
            display: flex;
            justify-content: center;
            flex-wrap: wrap;
            gap: 10px;
            margin: 30px 0;
        }

        .search-container {
            display: flex;
            gap: 10px;
            width: 100%;
            max-width: 600px;
            background: var(--bg-secondary);
            padding: 8px;
            border-radius: 50px;
            box-shadow: 0 4px 15px var(--shadow-color);
            position: relative;
            transition: box-shadow 0.3s ease;
        }

        .search-container:focus-within {
            box-shadow: 0 4px 15px var(--shadow-color), 0 0 0 3px rgba(41, 157, 103, 0.25);
        }

        .search-input-wrap {
            position: relative;
            display: flex;
            align-items: center;
            flex: 1;
            min-width: 0;
        }

        #search-input {
            width: 100%;
            padding: 15px 46px 15px 40px;
            border: none;
            border-radius: 30px;
            font-size: 18px;
            min-width: 0;
            background: var(--bg-primary);
            color: var(--text-primary);
            transition: all 0.3s ease;
        }

        #search-input:focus {
            outline: none;
            box-shadow: 0 0 0 2px var(--accent-color);
        }

        .search-icon-leading {
            position: absolute;
            right: 18px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-secondary);
            font-size: 16px;
            pointer-events: none;
            z-index: 1;
        }

        .search-clear-btn {
            position: absolute;
            left: 10px;
            top: 50%;
            transform: translateY(-50%);
            display: flex;
            align-items: center;
            justify-content: center;
            width: 26px;
            height: 26px;
            border: none;
            border-radius: 50%;
            background: var(--border-color);
            color: var(--text-primary);
            font-size: 12px;
            cursor: pointer;
            transition: background-color 0.2s ease;
            z-index: 1;
        }

        .search-clear-btn:hover {
            background: var(--accent-color);
            color: white;
        }

        #search-btn {
            display: flex;
            align-items: center;
            gap: var(--space-sm);
            padding: var(--space-md) 30px;
            background: var(--accent-color);
            border: none;
            border-radius: var(--radius-pill);
            color: white;
            font-size: 16px;
            cursor: pointer;
            transition: transform var(--transition-base), background-color var(--transition-base);
        }

        #search-btn:hover {
            background: var(--accent-hover);
            transform: translateY(-2px);
        }

        .search-icon {
            font-size: 20px;
        }

        .search-text {
            font-weight: bold;
        }

        @media (max-width: 480px) {
            .search-container {
                flex-direction: column;
                border-radius: 25px;
            }
            
            #search-btn {
                width: 100%;
                justify-content: center;
            }
        }
        .continue-btn {
            background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
            color: white;
            border: none;
            border-radius: 16px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 2px 6px rgba(41, 157, 103, 0.2);
            position: relative;
            overflow: hidden;
        }

        .continue-btn:hover {
            transform: translateX(-3px);
            box-shadow: 0 3px 10px rgba(41, 157, 103, 0.3);
        }

        .continue-btn:active {
            transform: translateX(-1px);
        }

        .btn-text {
            position: relative;
            z-index: 1;
        }

        .btn-icon {
            position: relative;
            z-index: 1;
            transition: transform 0.3s ease;
            font-size: 10px;
        }

        .continue-btn:hover .btn-icon {
            transform: translateX(3px);
        }

        .continue-btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, rgba(255,255,255,0.1), rgba(255,255,255,0.2));
            transform: translateX(-100%);
            transition: transform 0.6s ease;
        }

        .continue-btn:hover::before {
            transform: translateX(100%);
        }
        .ayah-bookmark-icon {
            margin-left: -1px;
            font-size: -1.1em;
            vertical-align: super;
            transition: color 0.2s;
            /* Hide by default, only show if bookmarked */
            display: none;
        }
        .ayah-bookmark-icon.bookmarked {
            color: #f7b731 !important;
            filter: drop-shadow(0 2px 6px #f7b73133);
            animation: bookmarkBounce 0.7s;
            display: inline !important;
        }
        .ayah-bookmark-icon:hover {
            color: #f7b731 !important;
        }
        @keyframes bookmarkBounce {
            0% { transform: scale(1) translateY(0);}
            30% { transform: scale(1.2) translateY(-4px);}
            60% { transform: scale(0.95) translateY(2px);}
            100% { transform: scale(1) translateY(0);}
        }
        .back-navigation {
        text-align: center;
        margin: 30px auto;
        padding: 0 20px;
        max-width: 100%;
        animation: fadeInUp 0.5s ease-out;
        }

        @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
        }

        /* Consolidated from what used to be three competing layers (this rule,
           an inline style="" attribute on the generated button that won on
           every overlapping property, and a <style> block re-injected into the
           DOM on every displaySurahContent() call) into this single rule set —
           values below match what was actually rendering (the inline styles),
           not the old clamp()-based values this rule previously had. */
        .back-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0px;
        padding: 6px 2px;
        background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
        color: white;
        border: none;
        border-radius: 50px;
        font-size: 18px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 15px rgba(41, 157, 103, 0.2);
        position: relative;
        overflow: hidden;
        margin: 0 auto;
        }

        .back-button:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(41, 157, 103, 0.3);
        }

        .back-button:active {
        transform: translateY(-1px);
        box-shadow: 0 3px 10px rgba(41, 157, 103, 0.2);
        }

        .button-icon {
        font-size: 18px;
        transform: translateX(0);
        transition: transform 0.3s ease;
        }

        .back-button:hover .button-icon {
        transform: translateX(-5px);
        }

        .button-text {
        font-family: inherit;
        position: relative;
        z-index: 1;
        text-align: center;
        white-space: nowrap;
        }

        .button-glow {
        position: absolute;
        top: -50%;
        left: -50%;
        width: 200%;
        height: 200%;
        background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
        transform: rotate(45deg);
        pointer-events: none;
        transition: transform 0.6s ease;
        }

        .back-button:hover .button-glow {
        transform: rotate(45deg) translateY(-10%);
        }

        @media (max-width: 480px) {
        .back-button {
            width: 100%;
            padding: 14px 24px;
            font-size: 16px;
        }
        }

        @media (hover: none) {
        .back-button:hover {
            transform: none;
            box-shadow: 0 4px 15px rgba(41, 157, 103, 0.2);
        }
        }
        .search-dropdown {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: var(--bg-secondary);
            border-radius: 10px;
            box-shadow: 0 4px 15px var(--shadow-color);
            margin-top: 5px;
            max-height: 300px;
            overflow-y: auto;
            z-index: 1000;
            display: none;
        }
        
        .search-result-item {
            padding: 12px 20px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 10px;
            transition: background-color 0.2s;
        }
        
        .search-result-item:hover {
            background-color: var(--accent-color);
            color: white;
        }
        
        .result-number {
            font-weight: bold;
            color: var(--accent-color);
        }
        
        .search-result-item:hover .result-number {
            color: white;
        }
        
        .result-name {
            font-weight: bold;
        }
        
        .result-english {
            color: var(--text-secondary);
            font-size: 0.9em;
        }
        
        .search-result-item:hover .result-english {
            color: rgba(255, 255, 255, 0.8);
        }
        
        .no-results {
            padding: 15px;
            text-align: center;
            color: var(--text-secondary);
        }
        .contact-info {
            text-align: center;
            margin: 20px 0;
            padding: 20px;
            border-top: 1px solid var(--border-color);
        }

        .contact-link {
            display: inline-block;
            margin: 10px;
            color: var(--accent-color);
            text-decoration: none;
            transition: all 0.3s ease;
        }

        .contact-link:hover {
            color: var(--accent-hover);
            transform: translateY(-2px);
        }

        .contact-link i {
            margin-right: 5px;
        }

        .copyright-text {
            font-size: 0.9em;
            color: var(--text-secondary);
            margin-top: 15px;
        }
        /* Footer logo inversion in dark mode */
        .dark-mode #theme-logo-footer {
            filter: invert(1);
        }
        .logo {
            max-width: 200px;
            transition: filter 0.3s;
        }

.quran-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    direction: rtl;
}

.surah-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    border-radius: 15px;
    background: var(--bg-secondary);
}

.surah-title {
    font-size: 32px;
    color: var(--accent-color);
    margin-bottom: 10px;
}

/* Renamed from .surah-info to avoid colliding with the live 14px surah-list
   card subtitle above (.surah-info at the top of this file) — this block is
   part of an orphaned .quran-container detail-view cluster that no current
   JS generates (see displaySurahContent), kept for a possible future pass. */
.quran-detail-info {
    color: var(--text-secondary);
    font-size: 18px;
    margin-bottom: 10px;
}

.bismillah {
    text-align: center;
    font-size: 28px;
    margin: 20px 0;
    color: var(--text-primary);
}

.verse {
    margin-bottom: 25px;
    position: relative;
    padding: 0 45px 0 20px;
}

.verse-text {
    font-family: inherit;
    font-size: 18px;
    line-height: 2;
    color: var(--text-primary);
    text-align: right;
    margin: 0;
    padding: 0;
}

.verse-text .arabic {
    word-spacing: -1.1em;
    letter-spacing: 0;
}

.verse-number {
    position: absolute;
    right: 0;
    top: 5px;
    width: 35px;
    height: 35px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-family: inherit;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .quran-container {
        padding: 15px;
    }

    .surah-title {
        font-size: 28px;
    }

    .verse-text {
        font-size: 18px;
        line-height: 1.8;
    }

    .verse {
        padding: 0 40px 0 15px;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .surah-title {
        font-size: 24px;
    }

    .verse-text {
        font-size: 18px;
        line-height: 1.7;
    }

    .verse {
        padding: 0 35px 0 10px;
        margin-bottom: 15px;
    }

    .verse-number {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }
}

/* Arabic text optimizations */
.arabic {
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Ensure proper text flow */
.verse-text {
    text-align-last: right;
    text-justify: none;
    white-space: normal;
    overflow-wrap: normal;
}

/* Prevent unwanted justification */
.verse-text .arabic {
    display: inline;
    word-spacing: normal !important;
    letter-spacing: normal !important;
}

/* Print styles */
@media print {
    .quran-container {
        max-width: none;
        padding: 0;
    }
    
    .verse-text {
        page-break-inside: avoid;
    }
    
    .verse-number {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}

/* Shared button component — new buttons should use these instead of
   reimplementing padding/radius/transition from scratch. Existing one-off
   buttons (.prayer-btn, .back-button, .continue-btn) keep their bespoke
   styling rather than being forced onto this, since they have stateful or
   structural needs (.active toggle, clamp()-based responsive sizing, shimmer
   sweep) a generic class doesn't model. */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    border: none;
    border-radius: var(--radius-pill);
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    font-weight: bold;
    transition: transform var(--transition-base), box-shadow var(--transition-base), background-color var(--transition-base);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white;
    box-shadow: 0 2px 8px rgba(41, 157, 103, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(41, 157, 103, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-icon {
    padding: var(--space-sm);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    background: transparent;
    color: var(--accent-color);
    font-size: 18px;
}

.btn-icon:hover {
    background: var(--bg-secondary);
}

.btn-icon-active {
    background: var(--accent-color);
    color: white;
}

.btn-icon-active:hover {
    background: var(--accent-hover);
}

/* Reciter picker — was a completely unstyled native <select> (zero CSS),
   the only bare-browser-default control left on the page. Kept as a native
   <select> rather than a custom listbox (same call as #search-input/
   #search-btn in round 2) — full keyboard/screen-reader support for free. */
#reciter-select {
    appearance: none;
    -webkit-appearance: none;
    direction: rtl;
    padding: var(--space-sm) 36px var(--space-sm) var(--space-md);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-pill);
    background-color: var(--bg-secondary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23299d67' stroke-width='2'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 14px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: border-color var(--transition-base);
}

#reciter-select:hover {
    border-color: var(--accent-color);
}

#reciter-select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(41, 157, 103, 0.15);
}

/* Uniform separation between consecutive ayahs. The template deliberately
   emits no whitespace between .ayah-block elements — this margin is the only
   thing that separates them, so the gap is identical on every line instead of
   varying with where the line happens to wrap. */
.ayah-block {
    margin-left: 0.35em;
}

/* Surah reading card — responsive across all screen sizes.
   - max-width caps line measure on desktop for readability.
   - clamp() padding/font scale smoothly from mobile to desktop.
   - Font-size is set here on .ayah-text (inherits font-family from container)
     so ayah number can match via font-size:1em without a second clamp fight. */
.verse-content {
    font-family: inherit;
    font-size: clamp(19px, 4.2vw, 26px);
    line-height: 2.2;
    padding: clamp(16px, 4vw, 32px);
    margin: 16px auto;
    width: 100%;
    max-width: min(760px, 100%);
    background: var(--bg-secondary);
    border-radius: 24px;
    box-shadow: 0 8px 25px var(--shadow-color);
    font-weight: 500;
    display: block;
    text-align: right;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-break: keep-all;
    direction: rtl;
    text-rendering: optimizeLegibility;
}

.verse-content .ayah-text {
    font-family: inherit;
    font-size: 1em;
    display: inline;
}

.verse-content .ayah-number {
    font-family: inherit;
    color: var(--accent-color);
    font-size: 0.9em;
    font-weight: 600;
    display: inline-block;
    vertical-align: -0.08em;
    cursor: pointer;
    padding: 0 8px;
    line-height: 1;
}

@media (max-width: 480px) {
    .verse-content {
        border-radius: 18px;
        padding: 14px 12px;
        margin: 12px auto;
    }
}

/* English translation shown under each ayah when the translation toggle is on */
.ayah-translation {
    display: block;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 6px 0 14px 0;
    text-align: left;
    direction: ltr;
    word-spacing: normal;
    letter-spacing: normal;
}

/* Reading-view controls row (font-size, translation toggle, audio) shown
   above the ayahs once a surah is open */
.reading-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-md);
}

.reading-controls .controls-group {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-pill);
    padding: 2px;
}

/* PWA install banner — a floating rounded "ribbon" card instead of a flat
   edge-to-edge bar, matching the app's card/shadow language used elsewhere.
   JS toggles `display` + the `.show` class (see installBanner script) to
   drive the slide-up entrance transition. */
.install-banner {
    display: none;
    align-items: center;
    gap: 10px;
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    max-width: 480px;
    margin: 0 auto;
    background: var(--accent-color);
    color: white;
    padding: 14px 18px;
    border-radius: var(--radius-lg, 20px);
    box-shadow: 0 8px 25px var(--shadow-color);
    font-family: inherit;
    z-index: 9999;
    transform: translateY(30px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.install-banner.show {
    transform: translateY(0);
    opacity: 1;
}

.install-banner-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    font-size: 1.1em;
}

.install-banner-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

.install-banner-btn {
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    transition: transform var(--transition-base), background-color var(--transition-base);
    white-space: nowrap;
}

.install-banner-btn:hover {
    transform: translateY(-2px);
}

.install-banner-btn-primary {
    background: #fff;
    color: var(--accent-color);
    border: none;
    font-weight: 700;
    animation: install-pulse 1.8s ease-in-out infinite;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.install-banner-btn-primary i {
    font-size: 13px;
}

.install-banner-btn-primary:hover {
    animation-play-state: paused;
}

@keyframes install-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); }
    70%      { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .install-banner-btn-primary {
        animation: none;
    }
}

.install-banner-btn-ghost {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

@media (max-width: 480px) {
    .install-banner {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
        bottom: 10px;
        left: 10px;
        right: 10px;
    }
}

/* Shared "dashboard card" treatment — same rounded shell + shadow + border
   the reminder-summary and reading-progress cards already use. Both Azkar
   and Qibla cards inherit this so the dashboard reads as one system. */
.dashboard-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 16px 0;
}

.dashboard-card {
    position: relative;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 20px;
    padding: 18px 18px 20px;
    box-shadow: 0 8px 25px var(--shadow-color);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color) 0%, #62d19a 50%, var(--accent-color) 100%);
    background-size: 200% 100%;
    animation: gradient-slide 4s linear infinite;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px var(--shadow-color);
}

.dashboard-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.dashboard-card-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    flex: 1;
}

.dashboard-card-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(52, 184, 120, 0.3);
}

.qibla-icon-badge {
    background: linear-gradient(135deg, #d4a03e, #b58328);
    box-shadow: 0 4px 12px rgba(212, 160, 62, 0.35);
}

/* Azkar card ---------------------------------------------------------- */
.azkar-tabs {
    display: inline-flex;
    background: var(--bg-primary);
    border-radius: 999px;
    padding: 3px;
    border: 1px solid var(--border-color);
}

.azkar-tab {
    background: transparent;
    border: none;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}
.azkar-tab.active {
    background: var(--accent-color);
    color: white;
}

.azkar-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}

.azkar-virtue {
    display: none;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-color);
    background: rgba(52, 184, 120, 0.12);
    padding: 2px 10px;
    border-radius: 999px;
}

.azkar-text {
    font-family: 'Amiri', 'Traditional Arabic', serif;
    font-size: clamp(17px, 3.8vw, 22px);
    line-height: 2;
    color: var(--text-primary);
    padding: 12px 8px;
    min-height: 6em;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    word-spacing: 1px;
}

.azkar-counter-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, var(--accent-color), var(--accent-hover));
    color: white;
    border: none;
    padding: 10px 26px;
    border-radius: 999px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(52, 184, 120, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    min-width: 110px;
    justify-content: center;
}
.azkar-counter-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(52, 184, 120, 0.45); }
.azkar-counter-btn:active { transform: scale(0.96); }
.azkar-counter-btn.is-done { background: linear-gradient(135deg, #d4a03e, #b58328); box-shadow: 0 6px 16px rgba(212, 160, 62, 0.4); }

.azkar-slash { opacity: 0.6; margin: 0 2px; }

.azkar-controls {
    display: flex;
    gap: 8px;
}

.azkar-controls .btn-icon {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
}
.azkar-controls .btn-icon:hover { background: var(--accent-color); color: white; border-color: var(--accent-color); }
.azkar-controls .btn-icon:disabled { opacity: 0.35; cursor: not-allowed; }

.azkar-dots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    margin-top: 2px;
}
.azkar-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--border-color);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}
.azkar-dot.done    { background: var(--accent-hover); }
.azkar-dot.current { background: var(--accent-color); transform: scale(1.6); }

/* Qibla card ---------------------------------------------------------- */
.qibla-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.compass {
    position: relative;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle at 50% 40%, rgba(255,255,255,0.06), transparent 60%),
                var(--bg-primary);
    border: 2px solid var(--border-color);
    box-shadow: inset 0 4px 12px rgba(0,0,0,0.15);
    margin: 4px 0;
}

.compass-ring {
    position: absolute; inset: 0;
}

.compass-cardinal {
    position: absolute;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
}
.compass-n { top: 6px;    left: 50%; transform: translateX(-50%); color: #d4a03e; }
.compass-e { right: 8px;  top: 50%; transform: translateY(-50%); }
.compass-s { bottom: 6px; left: 50%; transform: translateX(-50%); }
.compass-w { left: 8px;   top: 50%; transform: translateY(-50%); }

.compass-needle {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 6px;
    height: 42%;
    background: linear-gradient(180deg, transparent 0%, transparent 45%, #d4a03e 45%, #d4a03e 100%);
    border-radius: 3px;
    transform-origin: 50% 100%;
    transform: translate(-50%, -100%) rotate(0deg);
    transition: transform 0.3s ease-out;
    filter: drop-shadow(0 2px 4px rgba(212, 160, 62, 0.5));
    pointer-events: none;
}
.compass-needle::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-bottom-color: #d4a03e;
    filter: drop-shadow(0 -2px 3px rgba(212, 160, 62, 0.5));
}

.compass-center {
    position: absolute;
    left: 50%; top: 50%;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: #d4a03e;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 3px var(--bg-primary), 0 0 0 4px var(--accent-color);
}

.qibla-bearing {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-color);
    direction: rtl;
}

.qibla-distance {
    font-size: 13px;
    color: var(--text-secondary);
}

.qibla-status {
    font-size: 12px;
    color: var(--text-secondary);
    min-height: 1.2em;
}

.qibla-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #d4a03e, #b58328);
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(212, 160, 62, 0.35);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.qibla-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(212, 160, 62, 0.45); }
.qibla-cta:disabled { opacity: 0.6; cursor: not-allowed; }

/* Dashboard responsive stacking */
@media (max-width: 768px) {
    .dashboard-row { grid-template-columns: 1fr; gap: 14px; }
    .compass { width: 160px; height: 160px; }
    .dashboard-card-header h3 { font-size: 15px; }
}

@media (max-width: 480px) {
    .dashboard-card { padding: 14px 14px 16px; border-radius: 16px; }
    .azkar-text { font-size: 17px; padding: 8px 4px; }
    .azkar-counter-btn { padding: 9px 22px; font-size: 16px; }
}

/* Internal test/diagnostics panel — hidden by default, only shown by
   js/diagnostic-tools.js when the page is loaded with ?debug=1 */
.debug-tools {
    display: none;
}