/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #4CAF50;
    --primary-dark: #388E3C;
    --primary-light: #81C784;
    --secondary: #FF9800;
    --dark: #1a1a2e;
    --gray: #6b7280;
    --light-gray: #f3f4f6;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, #4CAF50 0%, #81C784 100%);
    --shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 25px 50px rgba(0, 0, 0, 0.15);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--white);
    overflow-x: hidden;
}

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

/* Sticky Header - Glassmorphism */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 14px 24px;
    background: transparent;
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    border-bottom: 1px solid transparent;
    transition: all 0.4s ease;
}

.header.scrolled {
    background: rgba(26, 26, 46, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 10px 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--white);
}

.logo-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: contain;
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
}

.nav {
    display: flex;
    gap: 32px;
}

.nav a {
    color: var(--white);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.nav a:hover {
    opacity: 1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-header {
    padding: 10px 20px;
    background: rgba(76, 175, 80, 0.9);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-header:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.35);
}

@media (max-width: 768px) {
    .nav {
        display: none;
    }
    
    .header-right {
        gap: 8px;
    }
    
    .btn-header {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    /* Hide language selector on mobile */
    .lang-selector {
        display: none;
    }
}

/* Hide mobile language selector */
.lang-selector-mobile {
    display: none;
}

/* Language Selector */
.lang-selector {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.lang-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.lang-flag {
    font-size: 18px;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    max-height: 400px;
    overflow-y: auto;
}

.lang-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown button {
    display: block;
    width: 100%;
    padding: 12px 20px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
    white-space: nowrap;
}

.lang-dropdown button:first-child {
    border-radius: 16px 16px 0 0;
}

.lang-dropdown button:last-child {
    border-radius: 0 0 16px 16px;
}

.lang-dropdown button:hover {
    background: var(--light-gray);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 24px 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.hero-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.85) 0%, rgba(26, 26, 46, 0.7) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--white);
    max-width: 600px;
}

.hero-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero h1 {
    font-size: clamp(40px, 8vw, 72px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #fff 0%, #81C784 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 40px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    background: var(--white);
    color: var(--dark);
    text-decoration: none;
    border-radius: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.btn-download:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-download div {
    text-align: left;
}

.btn-small {
    display: block;
    font-size: 11px;
    font-weight: 400;
    opacity: 0.7;
}

.btn-large {
    display: block;
    font-size: 18px;
    font-weight: 600;
}

.hero-phone {
    position: absolute;
    right: 10%;
    bottom: -50px;
    z-index: 2;
    display: none;
}

@media (min-width: 1024px) {
    .hero {
        justify-content: flex-start;
        padding-left: 10%;
    }
    
    .hero-content {
        text-align: left;
    }
    
    .hero-cta {
        justify-content: flex-start;
    }
    
    .hero-phone {
        display: block;
    }
}

.phone-frame {
    width: 280px;
    height: auto;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transform: rotate(5deg);
}

.phone-frame img {
    width: 100%;
    height: auto;
    display: block;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.mouse {
    width: 24px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

/* Features Section */
.features {
    padding: 120px 0;
    background: var(--white);
}

.section-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 18px;
    color: var(--gray);
    text-align: center;
    margin-bottom: 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.feature-card {
    padding: 40px;
    background: var(--white);
    border-radius: 24px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--light-gray);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--gray);
    font-size: 15px;
}

/* How It Works Section */
.how-it-works {
    padding: 120px 0;
    background: var(--light-gray);
}

.steps {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 60px;
}

.step {
    text-align: center;
    max-width: 250px;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    margin: 0 auto 20px;
}

.step h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.step p {
    color: var(--gray);
    font-size: 14px;
}

.step-arrow {
    font-size: 32px;
    color: var(--primary);
    opacity: 0.5;
}

@media (max-width: 768px) {
    .step-arrow {
        display: none;
    }
    
    .steps {
        flex-direction: column;
    }
}

/* AI Demo Section */
.ai-demo {
    padding: 100px 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    overflow: hidden;
}

.ai-demo-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.food-showcase {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.food-image {
    width: 100%;
    max-width: 450px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.food-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Nutrition Badges */
.nutrition-badge {
    position: absolute;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 16px 20px;
    text-align: center;
    color: var(--white);
    animation: float 3s ease-in-out infinite;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.badge-icon {
    font-size: 24px;
    margin-bottom: 6px;
}

.badge-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    opacity: 0.7;
    margin-bottom: 4px;
}

.badge-value {
    font-size: 22px;
    font-weight: 700;
}

.badge-carbs {
    top: 10%;
    left: -5%;
    animation-delay: 0s;
}

.badge-protein {
    top: 50%;
    right: -10%;
    transform: translateY(-50%);
    animation-delay: 0.5s;
}

.badge-fat {
    bottom: 10%;
    left: 0%;
    animation-delay: 1s;
}

.badge-calories {
    top: 5%;
    right: 5%;
    background: rgba(76, 175, 80, 0.3);
    border-color: rgba(76, 175, 80, 0.4);
    animation-delay: 1.5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.badge-protein {
    animation-name: floatRight;
}

@keyframes floatRight {
    0%, 100% {
        transform: translateY(-50%) translateX(0);
    }
    50% {
        transform: translateY(-50%) translateX(10px);
    }
}

.ai-demo-text {
    color: var(--white);
}

.ai-demo-text h2 {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    margin-bottom: 24px;
    line-height: 1.2;
}

.ai-demo-text p {
    font-size: 18px;
    line-height: 1.7;
    opacity: 0.85;
    margin-bottom: 40px;
}

.btn-demo {
    display: inline-block;
    padding: 16px 36px;
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-demo:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(76, 175, 80, 0.3);
}

@media (max-width: 900px) {
    .ai-demo-content {
        grid-template-columns: 1fr;
        gap: 60px;
        text-align: center;
    }
    
    .food-showcase {
        order: -1;
    }
    
    .nutrition-badge {
        padding: 12px 16px;
    }
    
    .badge-value {
        font-size: 18px;
    }
    
    .badge-carbs {
        left: 5%;
    }
    
    .badge-protein {
        right: 0%;
    }
    
    .badge-fat {
        left: 10%;
    }
}

/* Stats Section */
.stats-section {
    padding: 100px 0;
    background: var(--dark);
    color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-number {
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 16px;
    opacity: 0.8;
    margin-top: 8px;
}

/* Download Section */
.download-section {
    padding: 120px 0;
    background: var(--gradient);
    text-align: center;
}

.download-section .section-title {
    color: var(--white);
}

.download-section .section-subtitle {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 40px;
}

.btn-large-download {
    padding: 20px 40px;
}

.btn-large-download svg {
    width: 32px;
    height: 32px;
}

.btn-large-download .btn-large {
    font-size: 22px;
}

/* Footer */
.footer {
    padding: 60px 0 30px;
    background: var(--dark);
    color: var(--white);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.footer-brand p {
    opacity: 0.7;
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 32px;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.7;
    font-size: 14px;
    transition: opacity 0.2s;
}

.footer-links a:hover {
    opacity: 1;
}

.footer-bottom {
    padding-top: 30px;
    text-align: center;
    opacity: 0.5;
    font-size: 13px;
}

/* RTL Support for Arabic */
[dir="rtl"] .hero-content {
    text-align: right;
}

[dir="rtl"] .hero-cta {
    justify-content: flex-end;
}

[dir="rtl"] .btn-download div {
    text-align: right;
}

[dir="rtl"] .lang-dropdown {
    right: auto;
    left: 0;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-card, .step, .stat-item {
    animation: fadeInUp 0.6s ease forwards;
}

/* Responsive */
@media (max-width: 640px) {
    .hero {
        padding: 60px 20px;
    }
    
    .features, .how-it-works, .download-section {
        padding: 80px 0;
    }
    
    .feature-card {
        padding: 30px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 16px;
    }
}
