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

:root {
    --primary: #A0E4B0;
    --primary-dark: #7DD69B;
    --secondary: #7EC9E2;
    --accent: #3BB273;
    --text-dark: #E5E5E5;
    --text-light: #B0B0B0;
    --text-lighter: #808080;
    --bg-light: #1A1A1A;
    --bg-white: #0F0F0F;
    --bg-surface: #1A1A1A;
    --bg-surface-hover: #252525;
    --border: #2A2A2A;
    --success: #3BB273;
    --error: #FF6B6B;
    --gradient-1: linear-gradient(135deg, #A0E4B0 0%, #7DD69B 100%);
    --gradient-2: linear-gradient(135deg, #7EC9E2 0%, #A0E4B0 100%);
    --gradient-3: linear-gradient(135deg, #3BB273 0%, #A0E4B0 100%);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.5);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.6);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

/* Persian font family */
.lang-fa, [dir="rtl"] {
    font-family: 'Vazirmatn', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Animated Background */
#particles-js {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    opacity: 0.6;
}

.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, 
        rgba(160, 228, 176, 0.08) 0%, 
        rgba(125, 214, 155, 0.08) 25%,
        rgba(126, 201, 226, 0.08) 50%,
        rgba(59, 178, 115, 0.08) 75%,
        rgba(160, 228, 176, 0.08) 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    font-family: 'Vazirmatn';
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
}

.logo-icon {
    font-size: 2rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

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

.ai-badge {
    display: inline-block;
    margin-left: 0.25rem;
    padding: 0.125rem 0.5rem;
    background: var(--gradient-1);
    color: white;
    font-size: 0.7rem;
    border-radius: 4px;
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.lang-toggle {
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

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

.nav-cta {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    margin-left: 1rem;
}

/* Hero Section */
.hero {
    padding: 10rem 0 6rem;
    padding-top: 120px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 600px;
    margin-bottom: 4rem;
    margin-top: 2rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(160, 228, 176, 0.1);
    border: 1px solid rgba(160, 228, 176, 0.3);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 2rem;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.5); opacity: 0.5; }
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.quick-chat-cta {
    text-align: center;
    margin-bottom: 2.5rem;
}

.quick-chat-cta .btn {
    font-size: 1.125rem;
    padding: 1.25rem 2.5rem;
    box-shadow: 0 15px 35px rgba(160, 228, 176, 0.4);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 15px 35px rgba(160, 228, 176, 0.4);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 20px 40px rgba(160, 228, 176, 0.6);
        transform: scale(1.02);
    }
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: 0 10px 20px rgba(160, 228, 176, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(125, 214, 155, 0.4);
    background: linear-gradient(135deg, #7DD69B 0%, #3BB273 100%);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: rgba(160, 228, 176, 0.1);
}

.btn-arrow {
    transition: transform 0.3s ease;
}

.btn:hover .btn-arrow {
    transform: translateX(4px);
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    align-items: center;
    padding: 2rem;
    background: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.stat-item {
    flex: 1;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-number::after {
    content: '+';
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* Hero Visual */
.hero-visual {
    position: absolute;
    right: -5%;
    top: 250px;
    transform: translateY(-50%);
    width: 546px;
    height: 600px;
}

.lang-fa.hero-visual {
    right: auto;
    left: 0;
}

.terminal-window {
    background: #1e293b;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transform: perspective(1000px) rotateY(10deg);
    transition: transform 0.5s ease;
}

.terminal-window:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.terminal-header {
    background: #0f172a;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.terminal-buttons {
    display: flex;
    gap: 0.5rem;
}

.terminal-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-btn.red { background: #FF6B6B; }
.terminal-btn.yellow { background: #f59e0b; }
.terminal-btn.green { background: #3BB273; }

.terminal-title {
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 500;
}

.terminal-body {
    padding: 1.5rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.8;
}

.code-line {
    color: #e2e8f0;
    margin-bottom: 0.25rem;
}

.indent { padding-left: 2rem; }
.indent2 { padding-left: 4rem; }

.keyword { color: #c084fc; }
.function { color: #60a5fa; }
.string { color: #34d399; }
.number { color: #fbbf24; }
.comment { color: #64748b; }
.variable { color: #f472b6; }

.typing-animation {
    opacity: 0;
    animation: typeIn 0.5s ease forwards;
}

.typing-animation:nth-child(8) { animation-delay: 0.5s; }
.typing-animation:nth-child(9) { animation-delay: 1s; }
.typing-animation:nth-child(10) { animation-delay: 1.5s; }
.typing-animation:nth-child(11) { animation-delay: 2s; }
.typing-animation:nth-child(12) { animation-delay: 2.5s; }
.typing-animation:nth-child(13) { animation-delay: 3s; }

@keyframes typeIn {
    to { opacity: 1; }
}

/* Floating Cards */
.floating-card {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
    animation: float 3s ease-in-out infinite;
}

.card-1 {
    top: 10%;
    left: -10%;
    animation-delay: 0s;
}

.lang-fa.card-1 {
    right: -2%;
    left: auto;
}

.card-2 {
    top: 60%;
    left: -15%;
    animation-delay: 1s;
}

.lang-fa.card-2 {
    right: -10%;
    left: auto;
}

.card-3 {
    bottom: 10%;
    left: 5%;
    animation-delay: 2s;
}

.lang-fa.card-3 {
    right: 8%;
    left: auto;
}

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

.card-icon {
    font-size: 1.5rem;
}

.card-text {
    font-weight: 600;
    color: var(--text-dark);
}

/* Sections */
section {
    padding: 6rem 0;
    position: relative;
}

.section-cta {
    text-align: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(160, 228, 176, 0.1);
    border: 1px solid rgba(160, 228, 176, 0.3);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1rem;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-dark);
}

/* Features Section */
.features {
    background: var(--bg-light);
}

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

.feature-card {
    background: var(--bg-surface);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    background: var(--bg-surface-hover);
    border-color: rgba(160, 228, 176, 0.3);
}

.feature-icon {
    margin-bottom: 1.5rem;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.feature-description {
    color: var(--text-light);
    line-height: 1.8;
}

/* How It Works */
.how-it-works {
    background: var(--bg-white);
}

.steps {
    max-width: 900px;
    margin: 0 auto;
}

.step {
    display: grid;
    grid-template-columns: 80px 1fr 200px;
    gap: 2rem;
    align-items: center;
    padding: 2rem;
    margin-bottom: 2rem;
    background: rgba(160, 228, 176, 0.08);
    border-radius: 16px;
    border-left: 4px solid var(--accent);
}

.step-number {
    font-size: 3rem;
    font-weight: 900;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.step-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.step-description {
    color: var(--text-light);
    line-height: 1.8;
}

.step-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.chat-bubble {
    padding: 1rem 1.5rem;
    background: var(--bg-surface);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    font-style: italic;
    color: var(--text-light);
    position: relative;
    border: 1px solid var(--border);
}

.chat-bubble::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid var(--bg-surface);
}

.code-preview {
    padding: 1rem;
    background: #1e293b;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
}

.code-line-mini {
    color: #e2e8f0;
    margin-bottom: 0.25rem;
}

.chart-mini {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
    height: 60px;
}

.chart-bar {
    flex: 1;
    background: var(--gradient-1);
    border-radius: 4px;
    animation: grow 1s ease-out;
}

@keyframes grow {
    from { height: 0; }
}

.rocket-icon {
    font-size: 4rem;
    animation: rocket 2s ease-in-out infinite;
}

@keyframes rocket {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(-10deg); }
}

.step-connector {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, var(--primary), transparent);
    margin: 0 auto 2rem;
}

/* Benefits Section */
.benefits {
    background: var(--bg-light);
}

.benefits-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.benefits-description {
    color: var(--text-light);
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.benefits-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.benefit-icon {
    width: 28px;
    height: 28px;
    background: var(--gradient-1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: 700;
}

.benefit-text {
    color: var(--text-light);
    line-height: 1.8;
}

.benefit-text strong {
    color: var(--text-dark);
}

/* Trading Dashboard */
.trading-dashboard {
    background: var(--bg-surface);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    padding: 2rem;
    border: 1px solid var(--border);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.dashboard-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(59, 178, 115, 0.1);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #3BB273;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #3BB273;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dash-stat {
    text-align: center;
}

.dash-stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.dash-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-dark);
}

.dash-stat-value.positive {
    color: #3BB273;
}

.dashboard-chart {
    height: 200px;
}

/* Demo Section */
.demo-section {
    background: var(--bg-white);
}

.demo-container {
    max-width: 900px;
    margin: 0 auto;
}

.video-placeholder {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: linear-gradient(135deg, #A0E4B0 0%, #7DD69B 100%);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.video-placeholder:hover {
    transform: scale(1.02);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.3s ease;
}

.video-placeholder:hover .play-button {
    transform: translate(-50%, -50%) scale(1.1);
}

.demo-text {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #A0E4B0 0%, #7DD69B 100%);
    color: white;
    text-align: center;
    padding: 6rem 0;
}

.cta-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.cta-section .btn-primary {
    background: rgba(255, 255, 255, 0.95);
    color: var(--accent);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.cta-section .btn-primary:hover {
    background: white;
    color: var(--accent);
}

.cta-note {
    margin-top: 1rem;
    opacity: 0.8;
    font-size: 0.875rem;
}

/* Footer */
.footer {
    background: #0A0A0A;
    color: var(--text-dark);
    padding: 3rem 0;
    border-top: 1px solid var(--border);
}

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

.footer-left .logo {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.footer-tagline {
    color: var(--text-light);
    max-width: 300px;
}

.footer-copy {
    color: var(--text-light);
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-visual {
        position: relative;
        right: 0;
        top: 0;
        transform: none;
        width: 100%;
        height: auto;
        margin-top: 4rem;
    }

    .terminal-window {
        transform: none;
    }

    .floating-card {
        display: none;
    }

    .benefits-content {
        grid-template-columns: 1fr;
    }

    .step {
        grid-template-columns: 60px 1fr;
    }

    .step-visual {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .nav-links {
        gap: 1rem;
    }

    .nav-link {
        display: none;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .stat-divider {
        display: none;
    }

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

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

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

    .cta-title {
        font-size: 2rem;
    }
}

/* RTL Support for Persian */
[dir="rtl"] {
    direction: rtl;
}

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

[dir="rtl"] .btn-arrow {
    transform: scaleX(-1);
}

[dir="rtl"] .step {
    border-left: none;
    border-right: 4px solid var(--accent);
}

/* Dark theme specific adjustments for better contrast */
.hero-badge {
    background: rgba(160, 228, 176, 0.15);
    border-color: rgba(160, 228, 176, 0.4);
    color: var(--primary);
}

.section-badge {
    background: rgba(160, 228, 176, 0.15);
    border-color: rgba(160, 228, 176, 0.4);
    color: var(--primary);
}

.status-badge {
    background: rgba(59, 178, 115, 0.15);
    color: var(--accent);
}

/* Ensure primary color text is readable on dark backgrounds */
.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Improve button contrast */
.btn-primary {
    color: #0F0F0F;
    font-weight: 600;
}

/* Chart adjustments for dark theme */
.dashboard-chart {
    filter: brightness(0.9);
}

