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

body {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    direction: rtl;
    color: #2d3748;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-wrapper {
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    width: 100%;
    max-width: 800px;
    position: relative;
}

/* Header Styles */
.form-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 40px 30px;
    text-align: center;
}

.form-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.form-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Progress Bar Styles */
.progress-container {
    padding: 30px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.progress-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    margin-bottom: 20px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
    border-radius: 3px;
    transition: width 0.5s ease;
    width: 33.33%;
}

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

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #e2e8f0;
    z-index: 1;
}

.step.active:not(:last-child)::after {
    background: linear-gradient(90deg, #4f46e5, #7c3aed);
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 8px;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: white;
    transform: scale(1.1);
}

.step.completed .step-number {
    background: #10b981;
    color: white;
}

.step-label {
    font-size: 0.9rem;
    color: #64748b;
    text-align: center;
    font-weight: 500;
}

.step.active .step-label {
    color: #4f46e5;
    font-weight: 600;
}

/* Form Container */
.form-container {
    padding: 40px 30px;
}

.form-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.form-step.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-header {
    text-align: center;
    margin-bottom: 40px;
}

.step-header i {
    font-size: 3rem;
    color: #4f46e5;
    margin-bottom: 15px;
}

.step-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1e293b;
}

.step-header p {
    color: #64748b;
    font-size: 1.1rem;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 40px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
}

.required {
    color: #ef4444;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: #fafafa;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4f46e5;
    background: white;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #ef4444;
    background: #fef2f2;
}

.form-group input.success,
.form-group select.success,
.form-group textarea.success {
    border-color: #10b981;
    background: #f0fdf4;
}

/* Input Group */
.input-group {
    display: flex;
    align-items: center;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #fafafa;
    transition: all 0.3s ease;
}

.input-group:focus-within {
    border-color: #4f46e5;
    background: white;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.input-group input {
    border: none;
    background: transparent;
    flex: 1;
}

.input-group input:focus {
    box-shadow: none;
}

.input-suffix {
    padding: 15px;
    background: #f1f5f9;
    color: #64748b;
    font-weight: 500;
    border-radius: 0 10px 10px 0;
}

/* Password Input */
.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #4f46e5;
}

.password-strength {
    margin-top: 8px;
    font-size: 0.85rem;
    font-weight: 500;
}

.password-strength.weak {
    color: #ef4444;
}

.password-strength.medium {
    color: #f59e0b;
}

.password-strength.strong {
    color: #10b981;
}

/* Help Text */
.help-text {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 5px;
}

/* Error Messages */
.error-message {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 5px;
    font-weight: 500;
    display: none;
}

.error-message.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pricing Section */
.pricing-section {
    margin: 40px 0;
}

.pricing-section h3 {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: #1e293b;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.pricing-card {
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    background: white;
}

.pricing-card:hover {
    border-color: #4f46e5;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.15);
}

.pricing-card.selected {
    border-color: #4f46e5;
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    transform: scale(1.05);
}

.pricing-card.popular::before {
    content: 'الأكثر شعبية';
    position: absolute;
    top: -10px;
    right: 20px;
    background: #10b981;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.plan-name {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.plan-price {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 5px;
}

.plan-period {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 20px;
}

.plan-features {
    list-style: none;
    margin-bottom: 25px;
}

.plan-features li {
    padding: 8px 0;
    font-size: 0.95rem;
}

.plan-features li i {
    color: #10b981;
    margin-left: 8px;
}

.pricing-card.selected .plan-features li i {
    color: #a7f3d0;
}

/* Terms Section */
.terms-section {
    margin: 30px 0;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.5;
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 4px;
    margin-left: 12px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 2px;
}

.checkbox-container input:checked + .checkmark {
    background: #4f46e5;
    border-color: #4f46e5;
}

.checkbox-container input:checked + .checkmark::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 6px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.terms-section a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 600;
}

.terms-section a:hover {
    text-decoration: underline;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    gap: 15px;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.3);
}

.btn-secondary {
    background: #f1f5f9;
    color: #64748b;
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: #475569;
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    background: white;
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.loading-spinner i {
    font-size: 3rem;
    color: #4f46e5;
    margin-bottom: 20px;
}

.loading-spinner p {
    font-size: 1.1rem;
    font-weight: 600;
    color: #374151;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    padding: 30px 30px 20px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header i {
    font-size: 4rem;
    color: #10b981;
    margin-bottom: 15px;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
}

.modal-body {
    padding: 30px;
}

.modal-body p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #374151;
}

.account-details {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
}

.account-details p {
    margin-bottom: 10px;
    font-size: 1rem;
}

.account-details strong {
    color: #1e293b;
}

.modal-footer {
    padding: 20px 30px 30px;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .form-header {
        padding: 30px 20px;
    }
    
    .form-header h1 {
        font-size: 2rem;
    }
    
    .progress-container {
        padding: 20px;
    }
    
    .form-container {
        padding: 30px 20px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .step-header h2 {
        font-size: 1.5rem;
    }
    
    .step-header i {
        font-size: 2.5rem;
    }
    
    .progress-steps {
        flex-direction: column;
        gap: 20px;
    }
    
    .step:not(:last-child)::after {
        display: none;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .modal-content {
        margin: 20px;
        width: calc(100% - 40px);
    }
}

@media (max-width: 480px) {
    .form-header h1 {
        font-size: 1.8rem;
    }
    
    .form-header p {
        font-size: 1rem;
    }
    
    .step-label {
        font-size: 0.8rem;
    }
    
    .step-number {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
}


/* Payment Method Styles */
.payment-method-section {
    margin: 40px 0;
}

.payment-method-section h3 {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    color: #1e293b;
}

.payment-methods {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
}

.payment-method {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.payment-method:hover {
    border-color: #4f46e5;
    background: #f8fafc;
}

.payment-method.selected {
    border-color: #4f46e5;
    background: #f0f4ff;
}

.payment-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 10px;
    margin-left: 15px;
}

.payment-icon i {
    font-size: 1.5rem;
    color: #4f46e5;
}

.payment-info {
    flex: 1;
}

.payment-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: #1e293b;
}

.payment-info p {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}

.payment-radio {
    position: relative;
}

.payment-radio input {
    display: none;
}

.payment-radio label {
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    display: block;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-radio input:checked + label {
    border-color: #4f46e5;
    background: #4f46e5;
}

.payment-radio input:checked + label::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

/* Payment Forms */
.payment-form {
    margin-top: 30px;
    padding: 25px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.payment-form.hidden {
    display: none;
}

/* Credit Card Form */
.card-icons {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 5px;
}

.card-icons i {
    font-size: 1.2rem;
    color: #cbd5e1;
    transition: color 0.3s ease;
}

.card-icons i.active {
    color: #4f46e5;
}

#cardNumber {
    padding-left: 80px;
}

/* PayPal Form */
.paypal-info {
    text-align: center;
    padding: 20px;
}

.paypal-info p {
    margin-bottom: 20px;
    color: #64748b;
}

.btn-paypal {
    background: #0070ba;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
}

.btn-paypal:hover {
    background: #005ea6;
}

/* Bank Transfer Form */
.bank-info {
    text-align: center;
}

.bank-info h4 {
    margin-bottom: 20px;
    color: #1e293b;
    font-weight: 600;
}

.bank-details {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: right;
}

.bank-details p {
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.bank-details strong {
    color: #1e293b;
    font-weight: 600;
}

/* Order Summary */
.order-summary {
    margin: 40px 0;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 25px;
}

.order-summary h3 {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 25px;
    color: #1e293b;
}

.summary-content {
    margin-bottom: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    font-size: 0.95rem;
}

.summary-item.total {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
}

.item-name {
    color: #64748b;
}

.item-value {
    font-weight: 600;
    color: #1e293b;
}

.summary-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 15px 0;
}

.currency-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.currency-selector label {
    font-weight: 600;
    color: #374151;
}

.currency-selector select {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: white;
    font-size: 0.9rem;
}

/* Password Strength Indicator */
.strength-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    margin: 8px 0 5px;
    overflow: hidden;
}

.strength-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease;
}

.strength-text {
    font-size: 0.85rem;
    font-weight: 500;
}

.strength-tips {
    display: block;
    font-size: 0.8rem;
    opacity: 0.8;
    margin-top: 2px;
}

/* Responsive Payment Styles */
@media (max-width: 768px) {
    .payment-method {
        padding: 15px;
    }
    
    .payment-icon {
        width: 40px;
        height: 40px;
        margin-left: 10px;
    }
    
    .payment-icon i {
        font-size: 1.2rem;
    }
    
    .payment-info h4 {
        font-size: 1rem;
    }
    
    .payment-info p {
        font-size: 0.85rem;
    }
    
    .payment-form {
        padding: 20px;
    }
    
    .order-summary {
        padding: 20px;
    }
    
    .card-icons {
        position: static;
        transform: none;
        margin-top: 10px;
        justify-content: center;
    }
    
    #cardNumber {
        padding-left: 15px;
    }
}

