@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

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

:root {
    --primary: #6C5CE7;
    --primary-light: #A29BFE;
    --primary-dark: #4834D4;
    --accent: #00CEFF;
    --accent-glow: rgba(0, 206, 255, 0.3);
    --success: #00E676;
    --warning: #FFC107;
    --danger: #FF5252;
    --bg-primary: #0A0E1A;
    --bg-secondary: #111827;
    --bg-card: #1A1F35;
    --bg-card-hover: #222845;
    --surface: #252B43;
    --text-primary: #F0F0F5;
    --text-secondary: #A0A3B5;
    --text-muted: #6B7085;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(108, 92, 231, 0.4);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.35);
    --shadow-card-hover: 0 16px 48px rgba(108, 92, 231, 0.2);
    --glass: rgba(26, 31, 53, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --gradient-hero: linear-gradient(135deg, #6C5CE7 0%, #00CEFF 50%, #A29BFE 100%);
    --gradient-card: linear-gradient(135deg, rgba(108, 92, 231, 0.1) 0%, rgba(0, 206, 255, 0.05) 100%);
    --gradient-btn: linear-gradient(135deg, #6C5CE7 0%, #4834D4 100%);
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Space Grotesk', 'Inter', sans-serif;
    --section-padding: 100px 0;
    --container-width: 1280px;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;
}

[data-theme="light"] {
    --bg-primary: #F5F6FA;
    --bg-secondary: #FFFFFF;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F8F8FF;
    --surface: #EEF0F5;
    --text-primary: #1A1A2E;
    --text-secondary: #555770;
    --text-muted: #8E90A5;
    --border: rgba(0, 0, 0, 0.07);
    --border-hover: rgba(108, 92, 231, 0.3);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.08);
    --shadow-card-hover: 0 16px 48px rgba(108, 92, 231, 0.12);
    --glass: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.06);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background var(--transition-medium), color var(--transition-medium);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Particles */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: all var(--transition-medium);
}

.navbar.scrolled {
    padding: 10px 0;
    background: var(--glass);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
}

.nav-logo svg {
    width: 36px;
    height: 36px;
    color: var(--primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    font-family: var(--font-primary);
    transition: all var(--transition-fast);
    cursor: pointer;
    white-space: nowrap;
}

.lang-toggle:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.theme-toggle:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: rotate(30deg);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 30px;
    border-radius: var(--radius-full);
    font-size: 0.95rem;
    font-weight: 600;
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-btn);
    color: white;
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 35px rgba(108, 92, 231, 0.5);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    border-color: var(--border-hover);
    box-shadow: 0 8px 25px rgba(108, 92, 231, 0.15);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-3px);
}

/* Hero */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 30%, rgba(108, 92, 231, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 60%, rgba(0, 206, 255, 0.08) 0%, transparent 50%),
        var(--bg-primary);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 850px;
    padding: 0 24px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(108, 92, 231, 0.15);
    border: 1px solid rgba(108, 92, 231, 0.25);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-light);
    margin-bottom: 24px;
}

.hero-badge .badge-dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero p.hero-desc {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 650px;
    margin: 0 auto 36px;
}

.hero-buttons {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.gradient-text {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* App Screenshot */
.app-screenshot {
    margin-top: 60px;
    position: relative;
    z-index: 2;
}

.app-screenshot img {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5), 0 0 60px rgba(108, 92, 231, 0.15);
    max-width: 900px;
    margin: 0 auto;
}

/* Section Common */
.section {
    padding: var(--section-padding);
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 64px;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: rgba(108, 92, 231, 0.1);
    border: 1px solid rgba(108, 92, 231, 0.15);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 16px;
}

.section-header p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all var(--transition-medium);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-card-hover);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--gradient-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--primary-light);
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

.feature-card h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

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

/* Supported Sites */
.sites-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

.site-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.site-badge:hover {
    border-color: var(--border-hover);
    color: var(--primary-light);
    transform: translateY(-2px);
}

.site-badge svg {
    width: 18px;
    height: 18px;
}

/* Download Section */
.download-box {
    background: var(--gradient-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.download-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-hero);
}

.download-box h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.download-box p {
    color: var(--text-secondary);
    margin-bottom: 28px;
}

.download-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Requirements */
.req-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.req-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
    transition: all var(--transition-medium);
}

.req-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.req-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--gradient-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: var(--accent);
}

.req-card-icon svg {
    width: 22px;
    height: 22px;
}

.req-card h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

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

.req-card a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--primary-light);
    font-size: 0.82rem;
    font-weight: 600;
    margin-top: 10px;
    transition: color var(--transition-fast);
}

.req-card a:hover {
    color: var(--accent);
}

/* How It Works */
.steps-list {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--transition-medium);
}

.step-item:hover {
    border-color: var(--border-hover);
    transform: translateX(6px);
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    background: var(--gradient-btn);
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-item h3 {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.step-item p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* FAQ */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition-medium);
}

.faq-item.active {
    border-color: var(--border-hover);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    gap: 16px;
}

.faq-question:hover {
    color: var(--primary-light);
}

.faq-icon {
    width: 24px;
    height: 24px;
    transition: transform var(--transition-medium);
    flex-shrink: 0;
    color: var(--text-muted);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
    color: var(--primary-light);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.faq-item.active .faq-answer {
    max-height: 300px;
}

.faq-answer-inner {
    padding: 0 24px 20px;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.7;
}

/* Credit */
.hero-credit {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.credit-link {
    color: var(--primary-light);
    font-weight: 600;
    transition: color var(--transition-fast);
}

.credit-link:hover {
    color: var(--accent);
}

.footer-credit {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-credit a {
    color: var(--primary-light);
    font-weight: 600;
    transition: color var(--transition-fast);
}

.footer-credit a:hover {
    color: var(--accent);
}

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

.footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Animations */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.5);
    }
}

.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--surface);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* RTL */
[dir="rtl"] {
    font-family: 'Inter', 'Segoe UI', Tahoma, sans-serif;
}

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

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

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

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

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

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

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

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

[dir="rtl"] .step-item {
    flex-direction: row-reverse;
    text-align: right;
}

[dir="rtl"] .step-item:hover {
    transform: translateX(-6px);
}

[dir="rtl"] .faq-question {
    flex-direction: row-reverse;
    text-align: right;
}

[dir="rtl"] .faq-answer-inner {
    text-align: right;
}

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

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

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

/* Responsive */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .req-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

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

    .download-box {
        padding: 32px 20px;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .app-screenshot img {
        max-width: 100%;
    }
}