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

        :root {
            --primary: #0d9488;
            --primary-dark: #115e59;
            --secondary: #f0fdfa;
            --accent: #f59e0b;
            --text: #1e293b;
            --light: #f8fafc;
            --dark: #0f172a;
            --gold: #ca8a04;
            --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

        body {
            font-family: 'El Messiri', 'Amiri', sans-serif;
            background: linear-gradient(135deg, #f0fdfa 0%, #e0f2fe 100%);
            color: var(--text);
            min-height: 100vh;
            position: relative;
            background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="%23f0fdfa" opacity="0.9"/><path d="M50,0 C50,0 95,25 95,50 C95,75 50,100 50,100 C50,100 5,75 5,50 C5,25 50,0 50,0 Z" fill="%23e0f2fe" opacity="0.2"/></svg>');
            background-size: cover;
            transition: background 0.5s ease;
        }

        body.dark-mode {
            --text: #f1f5f9;
            --light: #1e293b;
            background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
            color: var(--text);
        }

        .container {
            max-width: 1400px;
            margin: 0 auto;
            padding: 1rem;
        }

        header {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            color: white;
            padding: 1rem 0;
            box-shadow: var(--shadow);
            position: sticky;
            top: 0;
            z-index: 100;
        }

        .navbar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: relative;
        }

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

        .logo i {
            font-size: 2rem;
            color: var(--accent);
        }

        .logo h1 {
            font-size: 1.8rem;
            font-weight: 700;
        }

        .nav-links {
            display: flex;
            gap: 1.5rem;
        }

        .nav-links a {
            color: white;
            text-decoration: none;
            font-size: 1.1rem;
            font-weight: 500;
            transition: all 0.3s ease;
            padding: 0.5rem;
            border-radius: 0.5rem;
        }

        .nav-links a:hover {
            background-color: rgba(255, 255, 255, 0.1);
        }

        .mobile-menu-btn {
            display: none;
            background: none;
            border: none;
            color: white;
            font-size: 1.5rem;
            cursor: pointer;
        }

        .theme-toggle {
            background: none;
            border: none;
            color: white;
            font-size: 1.5rem;
            cursor: pointer;
            margin-left: 1rem;
            /* تغيير من margin-right إلى margin-left */
        }

        .app-container {
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 1.5rem;
            margin: 2rem 0;
        }

        @media (max-width: 992px) {
            .app-container {
                grid-template-columns: 1fr;
            }

            .player-container {
                order: 1;
            }

            .suras-container {
                order: 2;
            }
        }

        .suras-container {
            background-color: var(--light);
            border-radius: 1rem;
            box-shadow: var(--shadow);
            padding: 1.5rem;
            max-height: 80vh;
            overflow-y: auto;
        }

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

        .suras-header h2 {
            color: var(--primary-dark);
            font-size: 1.6rem;
        }

        .search-box {
            position: relative;
            width: 70%;
        }

        .search-box input {
            width: 100%;
            padding: 0.75rem 1rem 0.75rem 3rem;
            border: 1px solid #cbd5e1;
            border-radius: 2rem;
            font-family: inherit;
            font-size: 1rem;
            background-color: var(--light);
            color: var(--text);
        }

        .search-box i {
            position: absolute;
            left: 1.25rem;
            top: 50%;
            transform: translateY(-50%);
            color: var(--primary);
        }

        .suras {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 1rem;
        }

        .sura-card {
            background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
            border-radius: 0.75rem;
            padding: 1rem;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            border: 1px solid #e2e8f0;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
            position: relative;
        }

        .sura-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
            border-color: var(--primary);
            background: linear-gradient(135deg, #f0fdfa 0%, #cffafe 100%);
        }

        .sura-card.active {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            color: white;
            border-color: var(--primary-dark);
        }

        .sura-card .number {
            background-color: var(--accent);
            color: white;
            width: 30px;
            height: 30px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 0.75rem;
            font-weight: bold;
        }

        .sura-card .ar-name {
            font-size: 1.25rem;
            font-weight: 700;
            margin-bottom: 0.25rem;
            color: var(--primary-dark);
        }

        .sura-card .en-name {
            font-size: 0.85rem;
            color: var(--dark);
            opacity: 0.8;
        }

        .sura-card.active .ar-name,
        .sura-card.active .en-name {
            color: white;
        }

        .favorite-btn {
            position: absolute;
            top: 0.5rem;
            left: 0.5rem;
            background: none;
            border: none;
            color: #d1d5db;
            font-size: 1.2rem;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .favorite-btn.active {
            color: var(--accent);
        }

        .player-container {
            background-color: var(--light);
            border-radius: 1rem;
            box-shadow: var(--shadow);
            padding: 1.5rem;
            display: flex;
            flex-direction: column;
            height: fit-content;
        }

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

        .player-header h2 {
            color: var(--primary-dark);
            font-size: 1.6rem;
        }

        .surah-info {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            color: white;
            padding: 1rem;
            border-radius: 0.75rem;
            text-align: center;
            margin-bottom: 1.5rem;
        }

        .surah-info h3 {
            font-size: 1.5rem;
            margin-bottom: 0.5rem;
        }

        .surah-info p {
            font-size: 1rem;
            opacity: 0.9;
        }

        .ayah-display {
            min-height: 200px;
            background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
            border-radius: 0.75rem;
            padding: 2rem;
            margin-bottom: 1.5rem;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            border: 1px solid #e2e8f0;
        }

        .ayah {
            font-family: 'Amiri', serif;
            font-size: 2.5rem;
            line-height: 1.8;
            color: var(--primary-dark);
            text-align: center;
            max-width: 800px;
            margin: 0 auto;
            transition: all 0.3s ease;
        }

        .player-controls {
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: linear-gradient(135deg, #f0fdfa 0%, #cffafe 100%);
            border-radius: 0.75rem;
            padding: 1rem 1.5rem;
            margin-top: auto;
        }

        .control-btn {
            background: var(--primary);
            color: white;
            width: 50px;
            height: 50px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s ease;
            border: none;
            font-size: 1.25rem;
        }

        .control-btn:hover {
            background: var(--primary-dark);
            transform: scale(1.05);
        }

        .control-btn:disabled {
            background: #94a3b8;
            cursor: not-allowed;
            transform: none;
        }

        .play-btn {
            width: 60px;
            height: 60px;
            font-size: 1.5rem;
            background: var(--accent);
        }

        .play-btn:hover {
            background: #eab308;
        }

        .repeat-btn {
            background: none;
            border: none;
            color: var(--primary);
            font-size: 1.2rem;
            cursor: pointer;
            margin-left: 1rem;
        }

        .repeat-btn.active {
            color: var(--accent);
        }

        .progress-container {
            flex-grow: 1;
            margin: 0 1.5rem;
            position: relative;
            cursor: pointer;
        }

        .progress-info {
            display: flex;
            justify-content: space-between;
            margin-bottom: 0.25rem;
            font-size: 0.9rem;
            color: var(--primary-dark);
        }

        .progress-bar {
            height: 8px;
            background-color: #e2e8f0;
            border-radius: 4px;
            overflow: hidden;
            position: relative;
        }

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
            width: 30%;
            border-radius: 4px;
            transition: width 0.3s ease;
        }

        #preloader {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 9999;
            transition: opacity 0.5s ease, visibility 0.5s ease;
        }

        .loader {
            width: 80px;
            height: 80px;
            border: 5px solid rgba(255, 255, 255, 0.2);
            border-top: 5px solid white;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-bottom: 2rem;
        }

        @keyframes spin {
            0% {
                transform: rotate(0deg);
            }

            100% {
                transform: rotate(360deg);
            }
        }

        .loader-text {
            color: white;
            font-size: 1.5rem;
            font-weight: 500;
            text-align: center;
        }

        .loader-text span {
            display: inline-block;
            animation: pulse 1.5s infinite;
        }

        @keyframes pulse {
            0% {
                opacity: 0.5;
            }

            50% {
                opacity: 1;
            }

            100% {
                opacity: 0.5;
            }
        }

        footer {
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            color: white;
            padding: 2rem 0;
            margin-top: 3rem;
        }

        .footer-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            gap: 1rem;
        }

        .footer-content p {
            max-width: 600px;
            line-height: 1.6;
        }

        .social-links {
            display: flex;
            gap: 1.5rem;
            margin-top: 1rem;
        }

        .social-links a {
            color: white;
            font-size: 1.5rem;
            transition: transform 0.3s ease;
        }

        .social-links a:hover {
            transform: translateY(-5px);
            color: var(--accent);
        }

        .font-controls {
            display: flex;
            gap: 0.5rem;
            align-items: center;
            margin-top: 1rem;
        }

        .font-btn {
            background: var(--primary);
            color: white;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            border: none;
            font-size: 1.2rem;
        }

        /* إصلاح مشكلة قائمة الهامبرغر */
        .mobile-nav-container {
            position: relative;
            display: flex;
            align-items: center;
        }

        .mobile-nav-links {
            position: absolute;
            top: 100%;
            right: 0;
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            border-radius: 0.75rem;
            padding: 1rem;
            width: 200px;
            box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
            z-index: 101;
            display: none;
            flex-direction: column;
            gap: 0.75rem;
            margin-top: 0.5rem;
            opacity: 0;
            transform: translateY(-10px);
            transition: all 0.3s ease;
        }

        .mobile-nav-links.active {
            display: flex;
            opacity: 1;
            transform: translateY(0);
        }

        .mobile-nav-links a {
            color: white;
            text-decoration: none;
            padding: 0.75rem 1rem;
            border-radius: 0.5rem;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .mobile-nav-links a:hover {
            background-color: rgba(255, 255, 255, 0.15);
            transform: translateX(-5px);
        }

        .mobile-nav-links a i {
            width: 24px;
            text-align: center;
        }

        /* تحسينات جديدة للواجهة */
        .navbar-controls {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .logo-container {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .logo-container .theme-toggle {
            margin-left: 0;
        }

        @media (max-width: 768px) {
            .navbar {
                flex-wrap: wrap;
            }

            .nav-links {
                display: none;
            }

            .mobile-menu-btn {
                display: block;
            }

            .suras {
                grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
            }

            .ayah {
                font-size: 2rem;
            }

            .control-btn {
                width: 40px;
                height: 40px;
                font-size: 1rem;
            }

            .play-btn {
                width: 50px;
                height: 50px;
                font-size: 1.25rem;
            }

            .suras-container {
                max-height: none;
            }

            /* تعديلات إضافية للقائمة المتنقلة */
            .mobile-nav-links {
                width: 180px;
            }

            .navbar-controls {
                gap: 0.5rem;
            }
        }

        @media (max-width: 480px) {
            .logo h1 {
                font-size: 1.5rem;
            }

            .sura-card {
                padding: 0.75rem;
            }

            .sura-card .ar-name {
                font-size: 1.1rem;
            }

            .ayah-display {
                padding: 1.5rem;
            }

            .ayah {
                font-size: 1.7rem;
            }

            .player-controls {
                padding: 0.75rem;
            }

            .progress-container {
                margin: 0 0.75rem;
            }

            .mobile-nav-links {
                width: 100%;
                right: 0;
                left: 0;
                border-radius: 0;
                box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
            }

            .logo-container {
                gap: 0.5rem;
            }
        }
