/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

html {
    overflow-x: hidden;
}

body {
    font-family: 'Tajawal', 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0f172a, #1a1a2e, #16213e);
    color: #ffffff;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Variables */
:root {
    --gold-light: #f0e491;
    --gold-medium: #bbc863;
    --green-medium: #658c58;
    --green-dark: #31694e;
    --gradient-primary: linear-gradient(135deg, #f0e491, #bbc863);
    --gradient-secondary: linear-gradient(135deg, #bbc863, #658c58);
    --gradient-dark: linear-gradient(135deg, #658c58, #31694e);
    --gradient-gold: linear-gradient(135deg, #ffd700, #ffed4e, #f0e491);
    --shadow-soft: 0 8px 32px rgba(240, 228, 145, 0.1);
    --shadow-medium: 0 15px 35px rgba(49, 105, 78, 0.15);
    --shadow-hard: 0 25px 50px rgba(0, 0, 0, 0.25);
    --text-light: #ffffff;
    --text-dark: #1a1a1a;
}

/* 3D Background Canvas */
#three-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.6;
}

/* Floating Particles */
.floating-coins {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Glass Effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-soft);
}

/* نافذة اختيار اللغة الأولى */
.first-time-language-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.first-time-language-modal.active {
    display: flex;
}

.language-modal-content {
    background: var(--gradient-dark);
    padding: 60px 50px;
    border-radius: 30px;
    text-align: center;
    max-width: 600px;
    width: 90%;
    position: relative;
    overflow: hidden;
}

.language-modal-title {
    font-size: 42px;
    margin-bottom: 10px;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
    text-transform: uppercase;
}

.language-modal-subtitle {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
    font-size: 1.2rem;
}

/* Language Options */
.language-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 40px 0;
}

.language-option-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.15);
    padding: 22px 30px;
    border-radius: 20px;
    color: var(--text-light);
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.4s ease;
}

.language-option-btn:hover {
    background: rgba(240, 228, 145, 0.15);
    border-color: var(--gold-light);
    transform: translateY(-8px);
}

.language-option-btn.selected {
    background: rgba(240, 228, 145, 0.25);
    border-color: var(--gold-light);
}

.language-flag {
    width: 35px;
    height: 25px;
    border-radius: 4px;
    object-fit: cover;
}

.language-confirm-btn {
    background: var(--gradient-gold);
    color: var(--text-dark);
    border: none;
    padding: 20px 50px;
    border-radius: 15px;
    font-size: 20px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(240, 228, 145, 0.5);
    width: 100%;
}

.language-confirm-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(240, 228, 145, 0.7);
}

.language-confirm-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Header - Fixed Layout */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.4s ease;
    backdrop-filter: blur(20px) saturate(180%);
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(240, 228, 145, 0.2);
    direction: ltr !important;
}

.header.scrolled {
    padding: 10px 20px;
    background: rgba(15, 23, 42, 0.98);
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 900;
    color: var(--gold-light);
    text-decoration: none;
    direction: ltr !important;
}

.logo-image {
    height: 40px;
    width: auto;
    margin-right: 10px;
}

/* Navigation */
.nav-center {
    display: flex;
    align-items: center;
    gap: 20px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    direction: ltr !important;
}

.nav-center a {
    text-decoration: none;
    color: var(--text-light);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    direction: ltr !important;
}

/* Language Selector */
.lang-selector {
    position: relative;
}

.lang-btn {
    background: transparent;
    color: var(--text-light);
    border: 2px solid rgba(240, 228, 145, 0.5);
    padding: 8px 15px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    min-width: 100px;
    justify-content: space-between;
}

.lang-btn:hover {
    background: rgba(240, 228, 145, 0.1);
    border-color: var(--gold-light);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    padding: 15px;
    margin-top: 10px;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    border: 1px solid rgba(240, 228, 145, 0.2);
    z-index: 1001;
}

.lang-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    padding: 12px 15px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang-option:hover {
    background: rgba(240, 228, 145, 0.1);
}

.lang-flag {
    width: 22px;
    height: 16px;
    border-radius: 3px;
}

/* Login Button */
.login-btn {
    padding: 8px 20px;
    background: var(--gradient-gold);
    color: var(--text-dark);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s ease;
    text-decoration: none;
    display: inline-block;
    text-transform: uppercase;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(240, 228, 145, 0.6);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 20px 60px;
}

.hero-content {
    max-width: 1200px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 25px;
    background: linear-gradient(to right, var(--gold-light), var(--gold-medium), var(--green-medium));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
    text-transform: uppercase;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: rgba(255, 255, 255, 0.9);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* CTA Container - إصلاح المشكلة الرئيسية */
.cta-container {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
    margin: 50px 0;
    position: relative;
    z-index: 10; /* زيادة z-index للتأكد من الظهور */
    visibility: visible !important;
    opacity: 1 !important;
}

.cta-button {
    padding: 18px 40px;
    font-size: 1rem;
    font-weight: 800;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10;
    min-width: 200px;
    justify-content: center;
    text-decoration: none;
}

.cta-primary {
    background: var(--gradient-gold);
    color: var(--text-dark);
    box-shadow: 0 12px 30px rgba(240, 228, 145, 0.4);
}

.cta-secondary {
    background: transparent;
    color: var(--gold-light);
    border: 2px solid var(--gold-light);
    box-shadow: 0 8px 25px rgba(240, 228, 145, 0.2);
}

.cta-button:hover {
    transform: translateY(-8px);
}

.cta-primary:hover {
    box-shadow: 0 20px 40px rgba(240, 228, 145, 0.6);
}

.cta-secondary:hover {
    background: rgba(240, 228, 145, 0.1);
    box-shadow: 0 15px 35px rgba(240, 228, 145, 0.3);
}

/* Bonus Badge */
.bonus-badge {
    padding: 12px 25px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}

.bonus-badge i {
    color: var(--gold-light);
    font-size: 18px;
}

.bonus-badge span {
    font-size: 14px;
    font-weight: 600;
}

/* Stats Section */
.stats-section {
    padding: 80px 20px;
}

.stats-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    max-width: 1400px;
    margin: 0 auto;
}

.stat-card {
    background: var(--gradient-dark);
    padding: 35px 25px;
    border-radius: 25px;
    text-align: center;
    min-width: 250px;
    flex: 1;
    max-width: 320px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
}

.stat-label {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    text-transform: uppercase;
}

/* Features Section */
.features-section {
    padding: 100px 20px;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 70px;
    background: linear-gradient(to right, var(--gold-light), var(--green-medium));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
    text-transform: uppercase;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 5px;
    background: var(--gradient-gold);
    border-radius: 5px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 35px;
    max-width: 1400px;
    margin: 0 auto;
}

.feature-card {
    background: var(--gradient-dark);
    padding: 45px 25px;
    border-radius: 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feature-icon {
    width: 90px;
    height: 90px;
    background: var(--gradient-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 40px;
    color: var(--text-dark);
}

.feature-title {
    font-size: 1.5rem;
    margin-bottom: 18px;
    color: var(--gold-light);
    font-weight: 700;
    text-transform: uppercase;
}

.feature-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
}

/* How It Works */
.how-it-works {
    padding: 100px 20px;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 35px;
    max-width: 1400px;
    margin: 0 auto;
}

.step-card {
    background: var(--gradient-dark);
    padding: 35px 20px;
    border-radius: 25px;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.step-number {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 55px;
    height: 55px;
    background: var(--gradient-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 900;
    color: var(--text-dark);
    box-shadow: 0 8px 20px rgba(240, 228, 145, 0.5);
    border: 5px solid var(--green-dark);
}

.step-card h3 {
    color: var(--gold-light);
    margin: 40px 0 20px;
    font-size: 1.3rem;
}

.step-card p {
    color: rgba(255, 255, 255, 0.8);
}

/* Testimonials */
.testimonials {
    padding: 100px 20px;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 35px;
    max-width: 1400px;
    margin: 0 auto;
}

.testimonial-card {
    background: var(--gradient-dark);
    padding: 35px 25px;
    border-radius: 25px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.testimonial-text {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    margin-bottom: 25px;
    flex-grow: 1;
    font-style: italic;
    position: relative;
    padding-left: 20px;
}

.testimonial-text::before {
    content: '"';
    position: absolute;
    left: 0;
    top: -10px;
    font-size: 60px;
    color: var(--gold-light);
    opacity: 0.3;
    font-family: serif;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: auto;
}

.author-avatar {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold-light);
}

.author-info h4 {
    color: var(--gold-light);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.author-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Payment Methods */
.payment-section {
    padding: 80px 20px;
}

.payment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 50px auto 0;
}

.payment-card {
    background: var(--gradient-dark);
    padding: 25px 15px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.payment-icon {
    font-size: 45px;
    color: var(--gold-light);
    margin-bottom: 12px;
}

.payment-card p {
    color: var(--gold-light);
    font-weight: 600;
}

/* Footer */
.footer {
    background: var(--gradient-dark);
    padding: 60px 20px 30px;
    margin-top: 80px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 35px;
    margin-bottom: 45px;
}

.footer h3 {
    color: var(--gold-light);
    margin-bottom: 20px;
    font-size: 1.4rem;
}

.footer p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    padding-left: 20px;
    position: relative;
}

.footer-links a::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--gold-light);
}

.footer-links a:hover {
    color: var(--gold-light);
    transform: translateX(10px);
}

.social-icons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.social-icon {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold-light);
    font-size: 18px;
    transition: all 0.4s ease;
    text-decoration: none;
}

.social-icon:hover {
    background: var(--gradient-gold);
    color: var(--text-dark);
    transform: translateY(-8px);
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.8);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-secondary);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 992px) {
    .nav-center {
        display: none;
    }
    
    .hero-title {
        font-size: 2.6rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .cta-container {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        margin: 40px 0;
    }
    
    .cta-button {
        width: 100%;
        max-width: 280px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .features-grid,
    .steps-container,
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .payment-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .logo-image {
        height: 30px;
    }
    
    .logo {
        font-size: 18px;
    }
    
    .lang-btn {
        min-width: 80px;
        font-size: 12px;
    }
    
    .login-btn {
        font-size: 12px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
    }
    
    .cta-button {
        padding: 12px 20px;
        font-size: 0.85rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .language-modal-content {
        padding: 40px 20px;
        margin: 15px;
    }
    
    .language-modal-title {
        font-size: 1.8rem;
    }
    
    .language-option-btn {
        padding: 16px 15px;
        font-size: 16px;
    }
    
    .payment-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}