/* Variables & Setup */
:root {
    --bg-dark: #070B14;
    --primary: #3B82F6;
    --primary-glow: rgba(59, 130, 246, 0.5);
    --secondary: #8B5CF6;
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.05);
}

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

body {
    font-family: 'Cairo', sans-serif; /* Default for Arabic */
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.6;
    transition: direction 0.3s;
}

/* English Font specific rules */
body[dir="ltr"] {
    font-family: 'Outfit', sans-serif;
}
body[dir="ltr"] .title { font-weight: 800; }
body[dir="ltr"] .step-number { font-family: 'Outfit', sans-serif; }

/* Background Animated Shapes */
.bg-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    animation: floatBg 20s infinite alternate;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-glow);
    top: -10%;
    right: -5%;
}

.shape-2 {
    width: 500px;
    height: 500px;
    background: rgba(139, 92, 246, 0.3);
    bottom: -10%;
    left: -10%;
    animation-delay: -5s;
}

@keyframes floatBg {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-50px, 50px) scale(1.1); }
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navbar */
.navbar {
    padding: 24px 0;
    position: relative;
    z-index: 10;
}
.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 800;
}
.logo-img {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}
.nav-link {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}
.nav-link:hover {
    color: var(--primary);
}
.lang-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--glass-border);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s;
}
.lang-btn:hover {
    background: rgba(255,255,255,0.2);
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
}
.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.title {
    font-size: 3.5rem;
    line-height: 1.3;
    margin-bottom: 24px;
    font-weight: 800;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 500px;
}

/* Store Buttons (Fixed Alignment) */
.store-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.store-btn-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.store-btn-wrapper:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.2);
}

.store-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #1A1F2E, #111520);
    border: 1px solid var(--glass-border);
    padding: 12px 24px;
    text-decoration: none;
    color: white;
    width: 230px;
    height: 70px;
    position: relative;
}

.btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
    transition: opacity 0.3s ease;
}

.store-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

.btn-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    font-family: 'Outfit', sans-serif; /* AppStore/Play text is always English */
}

.small-text {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    line-height: 1.2;
}

.large-text {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.2;
}

/* Coming Soon Overlay */
.coming-soon-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.store-btn-wrapper:hover .coming-soon-overlay {
    opacity: 1;
    transform: translateY(0);
}
.store-btn-wrapper:hover .btn-content {
    opacity: 0;
    transform: scale(0.9);
}

/* Mockup Visual */
.hero-visual {
    position: relative;
}
.mockup-container {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
}
.mockup {
    padding: 24px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.4);
    animation: float 6s ease-in-out infinite;
}
.mockup-header {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #FF5F56; }
.dot.yellow { background: #FFBD2E; }
.dot.green { background: #27C93F; }

.waveform {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    height: 100px;
    margin-bottom: 24px;
}
.waveform .bar {
    width: 12px;
    background: linear-gradient(to top, var(--primary), var(--secondary));
    border-radius: 6px;
    animation: equalize 1s infinite alternate;
}
.waveform .bar:nth-child(1) { animation-delay: 0.1s; }
.waveform .bar:nth-child(2) { animation-delay: 0.2s; }
.waveform .bar:nth-child(3) { animation-delay: 0.3s; }
.waveform .bar:nth-child(4) { animation-delay: 0.4s; }
.waveform .bar:nth-child(5) { animation-delay: 0.5s; }
.waveform .bar:nth-child(6) { animation-delay: 0.6s; }
.waveform .bar:nth-child(7) { animation-delay: 0.7s; }

.mockup-title { font-size: 1.5rem; margin-bottom: 8px; text-align: center; }
.mockup-subtitle { color: var(--text-muted); text-align: center; font-size: 0.95rem; }

/* Floating Elements */
.float-el {
    position: absolute;
    font-size: 2rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}
.el-1 { top: -20px; right: -20px; animation: float 5s ease-in-out infinite 1s; }
.el-2 { bottom: 40px; right: -40px; animation: float 7s ease-in-out infinite 0.5s; font-size: 1.5rem; }
.el-3 { bottom: -20px; left: -20px; animation: float 6s ease-in-out infinite 2s; }

/* Features Section */
.features { padding: 100px 0; }
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 60px; font-weight: 800; }
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.feature-card {
    padding: 40px 30px;
    text-align: center;
    transition: transform 0.3s ease, background 0.3s ease;
}
.feature-card:hover {
    transform: translateY(-10px);
    background: rgba(255,255,255,0.06);
}
.feature-icon { font-size: 3rem; margin-bottom: 20px; }
.feature-card h3 { font-size: 1.5rem; margin-bottom: 16px; font-weight: 700; }
.feature-card p { color: var(--text-muted); font-size: 1.05rem; }

/* Steps Section */
.steps-section {
    padding: 80px 0;
    background: linear-gradient(to bottom, transparent, rgba(59, 130, 246, 0.03), transparent);
}
.steps-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}
.step-card {
    text-align: center;
    flex: 1;
    padding: 20px;
    position: relative;
    z-index: 2;
}
.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 auto 20px;
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.3);
}
.step-card h3 { margin-bottom: 10px; font-weight: 700; }
.step-card p { color: var(--text-muted); font-size: 0.95rem; }
.step-line {
    height: 2px;
    background: var(--glass-border);
    flex: 1;
    position: relative;
    top: -40px;
}

/* FAQ Section */
.faq-section { padding: 80px 0; }
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}
.faq-item {
    margin-bottom: 16px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
}
.faq-question {
    width: 100%;
    padding: 20px 24px;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: inherit; /* respects RTL/LTR */
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: background 0.3s;
}
.faq-question:hover { background: rgba(255,255,255,0.02); }
.faq-icon {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--primary);
    transition: transform 0.3s;
}
.faq-item.active .faq-icon { transform: rotate(45deg); color: var(--secondary); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}
.faq-answer p {
    padding: 0 24px 24px;
    color: var(--text-muted);
}

/* Newsletter CTA Section */
.cta-section { padding: 80px 0 40px; }
.cta-container {
    text-align: center;
    padding: 60px 20px;
    position: relative;
    overflow: hidden;
}
.cta-title { font-size: 2.2rem; margin-bottom: 16px; font-weight: 800; }
.cta-desc { color: var(--text-muted); margin-bottom: 30px; font-size: 1.1rem; }
.newsletter-form {
    display: flex;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}
.newsletter-form input {
    flex: 1;
    padding: 16px 20px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(0,0,0,0.2);
    color: white;
    font-family: inherit;
    font-size: 1rem;
}
.newsletter-form input:focus { outline: none; border-color: var(--primary); }
.submit-btn {
    padding: 16px 32px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}
.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.4);
}
.form-message {
    margin-top: 16px;
    font-size: 0.95rem;
    min-height: 20px;
    color: #27C93F;
}

/* Footer */
footer {
    padding: 40px 0;
    border-top: 1px solid var(--glass-border);
    margin-top: 60px;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}
.footer-links {
    display: flex;
    gap: 24px;
    color: var(--text-muted);
}
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s;
}
.footer-links a:hover {
    color: var(--primary);
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}
@keyframes equalize {
    0% { transform: scaleY(0.3); }
    100% { transform: scaleY(1); }
}

/* Scroll Animation Classes */
.hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.show {
    opacity: 1;
    transform: translateY(0);
}
.feature-card.show, .step-card.show, .faq-item.show {
    transition-delay: calc(var(--delay) * 150ms);
}

/* Responsive */
@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        margin-top: 40px;
    }
    .subtitle { margin: 0 auto 40px; }
    .store-buttons { justify-content: center; }
    .hero-visual { margin-top: 60px; }
    
    .steps-container {
        flex-direction: column;
        gap: 20px;
    }
    .step-line { display: none; }
    .newsletter-form { flex-direction: column; }
}
@media (max-width: 500px) {
    .title { font-size: 2.5rem; }
    .store-btn-wrapper, .store-btn { width: 100%; max-width: 300px; }
}
