/* Import Google Fonts for Persian and Latin */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* Root Variables */
:root {
    --primary-color: #2563eb;
    --secondary-color: #06b6d4;
    --accent-color: #8b5cf6;
    --background-color: #f0fdfa;
    --surface-color: rgba(255, 255, 255, 0.8);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: rgba(148, 163, 184, 0.2);
    --shadow-light: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-heavy: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    --gradient-accent: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    --backdrop-blur: blur(10px);
}

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

body {
    font-family: 'Vazirmatn', 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #e0f7fa 0%, #e8f5e8 50%, #f3e5f5 100%);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    font-weight: 400;
    font-size: 16px;
}

/* Three.js Background */
#three-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Typography */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero Section */
.hero-section {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 80px 0;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(50px);
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.7;
    opacity: 0;
    transform: translateY(30px);
}

.rating-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
}

.stars {
    font-size: 1.5rem;
    color: #fbbf24;
    display: flex;
    gap: 0.25rem;
}

.stars i {
    transition: all 0.3s ease;
}

.stars i:hover {
    transform: scale(1.2);
    color: #f59e0b;
}

.rating-text {
    font-weight: 600;
    color: var(--text-primary);
}

.rating-count {
    color: var(--text-secondary);
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    opacity: 0;
    transform: translateY(20px);
}

@media (min-width: 576px) {
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }
}

@media (min-width: 992px) {
    .hero-buttons {
        justify-content: start;
    }
}

.download-btn {
    background: var(--gradient-primary);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.download-btn i {
    font-size: 1.2rem;
}

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

.video-btn {
    border: 2px solid var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: var(--backdrop-blur);
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.video-btn i {
    font-size: 1.2rem;
}

.video-btn:hover {
    background: rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}

/* Phone Mockup */
.phone-mockup {
    display: flex;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transform: scale(0.8) rotate(-10deg);
}

.phone-frame {
    width: 320px;
    height: 600px;
    background: linear-gradient(145deg, #1f2937, #111827);
    border-radius: 3rem;
    padding: 1rem;
    box-shadow: var(--shadow-heavy);
    position: relative;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: white;
    border-radius: 2.5rem;
    overflow: hidden;
    position: relative;
}

.status-bar {
    background: #000;
    height: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1.5rem;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
}

.signal-bars {
    display: flex;
    gap: 2px;
}

.bar {
    width: 16px;
    height: 8px;
    background: white;
    border-radius: 2px;
}

.app-content {
    background: linear-gradient(135deg, #dbeafe, #e0e7ff);
    height: calc(100% - 32px);
    padding: 1.5rem;
}

.app-header {
    text-align: center;
    margin-bottom: 2rem;
}

.app-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 20px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.app-icon::after {
    content: '';
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 12px;
}

.app-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.content-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.content-card {
    background: white;
    padding: 1rem;
    border-radius: 16px;
    box-shadow: var(--shadow-light);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    border-radius: 50%;
}

.card-avatar.accent {
    background: var(--accent-color);
}

.card-avatar.secondary {
    background: var(--secondary-color);
}

.card-content {
    flex: 1;
}

.content-line {
    height: 12px;
    background: #e2e8f0;
    border-radius: 6px;
    margin-bottom: 8px;
}

.content-line.main {
    width: 75%;
}

.content-line.sub {
    width: 50%;
    height: 8px;
    margin-bottom: 0;
}

.home-indicator {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 128px;
    height: 4px;
    background: white;
    border-radius: 2px;
}

/* Sections */
.section-title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(50px);
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Features Section */
.features-section {
    padding: 80px 0;
    position: relative;
    z-index: 10;
}

.feature-card {
    background: var(--surface-color);
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    opacity: 0;
    transform: translateY(50px) scale(0.9);
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-medium);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.feature-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    opacity: 0.1;
    border-radius: inherit;
}

.feature-icon i {
    color: white;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.feature-icon.speed {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

.feature-icon.security {
    background: linear-gradient(135deg, #10b981, #059669);
}

.feature-icon.ui {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.feature-icon.sync {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.feature-icon.support {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.feature-icon.update {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-medium);
}

.feature-card:hover .feature-icon i {
    transform: scale(1.1);
}

.feature-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.feature-card:hover h3 {
    color: var(--primary-color);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    transition: color 0.3s ease;
}

.feature-card:hover p {
    color: var(--text-primary);
}

/* Screenshots Section */
.screenshots-section {
    padding: 80px 0;
    position: relative;
    z-index: 10;
}

.screenshot-card {
    background: var(--surface-color);
    backdrop-filter: var(--backdrop-blur);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(100px) rotateY(45deg);
}

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

.screenshot-image {
    position: relative;
    aspect-ratio: 9/16;
    overflow: hidden;
}

.screenshot-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.screenshot-card:hover .screenshot-image img {
    transform: scale(1.1);
}

.screenshot-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.screenshot-card:hover .screenshot-overlay {
    opacity: 1;
}

.screenshot-overlay h4 {
    color: white;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.screenshot-overlay p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.screenshot-content {
    padding: 1rem;
}

.screenshot-content h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.screenshot-card:hover .screenshot-content h4 {
    color: var(--primary-color);
}

.screenshot-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Phone Showcase */
.phone-showcase {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    margin: 4rem 0;
    height: 500px;
}

.showcase-phone {
    width: 288px;
    height: 500px;
    background: linear-gradient(145deg, #374151, #1f2937);
    border-radius: 2.5rem;
    padding: 12px;
    box-shadow: var(--shadow-heavy);
    position: absolute;
}

.main-phone {
    z-index: 20;
    transform: rotate(3deg);
}

.bg-phone-1 {
    z-index: 10;
    top: 16px;
    transform: rotate(20deg) translateX(30px);
    opacity: 0.6;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
}

.bg-phone-2 {
    z-index: 10;
    top: 16px;
    transform: rotate(-20deg) translateX(-30px);
    opacity: 0.6;
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
}

.phone-screen-showcase {
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 2rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    color: white;
}

.showcase-header {
    text-align: center;
    margin-bottom: 2rem;
}

.showcase-header h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.showcase-header p {
    opacity: 0.8;
    font-size: 0.9rem;
}

.showcase-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.showcase-item {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: var(--backdrop-blur);
    border-radius: 12px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.showcase-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
}

.showcase-text {
    flex: 1;
}

.text-line {
    height: 12px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    margin-bottom: 8px;
}

.text-line.small {
    width: 60%;
    height: 8px;
    margin-bottom: 0;
}

.text-line:nth-child(1) {
    width: 70%;
}

.showcase-item:nth-child(2) .text-line:nth-child(1) {
    width: 80%;
}

.showcase-item:nth-child(3) .text-line:nth-child(1) {
    width: 60%;
}

.showcase-item:nth-child(4) .text-line:nth-child(1) {
    width: 85%;
}

/* Footer */
.footer-section {
    background: var(--surface-color);
    backdrop-filter: var(--backdrop-blur);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1rem;
    position: relative;
    z-index: 10;
}

.footer-brand {
    opacity: 0;
    transform: translateY(50px);
}

.brand-logo {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    border-radius: 12px;
    margin-left: 0.75rem;
    position: relative;
}

.logo-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 4px;
}

.brand-logo span {
    font-size: 1.25rem;
    font-weight: 800;
}

.footer-brand p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.social-links {
    display: flex;
    gap: 0.75rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    color: var(--text-primary);
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-primary);
    transform: scale(0);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.social-link:hover {
    color: white;
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-medium);
}

.social-link:hover::before {
    transform: scale(1);
}

.social-link i {
    position: relative;
    z-index: 1;
}

.footer-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(50px);
}

.contact-info {
    opacity: 0;
    transform: translateY(50px);
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.contact-icon {
    margin-left: 0.75rem;
    font-size: 1.1rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.trust-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: var(--border-color);
    border-radius: 12px;
    margin-bottom: 0.5rem;
    opacity: 0;
    transform: translateY(50px);
}

.badge-icon {
    width: 64px;
    height: 64px;
    background: rgba(37, 99, 235, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.badge-icon::after {
    content: '✓';
    position: absolute;
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 0.75rem;
}

.badge-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
    padding-top: 1.5rem;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
    
    .phone-mockup {
        padding: 1rem;
    }
    
    .phone-frame {
        width: 280px;
        height: 520px;
    }
    
    .phone-showcase {
        height: 400px;
    }
    
    .showcase-phone {
        width: 240px;
        height: 400px;
    }
    
    .bg-phone-1,
    .bg-phone-2 {
        display: none;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .rating-section {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .phone-frame {
        width: 240px;
        height: 460px;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.scale-in {
    opacity: 1 !important;
    transform: scale(1) rotate(0deg) !important;
}

.slide-in {
    opacity: 1 !important;
    transform: translateY(0) rotateY(0deg) !important;
}

.stagger-in {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}