:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #64748b;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --border-color: #e2e8f0;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --border-radius-lg: 16px;
    --border-radius-xl: 24px;
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1);
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: all 0.2s ease;
    
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --header-height: 60px;
    --bottom-nav-height: 70px;
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #334155;
}

[dir="rtl"] {
    direction: rtl;
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    background: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

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

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-white {
    background: white;
    color: var(--primary);
}

.btn-link {
    background: none;
    color: var(--primary);
    padding: 0;
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 17px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn.loading .btn-text {
    visibility: hidden;
}

.btn .btn-loader {
    display: none;
    position: absolute;
}

.btn.loading .btn-loader {
    display: block;
}

.btn.loading {
    position: relative;
    pointer-events: none;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .input-prefix {
    display: flex;
    align-items: center;
    padding: 0 16px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-right: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-weight: 500;
    color: var(--text-secondary);
}

.input-group input {
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.input-hint {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--text-muted);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Checkbox */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
}

.checkbox-label input {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
}

.checkbox-label a {
    color: var(--primary);
}

/* Cards */
.card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

/* Landing Page */
.landing-page {
    background: var(--bg-primary);
}

.landing-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.logo i {
    font-size: 28px;
}

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

.lang-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    background: var(--bg-primary);
    font-size: 14px;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    padding: 140px 0 80px;
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
}

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

.hero-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.hero-note {
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-muted);
}

/* Phone Mockup */
.phone-mockup {
    width: 280px;
    height: 560px;
    background: #1e293b;
    border-radius: 40px;
    padding: 12px;
    margin: 0 auto;
    box-shadow: var(--shadow-xl);
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    border-radius: 32px;
    padding: 40px 20px 20px;
    overflow: hidden;
}

.mockup-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.mockup-avatar {
    width: 48px;
    height: 48px;
    background: var(--bg-tertiary);
    border-radius: 50%;
}

.mockup-text {
    flex: 1;
    height: 12px;
    background: var(--bg-tertiary);
    border-radius: 6px;
}

.mockup-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.mockup-card {
    aspect-ratio: 1;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}

.mockup-card.facebook { background: #1877f2; }
.mockup-card.instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.mockup-card.twitter { background: #000000; }
.mockup-card.youtube { background: #ff0000; }
.mockup-card.linkedin { background: #0a66c2; }
.mockup-card.tiktok { background: #000000; }

/* Features Section */
.features-section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 48px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.feature-card {
    text-align: center;
    padding: 32px 24px;
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}

.feature-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Platforms Section */
.platforms-section {
    padding: 80px 0;
    background: var(--bg-tertiary);
}

.platforms-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 24px;
}

.platform-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 24px 32px;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.platform-item:hover {
    transform: scale(1.05);
}

.platform-item i {
    font-size: 36px;
}

.platform-item span {
    font-weight: 500;
}

/* CTA Section */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    text-align: center;
    color: white;
}

.cta-section h2 {
    font-size: 36px;
    margin-bottom: 16px;
}

.cta-section p {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 32px;
}

/* Footer */
.landing-footer {
    padding: 40px 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

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

.footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 20px;
}

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

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

.footer-copyright {
    font-size: 14px;
    color: var(--text-muted);
}

/* Auth Pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
}

.auth-container {
    width: 100%;
    max-width: 440px;
    position: relative;
}

.auth-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 40px;
    position: relative;
    z-index: 1;
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    margin-bottom: 24px;
}

.auth-header h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-secondary);
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.trial-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
    padding: 12px;
    background: #ecfdf5;
    border-radius: var(--border-radius);
    color: #059669;
    font-size: 14px;
}

/* OTP Inputs */
.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
}

.otp-input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-primary);
    transition: var(--transition);
}

.otp-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.resend-section {
    text-align: center;
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

/* Decoration */
.auth-decoration {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.decoration-circle {
    position: absolute;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.1;
}

.circle-1 {
    width: 200px;
    height: 200px;
    top: -50px;
    right: -50px;
}

.circle-2 {
    width: 150px;
    height: 150px;
    bottom: -30px;
    left: -30px;
}

.circle-3 {
    width: 100px;
    height: 100px;
    top: 50%;
    left: -20px;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    max-width: 360px;
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.info { border-left: 4px solid var(--info); }

.toast i {
    font-size: 20px;
}

.toast.success i { color: var(--success); }
.toast.error i { color: var(--danger); }
.toast.warning i { color: var(--warning); }
.toast.info i { color: var(--info); }

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

@media (max-width: 768px) {
    .hero-section .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-image {
        order: -1;
    }
    
    .phone-mockup {
        width: 240px;
        height: 480px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .auth-card {
        padding: 24px;
    }
    
    .otp-input {
        width: 44px;
        height: 52px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .landing-header .header-content {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .platforms-grid {
        gap: 12px;
    }
    
    .platform-item {
        padding: 16px 20px;
    }
    
    .platform-item i {
        font-size: 28px;
    }
}
