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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem 0;
    text-align: start;
    color: white;
}

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

header .btn {
    background-color: #667eea;
    color: #000;
}

header .btn {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

header .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

header .btn i {
    font-size: 1rem;
}

.header-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

header .btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

header .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Main Content */
main {
    padding: 3rem 0;
}

/* Upload Section */
.upload-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 10px;
    padding: 3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    margin-bottom: 2rem;
}

.upload-area:hover {
    border-color: #764ba2;
    background: rgba(102, 126, 234, 0.05);
}

.upload-area i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.upload-area h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.upload-area p {
    color: #666;
}

#fileInput {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Format Selection */
.format-selection {
    margin-bottom: 2rem;
}

.format-selection h3 {
    margin-bottom: 1rem;
    color: #333;
}

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

.format-btn {
    padding: 1rem;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.format-btn:hover,
.format-btn.active {
    background: #667eea;
    color: white;
}

/* Progress Section */
.progress-section {
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #f0f0f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    width: 0%;
    transition: width 0.3s ease;
}

#progressText {
    text-align: center;
    color: #666;
}

/* Convert Button */
.convert-btn {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.convert-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.convert-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Features Section */
.features {
    margin-bottom: 3rem;
}

.features h2 {
    text-align: center;
    color: white;
    margin-bottom: 2rem;
    font-size: 2rem;
}

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

.feature {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
}

.feature i {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.feature h3 {
    margin-bottom: 1rem;
    color: #333;
}

.feature p {
    color: #666;
}

/* Pricing Section */
.pricing {
    margin-bottom: 3rem;
}

.pricing h2 {
    text-align: center;
    color: white;
    margin-bottom: 2rem;
    font-size: 2rem;
}

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

.pricing-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    position: relative;
}

.pricing-card:hover {
    transform: translateY(-10px);
}

.pricing-card.featured {
    border: 3px solid #667eea;
    transform: scale(1.05);
}

.pricing-card.featured::before {
    content: "الأكثر شعبية";
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: #667eea;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.pricing-card h3 {
    margin-bottom: 1rem;
    color: #333;
    font-size: 1.5rem;
}

.price {
    font-size: 3rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 1rem;
}

.pricing-card ul {
    list-style: none;
    margin-bottom: 2rem;
}

.pricing-card li {
    padding: 0.5rem 0;
    color: #666;
    border-bottom: 1px solid #f0f0f0;
}

.pricing-card li:last-child {
    border-bottom: none;
}

.buy-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2rem 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.contact-info h3,
.footer-links h3 {
    margin-bottom: 1rem;
    color: #667eea;
}

.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #25D366;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
}

.whatsapp-btn:hover {
    background: #128C7E;
    transform: translateY(-2px);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #667eea;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #444;
    color: #ccc;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    color: #aaa;
    float: left;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    left: 15px;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

/* Payment Modal Styles */
.modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.modal-header h2 {
    color: #333;
    margin: 0;
    font-size: 1.5rem;
}

.payment-info {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.payment-info h3 {
    color: #667eea;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.payment-info p {
    color: #666;
    margin-bottom: 1rem;
}

.price-display {
    font-size: 2rem;
    font-weight: bold;
    color: #28a745;
}

.payment-methods h4 {
    color: #333;
    margin-bottom: 1rem;
    text-align: center;
}

#paypal-button-container {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

/* Privacy and Terms Pages */
.privacy-content,
.terms-content {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.privacy-section,
.terms-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.privacy-section:last-child,
.terms-section:last-child {
    border-bottom: none;
}

.privacy-section h2,
.terms-section h2 {
    color: #667eea;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.privacy-section h3,
.terms-section h3 {
    color: #333;
    margin: 1rem 0 0.5rem 0;
    font-size: 1.2rem;
}

.privacy-section p,
.terms-section p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.privacy-section ul,
.terms-section ul {
    color: #666;
    line-height: 1.8;
    margin: 1rem 0;
    padding-right: 1.5rem;
}

.privacy-section li,
.terms-section li {
    margin-bottom: 0.5rem;
}

.last-updated {
    font-style: italic;
    color: #999;
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 2px solid #f0f0f0;
}

/* Support Page Styles */
.support-content {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.support-intro {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
}

.support-intro h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.support-intro p {
    font-size: 1.2rem;
    opacity: 0.9;
}

.support-methods h3,
.faq-section h3,
.support-hours h3,
.support-tips h3 {
    color: #667eea;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    text-align: center;
}

.contact-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact-method {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    border: 2px solid #f0f0f0;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.contact-method:hover {
    border-color: #667eea;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.1);
}

.method-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.method-content h4 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.method-content p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.contact-btn.whatsapp {
    background: #25D366;
    color: white;
}

.contact-btn.email {
    background: #667eea;
    color: white;
}

.contact-btn.phone {
    background: #764ba2;
    color: white;
}

.contact-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.faq-list {
    margin-bottom: 3rem;
}

.faq-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-question {
    padding: 1.5rem;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: #e9ecef;
}

.faq-question h4 {
    color: #333;
    margin: 0;
    font-size: 1.1rem;
}

.faq-question i {
    color: #667eea;
    transition: transform 0.3s ease;
}

.faq-answer {
    padding: 0 1.5rem;
    display: none;
    background: white;
}

.faq-answer p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.faq-answer ul {
    color: #666;
    padding-right: 1.5rem;
    margin-bottom: 1rem;
}

.faq-answer li {
    margin-bottom: 0.5rem;
}

.hours-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.hour-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.hour-item i {
    color: #667eea;
    font-size: 1.5rem;
}

.hour-item h4 {
    color: #333;
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.hour-item p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.tip-item {
    text-align: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.tip-item:hover {
    transform: translateY(-5px);
}

.tip-item i {
    color: #667eea;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.tip-item h4 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.tip-item p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* RTL/LTR Support */
[dir="rtl"] .close {
    left: auto;
    right: 15px;
}

[dir="rtl"] .privacy-section ul,
[dir="rtl"] .terms-section ul {
    padding-right: 1.5rem;
    padding-left: 0;
}

[dir="ltr"] .privacy-section ul,
[dir="ltr"] .terms-section ul {
    padding-left: 1.5rem;
    padding-right: 0;
}

[dir="rtl"] .footer-links ul {
    text-align: right;
}

[dir="ltr"] .footer-links ul {
    text-align: left;
}

[dir="rtl"] .modal-content {
    text-align: right;
}

[dir="ltr"] .modal-content {
    text-align: left;
}

[dir="rtl"] .success-message {
    text-align: right;
}

[dir="ltr"] .success-message {
    text-align: left;
}

/* Language-specific adjustments */
[lang="ar"] {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

[lang="en"] {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .upload-area {
        padding: 2rem 1rem;
    }

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

    .pricing-card.featured {
        transform: none;
    }

    [dir="rtl"] .privacy-section ul,
    [dir="rtl"] .terms-section ul {
        padding-right: 1rem;
    }

    [dir="ltr"] .privacy-section ul,
    [dir="ltr"] .terms-section ul {
        padding-left: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .upload-section {
        padding: 1rem;
    }

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