:root {
    --primary-color: #1A73E8;
    --secondary-color: #4285F4;
    --accent-color: #0288D1;
    --accent-gradient: linear-gradient(135deg, #1A73E8 0%, #06B6D4 100%);
    --dark-bg: #0B1120;
    --light-text: #F8FAFC;

    /* Theme Variables (Light Mode Default) */
    --bg-body: #ffffff;
    --bg-hero: #f3f4f6;
    --bg-section-alt: #f9fafb;
    --bg-card: #ffffff;
    --text-main: #333333;
    --text-muted: #4b5563;
    --text-headings: #1f2937;
    --border-color: #e5e7eb;
    --navbar-bg: rgba(255, 255, 255, 0.95);
    --wave-fill-white: #ffffff;
    --wave-fill-alt: #f9fafb;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --card-shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.15);
    --glow-primary: 0 0 40px rgba(26, 115, 232, 0.3);
}

/* Dark Mode Overrides */
body.dark-mode {
    --bg-body: #0f172a;
    --bg-hero: #0f172a;
    --bg-section-alt: #1e293b;
    --bg-card: #1e293b;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --text-headings: #f8fafc;
    --border-color: #334155;
    --navbar-bg: rgba(15, 23, 42, 0.95);
    --wave-fill-white: #0f172a;
    --wave-fill-alt: #1e293b;
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --card-shadow-hover: 0 20px 40px rgba(0, 0, 0, 0.4);
    --glow-primary: 0 0 60px rgba(26, 115, 232, 0.4);
}

/* Dark Mode Bootstrap Overrides */
body.dark-mode .text-muted {
    color: var(--text-muted) !important;
}

body.dark-mode .text-dark {
    color: var(--text-main) !important;
}

body.dark-mode .text-success {
    color: #4ade80 !important;
    /* Brighter green for better contrast on dark */
}

body.dark-mode .text-white-50 {
    color: rgba(255, 255, 255, 0.7) !important;
}

body.dark-mode .small,
body.dark-mode small {
    color: var(--text-muted);
}

/* Ensure Hero Checkmarks section specifically looks good */
body.dark-mode .hero-content .text-muted {
    color: #94a3b8 !important;
}

body.dark-mode .dropdown-menu {
    background-color: var(--bg-card);
    border-color: var(--border-color);
}

body.dark-mode .dropdown-item {
    color: var(--text-main);
}

body.dark-mode .dropdown-item:hover {
    background-color: var(--bg-section-alt);
    color: var(--primary-color);
}

body.dark-mode .store-btn {
    background-color: #1e293b;
    color: #e2e8f0;
}

body.dark-mode .store-btn:hover {
    background-color: #0f172a;
    color: white;
}

body.dark-mode .store-btn i.text-success {
    color: #22c55e !important;
}

body.dark-mode .store-btn i.text-dark {
    color: #e2e8f0 !important;
}

body.dark-mode .carousel-control-prev-icon,
body.dark-mode .carousel-control-next-icon {
    filter: invert(0);
}

/* RTL Support */
[dir="rtl"] body {
    font-family: 'Noto Kufi Arabic', sans-serif;
    text-align: right;
}

[dir="rtl"] .me-1 {
    margin-left: 0.25rem !important;
    margin-right: 0 !important;
}

[dir="rtl"] .me-2 {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

[dir="rtl"] .me-3 {
    margin-left: 1rem !important;
    margin-right: 0 !important;
}

[dir="rtl"] .ms-1 {
    margin-right: 0.25rem !important;
    margin-left: 0 !important;
}

[dir="rtl"] .ms-2 {
    margin-right: 0.5rem !important;
    margin-left: 0 !important;
}

[dir="rtl"] .ms-3 {
    margin-right: 1rem !important;
    margin-left: 0 !important;
}

[dir="rtl"] .ms-lg-3 {
    margin-right: 1rem !important;
    margin-left: 0 !important;
}

/* Navbar Dropdown Fix for RTL */
[dir="rtl"] .dropdown-menu {
    text-align: right;
    left: auto;
    right: 0;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-body);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

body {
    font-family: 'Google Sans', sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-body);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.2rem;
    padding: 0;
    box-sizing: border-box;
    line-height: 1;
}

.theme-toggle:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: rotate(180deg);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

/* Wave Separators */
.custom-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    transform: rotate(0deg);
}

.wave-invert {
    transform: rotate(180deg);
}

.custom-wave svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}

/* Wave Colors */
.wave-fill-dark .shape-fill {
    fill: var(--dark-bg);
}

.wave-fill-body .shape-fill {
    fill: var(--bg-body);
}

.wave-fill-alt .shape-fill {
    fill: var(--bg-section-alt);
}

.wave-top {
    top: 0;
    bottom: auto;
    transform: rotate(0deg);
}

/* Navbar */
.navbar {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    background-color: var(--navbar-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.3s;
    padding: 15px 0;
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-color) !important;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
}

.navbar-brand img {
    height: 45px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.nav-link {
    font-weight: 600;
    color: var(--text-muted) !important;
    transition: all 0.3s;
    position: relative;
    padding: 8px 16px !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: all 0.3s;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.btn-primary {
    background: var(--accent-gradient);
    border: none;
    padding: 12px 28px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(26, 115, 232, 0.4);
    background: linear-gradient(135deg, #1557B0 0%, #0891B2 100%);
}

.btn-outline-primary {
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 12px 28px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-outline-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent-gradient);
    transition: left 0.3s;
    z-index: -1;
}

.btn-outline-primary:hover::before {
    left: 0;
}

.btn-outline-primary:hover {
    color: #fff;
    border-color: transparent;
}

/* Hero Section */
.hero-section {
    padding: 120px 0 140px;
    background: var(--bg-hero);
    position: relative;
    overflow: hidden;
    transition: background 0.3s;
}

.hero-content h1 {
    font-size: 3.8rem;
    font-weight: 800;
    margin-bottom: 25px;
    color: var(--text-headings);
    letter-spacing: -0.02em;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--text-headings) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-content p {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 35px;
    line-height: 1.7;
}

.hero-image-container {
    position: relative;
    z-index: 10;
}

.hero-image-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: var(--accent-gradient);
    filter: blur(60px);
    opacity: 0.3;
    border-radius: 50%;
    z-index: -1;
}

.hero-image {
    border-radius: 45px;
    border: 12px solid #111827;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.5), var(--glow-primary);
    transition: all 0.4s ease;
    max-width: 100%;
    margin-top: 20px;
}

.hero-image:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.6), var(--glow-primary);
}

/* Hero badges */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(26, 115, 232, 0.1);
    border: 1px solid rgba(26, 115, 232, 0.2);
    border-radius: 50px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 20px;
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

/* Features */
.features-section {
    padding: 100px 0;
    background-color: var(--bg-body);
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 70px;
}

.section-title h2 {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-headings);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
}

.section-title p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 20px auto 0;
    font-size: 1.1rem;
}

.feature-card {
    padding: 40px 30px;
    border-radius: 20px;
    background: var(--bg-card);
    transition: all 0.4s ease;
    border: 1px solid var(--border-color);
    height: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--accent-gradient);
    opacity: 0;
    transition: opacity 0.4s;
    z-index: 0;
}

.feature-card:hover::before {
    opacity: 0.05;
}

.feature-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-10px);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--accent-gradient);
    color: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 25px;
    position: relative;
    z-index: 1;
    box-shadow: 0 10px 30px rgba(26, 115, 232, 0.3);
    transition: all 0.3s;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-headings);
    position: relative;
    z-index: 1;
}

.feature-card p {
    color: var(--text-muted);
    position: relative;
    z-index: 1;
    line-height: 1.7;
}

/* App Stats */
.stats-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--dark-bg) 0%, #1a1f35 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%231A73E8' fill-opacity='0.05'%3E%3Cpath d='m36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.stat-item {
    text-align: center;
    padding: 30px;
    position: relative;
}

.stat-number {
    font-size: 4rem;
    font-weight: 800;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    line-height: 1;
}

.stat-label {
    font-size: 1.2rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Screenshots */
.screenshots-section {
    padding: 100px 0;
    background-color: var(--bg-section-alt);
}

.screenshot-carousel-container {
    max-width: 350px;
    margin: 0 auto;
    border: 12px solid #111827;
    border-radius: 40px;
    overflow: hidden;
    background: #000;
    position: relative;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.3), var(--glow-primary);
    transition: all 0.3s;
}

.screenshot-carousel-container:hover {
    transform: scale(1.02);
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.4), var(--glow-primary);
}

.screenshot-carousel-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 25px;
    background: #111827;
    border-bottom-left-radius: 15px;
    border-bottom-right-radius: 15px;
    z-index: 10;
}

/* Download CTA */
.cta-section {
    padding: 120px 0;
    background: linear-gradient(135deg, #1A73E8 0%, #06B6D4 50%, #34A853 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='50' cy='50' r='40' fill='none' stroke='rgba(255,255,255,0.1)' stroke-width='1'/%3E%3C/svg%3E");
    opacity: 0.5;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.cta-content p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.store-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.store-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 35px;
    border-radius: 12px;
    background-color: #ffffff;
    color: #111827;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.4s;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.store-btn:hover {
    background-color: #0f172a;
    color: white;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.store-btn i {
    font-size: 1.8rem;
    transition: color 0.3s;
}

.store-btn:hover i,
.store-btn:hover .text-muted,
.store-btn:hover small,
.store-btn:hover span {
    color: white !important;
}

/* Footer */
footer {
    background: linear-gradient(135deg, #0B1120 0%, #1a1f35 100%);
    color: #9ca3af;
    padding: 60px 0 30px;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--accent-gradient);
}

footer a {
    text-decoration: none !important;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    display: block;
    margin-bottom: 12px;
    transition: all 0.3s;
    position: relative;
    padding-left: 0;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.copyright {
    margin-top: 50px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.9rem;
}

/* Social icons */
footer .d-flex a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

footer .d-flex a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-image {
        margin-top: 40px;
        transform: none;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .cta-content h2 {
        font-size: 2.2rem;
    }

    .stat-number {
        font-size: 3rem;
    }
}

/* Custom Burger Menu Lines */
.navbar-toggler {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    border: none;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

.navbar-toggler:hover {
    background-color: rgba(26, 115, 232, 0.1);
}

.burger-line {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.navbar-toggler:hover .burger-line {
    background-color: var(--primary-color);
}

/* Mobile Navigation */
@media (max-width: 991px) {
    .navbar-collapse {
        background-color: var(--navbar-bg);
        padding: 20px;
        margin-top: 15px;
        border-radius: 16px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
        border: 1px solid var(--border-color);
    }

    .navbar-collapse .navbar-nav {
        gap: 5px;
    }

    .navbar-collapse .nav-link {
        padding: 14px 18px !important;
        border-radius: 10px;
    }

    .navbar-collapse .nav-link::after {
        display: none;
    }

    .navbar-collapse .nav-link:hover {
        background-color: var(--bg-section-alt);
    }

    .navbar-collapse .btn-primary {
        width: 100%;
        margin-top: 15px;
        text-align: center;
        padding: 14px 28px;
    }

    .navbar-collapse .dropdown-menu {
        position: static !important;
        transform: none !important;
        width: 100%;
        background-color: var(--bg-section-alt);
        border: none;
        border-radius: 10px;
        margin-top: 8px;
    }

    .navbar-collapse .ms-lg-3 {
        margin-left: 0 !important;
    }
}

/* Navbar buttons alignment */
.navbar .d-flex.align-items-center {
    align-items: center !important;
}

.navbar .d-flex.align-items-center .theme-toggle,
.navbar .d-flex.align-items-center .navbar-toggler {
    margin: 0;
    vertical-align: middle;
}

.navbar .d-flex.align-items-center .navbar-toggler {
    margin-right: 5px;
}

/* Smooth animations for all elements */
* {
    scroll-behavior: smooth;
}

/* Floating animation for hero image */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.hero-image-container:not(:hover) .hero-image {
    animation: float 4s ease-in-out infinite;
}