:root {
    --primary: #00d4aa;
    --primary-dark: #00a884;
    --secondary: #1fd8b7;
    --accent: #ffd700;
    --dark: #0a1628;
    --dark-surface: #162238;
    --background: #ffffff;
    --surface: #f9fafb;
    --text: #111827;
    --text-secondary: #6b7280;
    --border: #e5e7eb;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.2);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.3);
    --shadow-xl: 0 25px 50px -12px rgb(0 0 0 / 0.5);
    --gradient: linear-gradient(135deg, #00d4aa 0%, #00a884 50%, #0a1628 100%);
    --gradient-radial: radial-gradient(circle at top left, #00d4aa, #00a884);
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: #111827;
        --surface: #1f2937;
        --text: #f9fafb;
        --text-secondary: #9ca3af;
        --border: #374151;
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    transition: all 0.3s ease;
}

[dir="rtl"] body {
    font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

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

.hidden {
    display: none !important;
}

/* Redirect Banner */
.redirect-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--gradient);
    color: white;
    padding: 15px;
    z-index: 1000;
    animation: slideDown 0.3s ease;
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.cancel-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.3s;
}

.cancel-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Header */
.header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(var(--surface), 0.9);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    border-radius: 10px;
}

.logo-text {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Header Store Buttons */
.header-buttons {
    display: flex;
    gap: 10px;
    margin-left: auto;
    margin-right: 20px;
}

.header-store-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
}

.header-ios {
    background: #000;
    color: white;
}

.header-ios:hover {
    background: #333;
    transform: translateY(-1px);
}

.header-android {
    background: #3DDC84;
    color: white;
}

.header-android:hover {
    background: #2dc470;
    transform: translateY(-1px);
}

.header-store-icon {
    flex-shrink: 0;
}

.header-btn-text {
    font-size: 14px;
}

[dir="rtl"] .header-buttons {
    margin-left: 20px;
    margin-right: auto;
}

[dir="rtl"] .header-store-btn {
    flex-direction: row-reverse;
}

.lang-toggle {
    position: relative;
    display: flex;
    align-items: center;
    gap: 5px;
}

.lang-btn {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border: 2px solid transparent;
    color: white;
    cursor: pointer;
    padding: 8px 14px;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(5, 150, 105, 0.2);
    text-transform: uppercase;
}

.lang-btn.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #34d399;
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4);
    transform: translateY(-2px);
}

.lang-btn:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #34d399;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.divider {
    color: var(--text-secondary);
    opacity: 0.3;
    font-weight: 300;
}

/* Language Menu Toggle for Mobile */
.lang-menu-toggle {
    display: none;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border: 2px solid #34d399;
    color: white;
    cursor: pointer;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
    transition: all 0.3s ease;
}

.lang-menu-toggle:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.lang-menu-toggle::after {
    content: '▼';
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.lang-menu-toggle.active::after {
    transform: rotate(180deg);
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 2px solid #34d399;
    border-radius: 12px;
    padding: 8px;
    margin-top: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-width: 200px;
    max-height: 400px;
    overflow-y: auto;
}

.lang-dropdown.show {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.lang-dropdown .lang-btn {
    width: 100%;
    justify-content: center;
    font-size: 0.8rem;
}

.lang-dropdown .divider {
    display: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .lang-toggle {
        flex-wrap: wrap;
        gap: 4px;
    }

    .lang-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .lang-toggle .lang-btn,
    .lang-toggle .divider {
        display: none;
    }

    .lang-menu-toggle {
        display: flex;
    }

    .lang-dropdown.show {
        display: grid;
    }
}

/* Hero Section - Completely Redesigned */
.hero {
    min-height: 100vh;
    background: var(--dark);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 80px 0 40px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    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%3Cpath d='M30 5L35 15L45 15L37.5 22.5L40 32.5L30 25L20 32.5L22.5 22.5L15 15L25 15L30 5Z' fill='none' stroke='%2310b981' stroke-opacity='0.05'/%3E%3C/svg%3E");
    opacity: 0.5;
    z-index: 0;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    text-align: center;
}

.app-icon {
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 30px;
    background: white;
}

.headline {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtext {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

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

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
    font-weight: 500;
    min-width: 180px;
    cursor: pointer;
}

.ios-btn {
    background: #000;
    color: white;
}

.android-btn {
    background: #000;
    color: white;
}

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

.store-icon {
    flex-shrink: 0;
}

.store-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

[dir="rtl"] .store-text {
    text-align: right;
    align-items: flex-end;
}

.store-label {
    font-size: 0.75rem;
    opacity: 0.9;
}

.store-name {
    font-size: 1.1rem;
    font-weight: 600;
}

.trouble-link {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-decoration: underline;
}

/* Phone Mockup */
.hero-mockup {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 600px;
}

.phone-frame {
    position: absolute;
    width: 280px;
    height: 560px;
    background: linear-gradient(135deg, #1f2937, #374151);
    border-radius: 40px;
    padding: 10px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.phone-frame:nth-child(1) {
    z-index: 3;
    transform: rotate(-5deg);
}

.phone-frame-2 {
    left: 80px;
    z-index: 2;
    transform: rotate(0deg);
    opacity: 0.8;
}

.phone-frame-3 {
    left: 160px;
    z-index: 1;
    transform: rotate(5deg);
    opacity: 0.6;
}

.phone-screen {
    width: 100%;
    height: 100%;
    border-radius: 30px;
    object-fit: cover;
    background: #f3f4f6;
}

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

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 50px;
    color: var(--text);
}

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

.feature-card {
    background: var(--background);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.feature-icon {
    font-size: 2rem;
    margin-bottom: 15px;
}

.feature-card h3 {
    margin-bottom: 10px;
    color: var(--text);
    font-size: 1.2rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Screenshots Section */
.screenshots {
    padding: 80px 0;
    background: var(--background);
}

.screenshots-carousel {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    padding: 20px 0;
    scroll-snap-type: x mandatory;
}

.screenshot-item {
    flex: 0 0 250px;
    text-align: center;
    scroll-snap-align: center;
}

.screenshot-item img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    background: #f3f4f6;
}

.screenshot-item p {
    margin-top: 15px;
    color: var(--text-secondary);
}

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

.download .section-title {
    color: white;
}

.download .store-buttons {
    justify-content: center;
}

/* FAQ Section */
.faq {
    padding: 80px 0;
    background: var(--surface);
}

.faq-items {
    max-width: 700px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 30px;
    padding: 25px;
    background: var(--background);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.faq-item h3 {
    margin-bottom: 10px;
    color: var(--text);
}

.faq-item p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Footer */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 40px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-links {
    display: flex;
    gap: 10px;
    align-items: center;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
}

.lang-switch-footer {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-weight: 500;
    transition: opacity 0.3s;
}

.lang-switch-footer:hover {
    opacity: 0.8;
}

/* RTL Support */
[dir="rtl"] .hero .container {
    direction: rtl;
}

[dir="rtl"] .store-btn {
    flex-direction: row-reverse;
}

[dir="rtl"] .feature-card {
    text-align: right;
}

[dir="rtl"] .logo {
    flex-direction: row-reverse;
}

/* Responsive Design */
@media (max-width: 1024px) and (min-width: 769px) {
    /* Tablet styles */
    .header-buttons {
        margin-right: 15px;
    }

    .header-store-btn {
        padding: 6px 12px;
        font-size: 13px;
    }

    .header-btn-text {
        display: none; /* Show only icons on tablets */
    }

    .header-store-icon {
        width: 24px;
        height: 24px;
    }
}

@media (max-width: 768px) {
    /* Header responsive styles */
    .header .container {
        flex-wrap: wrap;
        padding: 10px 15px;
    }

    .header-buttons {
        display: none; /* Hide header buttons on mobile to avoid clutter */
    }

    .logo-text {
        font-size: 1rem;
    }

    .hero .container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-mockup {
        height: 400px;
        margin-top: 40px;
    }

    .phone-frame {
        width: 200px;
        height: 400px;
    }

    .phone-frame-2,
    .phone-frame-3 {
        display: none;
    }

    .headline {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .store-buttons {
        flex-direction: column;
        align-items: center;
    }

    .store-btn {
        width: 100%;
        max-width: 280px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .screenshots-carousel {
        padding: 0 20px;
    }
}

/* Animations */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Scrollbar Styling */
.screenshots-carousel::-webkit-scrollbar {
    height: 8px;
}

.screenshots-carousel::-webkit-scrollbar-track {
    background: var(--border);
    border-radius: 10px;
}

.screenshots-carousel::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

/* Accessibility */
.store-btn:focus,
.lang-btn:focus,
.cancel-btn:focus,
.lang-switch-footer:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Floating WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    z-index: 999;
    transition: all 0.3s ease;
    text-decoration: none;
    animation: whatsappPulse 2s infinite;
}

[dir="rtl"] .whatsapp-float {
    right: auto;
    left: 30px;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.7);
    background: #20ba5a;
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    transform: translateX(-10px);
}

[dir="rtl"] .whatsapp-float:hover .whatsapp-tooltip {
    transform: translateX(10px);
}

.whatsapp-icon {
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.whatsapp-tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%) translateX(0);
    background: #1a1a1a;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    white-space: nowrap;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

[dir="rtl"] .whatsapp-tooltip {
    right: auto;
    left: 70px;
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    right: -8px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 8px solid #1a1a1a;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

[dir="rtl"] .whatsapp-tooltip::after {
    right: auto;
    left: -8px;
    border-left: none;
    border-right: 8px solid #1a1a1a;
}

@keyframes whatsappPulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    }
    50% {
        box-shadow: 0 4px 30px rgba(37, 211, 102, 0.8);
    }
}

/* Ripple Effect */
.whatsapp-float::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: #25d366;
    border-radius: 50%;
    z-index: -1;
    animation: ripple 2s infinite;
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
    }

    [dir="rtl"] .whatsapp-float {
        right: auto;
        left: 20px;
    }

    .whatsapp-icon {
        width: 24px;
        height: 24px;
    }
}

/* Print Styles */
@media print {
    .header,
    .download,
    .screenshots,
    .whatsapp-float {
        display: none;
    }
}