        :root {
            --bg-color: #f8fafc;
            --text-color: #1e293b;
            --primary-color: #0d9488;
            --secondary-color: #115e59;
            --card-bg: #e2e8f0;
            --border-color: #94a3b8;
        }

        .dark-theme {
            --bg-color: #1e293b;
            --text-color: #f1f5f9;
            --primary-color: #2dd4bf;
            --secondary-color: #115e59;
            --card-bg: #334155;
            --border-color: #475569;
        }

        .teal-theme {
            --bg-color: #ccfbf1;
            --text-color: #0f172a;
            --primary-color: #134e4a;
            --secondary-color: #064e3b;
            --card-bg: #a7f3d0;
            --border-color: #5eead4;
        }

        body {
            background-color: var(--bg-color);
            color: var(--text-color);
            font-family: 'Amiri', Consolas, 'Courier New', monospace;
            transition: background-color 0.3s, color 0.3s;
            margin: 0;
            padding: 0;
        }

        .container {
            max-width: 1280px;
            margin-left: auto;
            margin-right: auto;
            padding-left: 1rem;
            padding-right: 1rem;
        }

        header {
            padding: 1rem;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            background-color: var(--card-bg);
            transition: background-color 0.3s;
        }

        header nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
        }
        
        header nav a.logo {
            display: flex;
            align-items: center;
            text-decoration: none;
            color: inherit;
        }

        header nav .logo-text {
            font-size: 1.5rem;
            font-weight: bold;
            color: var(--primary-color);
        }

        @media (min-width: 768px) {
            header {
                padding: 1.5rem;
            }
            .nav-controls {
                margin-top: 0;
                gap: 1rem;
            }
        }
/* Container for all controls */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0; /* Reset for mobile */
}

/* Grouping the theme buttons closer together */
.theme-group {
    display: flex;
    gap: 0.4rem;
}

/* Base button styles to ensure uniformity */
.theme-btn, 
.language-btn, 
.policy-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px; /* Fixed height for all */
    padding: 0 0.75rem;
    border-radius: 8px; /* Slightly softer than pill for professional look */
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* Specific styling for theme icons */
.theme-btn {
    width: 40px; /* Square buttons for icons */
    padding: 0;
}

/* Language button and Policy link adjustments */
.language-btn {
    min-width: 80px;
    font-family: 'Inter', sans-serif;
}

.policy-link-btn {
    border: 1px solid transparent; /* Subtle difference for the link */
    background: transparent;
}

/* Hover effects */
.theme-btn:hover, 
.language-btn:hover, 
.policy-link-btn:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

/* Active Theme State (if you use a JS class) */
.theme-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Divider for visual clarity */
.nav-divider {
    width: 1px;
    height: 24px;
    background-color: var(--border-color);
    margin: 0 0.25rem;
    opacity: 0.5;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    header nav {
        flex-direction: column;
        gap: 1rem;
    }
    .nav-controls {
        width: 100%;
        justify-content: center;
    }
}


        .hero-section {
            text-align: center;
            padding: 4rem 1rem;
            border-radius: 1.5rem; 
            margin-bottom: 3rem;
            margin-top: 3rem;
            box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
            background-color: var(--card-bg);
        }

        .hero-section h1 {
            font-size: 2.25rem;
            font-weight: 800;
            line-height: 1.25;
            margin-bottom: 1rem;
        }

        .hero-section p {
            font-size: 1.125rem;
            max-width: 42rem;
            margin-left: auto;
            margin-right: auto;
            margin-bottom: 2rem;
        }

        @media (min-width: 768px) {
            .hero-section h1 {
                font-size: 3rem;
            }
        }

        .btn-primary {
            background-color: var(--primary-color);
            color: white;
            padding: 0.75rem 2rem;
            border-radius: 9999px;
            font-weight: 600;
            display: inline-block;
            text-decoration: none;
            transition: transform 0.2s, background-color 0.2s;
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            background-color: var(--secondary-color);
        }

        .section-heading {
            font-size: 2rem;
            font-weight: bold;
            text-align: center;
            margin-bottom: 3rem;
        }
        
        @media (min-width: 768px) {
            .section-heading {
                font-size: 2.25rem;
            }
        }

        .grid-container {
            display: grid;
            grid-template-columns: repeat(1, minmax(0, 1fr));
            gap: 2rem;
        }

        @media (min-width: 768px) {
            .grid-container {
                grid-template-columns: repeat(3, minmax(0, 1fr));
            }
        }

        .card {
            padding: 1.5rem;
            border-radius: 1rem;
            box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
            border: 1px solid var(--border-color);
            background-color: var(--card-bg);
            transition: background-color 0.3s, transform 0.2s;
            text-align: center;
        }

        .card-icon {
            font-size: 2.5rem;
            color: var(--primary-color);
            margin-bottom: 1rem;
        }

        .card-title {
            font-size: 1.25rem;
            font-weight: bold;
            margin-bottom: 0.5rem;
        }

        .app-card {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: left;
        }

        .app-card img {
            border-radius: 0.75rem;
            margin-bottom: 1rem;
        }
        
        .app-card .app-details {
            display: flex;
            flex-direction: column;
            text-align: left;
        }

        @media (min-width: 768px) {
            .app-card {
                flex-direction: row;
                align-items: center;
                text-align: left;
            }

            .app-card img {
                margin-bottom: 0;
                margin-right: 1.5rem;
            }
        }
        
        .policy-container {
            max-width: 800px;
            margin: 0 auto;
            padding: 2rem;
            line-height: 1.8;
            text-align: justify;
        }

        .policy-container h1 {
            font-size: 2.25rem;
            font-weight: bold;
            text-align: center;
            margin-bottom: 2rem;
        }

        .policy-container h2 {
            font-size: 1.5rem;
            font-weight: 600;
            color: var(--primary-color);
            margin-top: 2rem;
            margin-bottom: 1rem;
        }

        .policy-container ul {
            list-style: disc;
            padding-left: 1.5rem;
            margin-top: 0.5rem;
            line-height: 1.5;
        }

        footer {
            padding: 3rem 1rem;
            margin-top: 3rem;
            box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
            background-color: var(--card-bg);
        }

        .footer-grid {
            display: grid;
            grid-template-columns: repeat(1, minmax(0, 1fr));
            gap: 2rem;
        }

        @media (min-width: 768px) {
            .footer-grid {
                grid-template-columns: repeat(4, minmax(0, 1fr));
            }
        }

        .footer-title {
            font-size: 1.25rem;
            font-weight: bold;
            color: var(--primary-color);
            margin-bottom: 1rem;
        }
        
        .footer-links li {
            margin-bottom: 0.5rem;
        }

        .footer-links a {
            text-decoration: none;
            color: inherit;
        }

        .footer-links a:hover {
            text-decoration: underline;
        }
        
        .social-icons {
            display: flex;
            gap: 1rem;
        }

        .social-icons a {
            font-size: 1.5rem;
            text-decoration: none;
            color: inherit;
            transition: transform 0.2s;
        }

        .social-icons a:hover {
            transform: scale(1.1);
        }

        .page-section {
            display: block;
        }
        
        .hidden {
            display: none;
        }
        
        [lang="ar"] {
            direction: rtl;
        }

        [lang="ar"] .app-card img {
          margin-right: 0;
          margin-left: 1.5rem;
        }

        [lang="ar"] .app-card .app-details {
          text-align: right;
        }

        .app-details-content {
            padding: 2rem;
            text-align: center;
        }

        .app-details-content img {
            border-radius: 1rem;
            margin-bottom: 2rem;
        }

        .app-details-content h1 {
            font-size: 2.5rem;
            margin-bottom: 1rem;
        }

        .app-details-content p {
            font-size: 1.125rem;
            max-width: 600px;
            margin: 0 auto 2rem auto;
            line-height: 1.6;
        }

        .app-details-content a {
            display: inline-block;
            margin-top: 1rem;
        }