* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-dark: #0d0c22;
    --primary-blue: #1a2049;
    --accent-magenta: #e03e8c;
    --accent-cyan: #00f6ff;
    --accent-purple: #7b61ff;
    --text-light: #c5c8e0;
    --text-dark: #0d0c22;
    --white: #ffffff;
    --light-bg: #f8f9fa;
    --gradient-primary: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-magenta) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-purple) 100%);
    --shadow-glow: 0 0 40px rgba(123, 97, 255, 0.5);
    --shadow-heavy: 0 20px 50px rgba(13, 12, 34, 0.3);
}

[dir="rtl"] {
    font-family: 'Tajawal', 'Cairo', Arial, sans-serif;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background: var(--light-bg);
    overflow-x: hidden;
    transition: all 0.3s ease;
}

/* Typography */
h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.8rem, 6vw, 4.5rem);
    color: var(--primary-dark);
}

h2 {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    color: var(--primary-dark);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    font-size: 1.1rem;
    color: #636e72;
    margin-bottom: 1rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.animate-in {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 0;
}

.float {
    animation: float 6s ease-in-out infinite;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 10px 30px rgba(123, 97, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-dark);
    border: 2px solid var(--primary-dark);
}

.btn-secondary:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-3px);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
header {
    background: transparent;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

header.scrolled {
    padding: 1rem 0;
    background: rgba(13, 12, 34, 0.85);
    backdrop-filter: blur(15px);
    box-shadow: 0 8px 32px rgba(13, 12, 34, 0.2);
}

header.scrolled .logo,
header.scrolled .nav-tab,
header.scrolled .mobile-menu-btn {
    color: var(--white);
}

header.scrolled .lang-btn {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.5);
}

header.scrolled .lang-btn.active {
    background: var(--gradient-primary);
    border-color: transparent;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo-icon img {
    width: 45px;
    height: 45px;
}

.logo {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-dark);
    transition: color 0.3s ease;
}

.nav-tabs {
    display: flex;
    gap: 2.5rem;
}

.nav-tab {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav-tab::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-tab:hover::before,
.nav-tab.active::before {
    width: 100%;
}

.nav-tab:hover, .nav-tab.active {
    color: var(--accent-purple);
}

header.scrolled .nav-tab:hover,
header.scrolled .nav-tab.active {
    color: var(--accent-magenta);
}

header.scrolled .nav-tab::before {
    background: var(--gradient-primary);
}

.language-switcher {
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--primary-dark);
    background: transparent;
    color: var(--primary-dark);
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.lang-btn.active {
    background: var(--primary-dark);
    color: var(--white);
}

/* Hero Section */
.hero {
    padding: 10rem 0 6rem;
    background: var(--light-bg);
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text .subtitle {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
}

.phone-mockup {
    width: 300px;
    height: 600px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(20px);
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--shadow-heavy);
    padding: 15px;
}

.phone-screen {
    background: var(--white);
    border-radius: 25px;
    height: 100%;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.chat-bubble {
    padding: 0.8rem 1.2rem;
    border-radius: 20px;
    margin: 0.5rem 0;
    font-size: 0.9rem;
    max-width: 80%;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.chat-bubble:nth-child(odd) {
    background: var(--gradient-primary);
    color: var(--white);
    border-bottom-left-radius: 5px;
    align-self: flex-start;
}

.chat-bubble:nth-child(even) {
    background: #e9e9f0;
    color: var(--text-dark);
    border-bottom-right-radius: 5px;
    align-self: flex-end;
}

/* How It Works Section */
.how-it-works {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.step {
    background: var(--white);
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(13, 12, 34, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #eee;
}

.step:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 45px rgba(13, 12, 34, 0.1);
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 2rem;
}

/* Features Section */
.features {
    padding: 6rem 0;
    background: var(--white);
}

.features-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 4rem;
}

.feature {
    text-align: center;
    padding: 2rem;
    max-width: 300px;
    flex-grow: 1;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    color: var(--white);
    transition: all 0.3s ease;
}

.feature:hover .feature-icon {
    transform: scale(1.1) rotate(15deg);
    box-shadow: var(--shadow-glow);
}

/* Premium Section */
.premium {
    padding: 6rem 0;
    background-color: var(--primary-dark);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 20% 20%, var(--accent-purple), transparent 30%),
                      radial-gradient(circle at 80% 70%, var(--accent-magenta), transparent 30%);
    opacity: 0.1;
    animation: float 10s ease-in-out infinite alternate;
}

.premium .container {
    position: relative;
    z-index: 1;
}

.premium h2, .premium p {
    color: var(--white);
}

.premium-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.premium-feature {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 2.5rem 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    transition: all 0.3s ease;
}

.premium-feature:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-purple);
}

/* Download Section */
.final-cta {
    padding: 8rem 0;
    background-color: var(--primary-dark);
    color: var(--white);
    text-align: center;
}

.download-container {
    max-width: 800px;
    margin: 0 auto;
}

.final-cta h2 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.final-cta p {
    color: var(--text-light);
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

.download-visual {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.download-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 2.5rem 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    transition: all 0.3s ease;
    width: 350px;
}

.download-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-purple);
}

.platform-icon {
    margin-bottom: 1rem;
}

.platform-icon svg path {
    fill: var(--white);
}

.download-card h3 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.download-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.btn-download {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: left;
}

.btn-download div {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.download-title {
    font-size: 0.8rem;
    opacity: 0.8;
}

.download-store {
    font-size: 1.2rem;
    font-weight: 700;
}

.btn-download:hover {
    background: var(--white);
    color: var(--primary-dark);
    transform: translateY(-5px);
}

.btn-download:hover svg {
    fill: var(--primary-dark);
}

/* Footer */
footer {
    background: var(--primary-dark);
    color: var(--text-light);
    padding: 4rem 0 2rem;
    text-align: center;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    margin: 0 1.5rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-magenta);
}

.copyright {
    margin-top: 2rem;
    font-size: 0.9rem;
}

/* Mobile Navigation */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--primary-dark);
    cursor: pointer;
}

.mobile-nav {
    position: fixed;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: var(--primary-dark);
    z-index: 2000;
    transition: left 0.4s ease;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.mobile-nav.active {
    left: 0;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
}

.mobile-nav .logo {
    color: var(--white);
}

.close-btn {
    background: none;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    color: var(--white);
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    text-align: center;
}

.mobile-nav-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text {
        order: 2;
    }

    .hero-visual {
        order: 1;
        margin-bottom: 3rem;
    }

    .cta-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-tabs, .language-switcher {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .phone-mockup {
        width: 250px;
        height: 500px;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }
}

/* Intersection Observer & JS Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}