:root {
    --bg-dark: #050505;
    --bg-panel: #0a0a0f;
    --neon-cyan: #00f3ff;
    --neon-purple: #bc13fe;
    --neon-green: #00ff88;
    --text-white: #ffffff;
    --text-gray: #a0a0a0;
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
    transition: all 0.3s ease;
}

/* --- Animated Backgrounds --- */
.bg-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: 
        radial-gradient(circle at 15% 50%, rgba(188, 19, 254, 0.1), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(0, 243, 255, 0.1), transparent 25%);
    z-index: -2;
    animation: bgPulse 10s infinite alternate;
}

.electric-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(0, 255, 136, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 136, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: -1;
    perspective: 500px;
    transform: scale(1.2);
    opacity: 0.3;
}

@keyframes bgPulse {
    0% { opacity: 0.5; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.1); }
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background: rgba(5, 5, 5, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: 2px;
}

.dot { color: var(--neon-cyan); }

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    color: var(--text-white);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover { color: var(--neon-cyan); text-shadow: 0 0 10px var(--neon-cyan); }

/* --- PREMIUM 3D LANGUAGE DROPDOWN --- */
.lang-dropdown-wrapper {
    position: relative; /* Anchors the hidden menu */
    margin-left: 20px;
    z-index: 1100;
}

.btn-3d-main {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(145deg, #2a2a35, #1c1c25);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    
    /* The 3D Depth Shadow */
    box-shadow: 
        0 4px 0 #000000, 
        0 5px 10px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.1);
        
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.btn-3d-main:hover {
    transform: translateY(-2px); /* Lifts up */
    box-shadow: 
        0 6px 0 #000000, 
        0 10px 20px rgba(0, 243, 255, 0.15); /* Neon Glow */
    color: var(--neon-cyan);
}

.btn-3d-main:active {
    transform: translateY(4px); /* Presses down */
    box-shadow: 0 0 0 #000000;
    background: #050505;
}

.arrow-icon {
    font-size: 0.7rem;
    color: var(--text-gray);
    transition: transform 0.3s;
    margin-left: 5px;
}

.lang-dropdown-wrapper.open .arrow-icon {
    transform: rotate(180deg);
    color: var(--neon-cyan);
}

/* Hidden Menu */
.lang-menu {
    position: absolute;
    top: 130%; 
    right: 0;
    width: 160px;
    background: #0a0a0f;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 0.3s ease;
}

.lang-dropdown-wrapper.open .lang-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    color: var(--text-gray);
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.lang-option:hover {
    background: rgba(0, 243, 255, 0.1);
    color: var(--neon-cyan);
}

.lang-option .flag { font-size: 1.2rem; }

/* ------------------------------------- */

.cta-btn {
    padding: 8px 20px;
    border: 1px solid var(--neon-cyan);
    border-radius: 4px;
    color: var(--neon-cyan) !important;
}

.cta-btn:hover {
    background: var(--neon-cyan);
    color: var(--bg-dark) !important;
    box-shadow: 0 0 20px var(--neon-cyan);
}

.hamburger { display: none; font-size: 1.5rem; cursor: pointer; }

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10%;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 600px;
    z-index: 2;
}

h1.glitch-text {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    position: relative;
    color: var(--text-white);
    text-shadow: 2px 2px 0px var(--neon-purple);
}

.hero h2 {
    color: var(--neon-cyan);
    font-size: 1.5rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero p {
    color: var(--text-gray);
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.hero-buttons { display: flex; gap: 20px; }

.btn-primary, .btn-secondary {
    padding: 12px 30px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(45deg, var(--neon-purple), #7b00ff);
    color: white;
    box-shadow: 0 0 15px rgba(188, 19, 254, 0.4);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 30px rgba(188, 19, 254, 0.8);
}

.btn-secondary {
    border: 1px solid var(--text-white);
    color: var(--text-white);
}

.btn-secondary:hover {
    background: white;
    color: black;
}

/* --- 3D Hero Visual --- */
.hero-visual {
    perspective: 1000px;
    width: 400px;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-card-3d {
    width: 300px;
    height: 450px;
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotateY(0deg); }
    50% { transform: translateY(-20px) rotateY(5deg); }
}

.card-glass {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    backdrop-filter: blur(15px);
    box-shadow: 0 0 40px rgba(0, 243, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    position: relative;
    overflow: hidden;
}

.scan-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--neon-cyan);
    box-shadow: 0 0 10px var(--neon-cyan);
    animation: scan 3s linear infinite;
}

@keyframes scan {
    0% { top: 0; opacity: 0; }
    50% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.card-glass h3 {
    margin-top: 20px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
}

.icon-lg { font-size: 4rem; color: var(--neon-cyan); margin-bottom: 10px; }

.data-row {
    width: 100%;
    margin-top: 20px;
}

.data-row span { font-size: 0.8rem; color: var(--text-gray); }

.bar {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    margin-top: 5px;
    overflow: hidden;
}

.fill {
    height: 100%;
    background: linear-gradient(90deg, var(--neon-cyan), var(--neon-green));
}

.floating-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--neon-green);
    color: black;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    transform: translateZ(30px);
}

/* --- Standard Sections --- */
.section-padding { padding: 100px 10%; }
.container { max-width: 1200px; margin: 0 auto; }
.section-header { margin-bottom: 60px; }
.center { text-align: center; }

.tag {
    color: var(--neon-purple);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
}

/* --- About Grid --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.feature-list {
    list-style: none;
    margin-top: 30px;
}

.feature-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
}

.feature-list i {
    color: var(--neon-cyan);
    margin-right: 15px;
    width: 20px;
}

.img-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    transform: rotate(3deg);
    border: 2px solid rgba(255,255,255,0.1);
}

.img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(80%) contrast(1.2);
    transition: filter 0.5s;
}

.img-wrapper:hover img { filter: grayscale(0%); }

.overlay-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, rgba(0, 243, 255, 0.2), transparent);
}

/* --- Tech Cards (Apps) --- */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    perspective: 1000px;
}

.tech-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 40px 30px;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    transform-style: preserve-3d;
    cursor: pointer;
}

.tech-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.2);
}

.card-content { transform: translateZ(20px); }

.icon-box {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
    background: rgba(255,255,255,0.05);
}

.neon-cyan { color: var(--neon-cyan); box-shadow: 0 0 15px rgba(0,243,255,0.2); }
.neon-purple { color: var(--neon-purple); box-shadow: 0 0 15px rgba(188,19,254,0.2); }
.neon-green { color: var(--neon-green); box-shadow: 0 0 15px rgba(0,255,136,0.2); }

.tech-card h3 {
    font-family: var(--font-heading);
    margin-bottom: 15px;
}

.tech-card p {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.status-badge {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--neon-cyan);
    border: 1px solid var(--neon-cyan);
    padding: 4px 10px;
    border-radius: 10px;
}

.status-badge.future {
    color: var(--text-gray);
    border-color: var(--text-gray);
}

/* --- Vision Section --- */
.vision-bg {
    background: linear-gradient(to bottom, var(--bg-dark), #0d0d14);
    text-align: center;
}

.big-text {
    font-size: 1.5rem;
    font-style: italic;
    color: var(--text-white);
    margin: 40px auto;
    max-width: 800px;
}

.stats-grid {
    display: flex;
    justify-content: center;
    gap: 80px;
    margin-top: 50px;
}

.stat-item .number {
    font-size: 4rem;
    font-weight: 900;
    font-family: var(--font-heading);
    color: transparent;
    -webkit-text-stroke: 1px var(--neon-purple);
    background: linear-gradient(to bottom, white, transparent);
    -webkit-background-clip: text;
}

/* --- FOOTER STYLING --- */
footer {
    position: relative;
    padding: 80px 5% 20px;
    background: #020202;
    overflow: hidden;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-glow {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 100px;
    background: var(--neon-cyan);
    filter: blur(80px);
    opacity: 0.15;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col h2 {
    font-family: var(--font-heading);
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.footer-col h3 {
    font-size: 1.1rem;
    color: var(--text-white);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-left: 3px solid var(--neon-purple);
    padding-left: 10px;
}

.footer-col p {
    color: var(--text-gray);
    max-width: 300px;
    font-size: 0.9rem;
}

/* Contact List Styling */
.contact-list {
    list-style: none;
}

.contact-list li {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.icon-neon {
    color: var(--neon-cyan);
    margin-right: 15px;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5);
}

.contact-list a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.contact-list a:hover {
    color: var(--text-white);
    padding-left: 5px;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

/* Social Buttons */
.social-icons {
    display: flex;
    gap: 15px;
}

.social-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-btn.facebook:hover {
    background: #1877F2;
    border-color: #1877F2;
    box-shadow: 0 0 20px rgba(24, 119, 242, 0.6);
    transform: translateY(-5px);
}

.social-btn.tiktok:hover {
    background: #000000;
    border-color: #fe2c55;
    box-shadow: -2px -2px 10px rgba(0, 242, 234, 0.6), 2px 2px 10px rgba(254, 44, 85, 0.6);
    transform: translateY(-5px);
}

.social-btn.instagram:hover {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    border-color: #d62976;
    box-shadow: 0 0 20px rgba(214, 41, 118, 0.6);
    transform: translateY(-5px);
}

.copyright {
    text-align: center;
    font-size: 0.8rem;
    color: #444;
    border-top: 1px solid #111;
    padding-top: 20px;
}

/* --- WAITLIST MODAL --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: rgba(20, 20, 25, 0.95);
    border: 1px solid var(--neon-cyan);
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.2);
    padding: 40px;
    border-radius: 15px;
    width: 90%;
    max-width: 450px;
    text-align: center;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--text-gray);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--neon-cyan);
}

.modal-title {
    font-family: var(--font-heading);
    color: var(--text-white);
    margin-bottom: 10px;
}

.input-group-modal {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 25px;
}

.input-group-modal input {
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    color: white;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border 0.3s;
}

.input-group-modal input:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.2);
}

#form-message {
    margin-top: 15px;
    font-size: 0.9rem;
    min-height: 20px;
}

.msg-error { color: #ff4444; }
.msg-success { color: var(--neon-green); }

/* --- Animations --- */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   RTL SUPPORT (ARABIC) & MOBILE FIXES
   ========================================= */
html[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] body, 
html[dir="rtl"] h1, 
html[dir="rtl"] h2, 
html[dir="rtl"] h3, 
html[dir="rtl"] .modal-title,
html[dir="rtl"] .logo,
html[dir="rtl"] .btn-3d-main {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

/* Flip Navbar for RTL */
html[dir="rtl"] .navbar {
    flex-direction: row-reverse;
}

html[dir="rtl"] .lang-dropdown-wrapper {
    margin-left: 0;
    margin-right: 20px;
}

/* Fix Dropdown Alignment in RTL */
html[dir="rtl"] .lang-menu {
    right: auto;
    left: 0;
}

/* Fix margin on lists */
html[dir="rtl"] .feature-list i, 
html[dir="rtl"] .contact-list .icon-neon {
    margin-right: 0;
    margin-left: 15px;
}

/* Footer border placement */
html[dir="rtl"] .footer-col h3 {
    border-left: none;
    border-right: 3px solid var(--neon-purple);
    padding-left: 0;
    padding-right: 10px;
}

/* Fix Contact List Hover */
html[dir="rtl"] .contact-list a:hover {
    padding-left: 0;
    padding-right: 5px;
}

/* Waitlist Modal Close button */
html[dir="rtl"] .close-modal {
    right: auto;
    left: 20px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .navbar { padding: 20px; }
    .nav-links { display: none; }
    .hamburger { display: block; color: white; }
    
    .hero { flex-direction: column; text-align: center; padding-top: 100px; }
    .hero-content { margin-bottom: 50px; }
    .hero-buttons { justify-content: center; }
    h1.glitch-text { font-size: 2.5rem; }
    
    .about-grid { grid-template-columns: 1fr; }
    .stats-grid { flex-direction: column; gap: 30px; }
    
    .footer-container { flex-direction: column; gap: 40px; }

    /* Hide Language Button in Top Bar on Mobile */
    .lang-dropdown-wrapper {
        display: none;
    }

    /* Show Language Button in Mobile Menu */
    .nav-links .lang-dropdown-wrapper {
        display: block;
        width: fit-content;
        margin: 20px auto;
    }

    .lang-menu {
        /* Center Dropdown in Mobile View */
        left: 50%;
        right: auto;
        transform: translateX(-50%) translateY(-10px);
    }
    .lang-dropdown-wrapper.open .lang-menu {
        transform: translateX(-50%) translateY(0);
    }

    html[dir="rtl"] .navbar {
        flex-direction: row; /* Keep logo right, hamburger left */
    }
}