/* Modern Professional Design - PayPal Inspired */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
    direction: rtl;
    line-height: 1.6;
    color: #2c2e2f;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: #ffffff;
    border-bottom: 1px solid #e1e8ed;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0070ba;
}

.logo-text h1 {
    font-size: 24px;
    font-weight: 600;
    color: #2c2e2f;
    margin-bottom: 2px;
}

.tagline {
    font-size: 13px;
    color: #687173;
    font-weight: 400;
}

.header-nav {
    display: flex;
    gap: 16px;
}

.nav-link {
    color: #0070ba;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 24px;
    transition: background-color 0.2s ease;
}

.nav-link:hover {
    background: #f5f7fa;
}

/* Main Content */
.main-content {
    background: #ffffff;
    border-radius: 8px;
    padding: 48px;
    margin: 32px auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    max-width: 800px;
}

.form-container h2 {
    color: #2c2e2f;
    font-size: 32px;
    font-weight: 500;
    margin-bottom: 8px;
    text-align: center;
}

.description {
    text-align: center;
    color: #687173;
    margin-bottom: 40px;
    font-size: 15px;
}

/* Form Sections */
.form-section {
    margin-bottom: 32px;
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
}

.form-section h3 {
    color: #2c2e2f;
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e1e8ed;
}

/* Form Groups */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c2e2f;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd2d6;
    border-radius: 4px;
    font-size: 15px;
    transition: all 0.2s ease;
    font-family: inherit;
    background: #ffffff;
    color: #2c2e2f;
}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #9da3a6;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0070ba;
    box-shadow: 0 0 0 2px rgba(0, 112, 186, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Checkbox Group */
.checkbox-group {
    margin: 24px 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    color: #2c2e2f;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin-top: 2px;
    accent-color: #0070ba;
}

.checkbox-label a {
    color: #0070ba;
    text-decoration: none;
    font-weight: 500;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Calculator Section */
.calculator-section {
    background: linear-gradient(135deg, #0070ba 0%, #003087 100%);
    padding: 32px;
    border-radius: 8px;
    margin-bottom: 32px;
    color: white;
}

.calculator-section h3 {
    color: white;
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 16px;
    text-align: center;
    border: none;
    padding: 0;
}

.calculator-result {
    text-align: center;
    font-size: 16px;
}

.calculator-result p {
    margin: 12px 0;
}

.calculator-result span {
    font-size: 28px;
    font-weight: 600;
    display: inline-block;
    margin: 0 5px;
}

.calculator-note {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 12px;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid #e1e8ed;
}

.btn {
    padding: 14px 32px;
    border: none;
    border-radius: 24px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn-primary {
    background: #0070ba;
    color: white;
    min-width: 200px;
}

.btn-primary:hover {
    background: #003087;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 112, 186, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #ffffff;
    color: #2c2e2f;
    border: 1px solid #cbd2d6;
}

.btn-secondary:hover {
    background: #f5f7fa;
    border-color: #9da3a6;
}

/* Success Message */
.success-message {
    background: #ffffff;
    border-radius: 8px;
    padding: 48px;
    margin-top: 32px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.success-icon {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.success-content h3 {
    color: #2c2e2f;
    font-size: 28px;
    font-weight: 500;
    margin-bottom: 16px;
}

.success-content p {
    color: #687173;
    font-size: 16px;
    margin: 12px 0 24px;
    line-height: 1.6;
}

.app-number-box {
    background: #f5f7fa;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 24px;
    margin: 24px auto;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.app-number-label {
    color: #687173;
    font-size: 14px;
    font-weight: 500;
}

.app-number {
    color: #0070ba;
    font-size: 24px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

/* 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);
    overflow: auto;
}

.modal-content {
    background-color: white;
    margin: 40px auto;
    padding: 48px;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    color: #687173;
    float: left;
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s ease;
}

.close:hover {
    color: #2c2e2f;
}

.modal-content h2 {
    color: #2c2e2f;
    font-size: 28px;
    font-weight: 500;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e1e8ed;
}

.terms-content {
    max-height: 400px;
    overflow-y: auto;
    padding-left: 16px;
}

.terms-content h3 {
    color: #2c2e2f;
    font-size: 18px;
    font-weight: 500;
    margin-top: 24px;
    margin-bottom: 12px;
}

.terms-content p {
    color: #687173;
    margin: 8px 0;
    padding-right: 16px;
    line-height: 1.6;
}

/* Footer */
.footer {
    background: #2c2e2f;
    color: #ffffff;
    padding: 48px 0 24px;
    margin-top: 48px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 32px;
}

.footer-section h4 {
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 16px;
}

.footer-section p {
    color: #cbd2d6;
    margin: 8px 0;
    line-height: 1.6;
    font-size: 14px;
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #4a4a4a;
    color: #cbd2d6;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        background: #ffffff;
    }

    .container {
        padding: 0 16px;
    }

    .header .container {
        flex-direction: column;
        gap: 16px;
    }

    .logo {
        width: 100%;
        justify-content: center;
    }

    .header-nav {
        width: 100%;
        justify-content: center;
    }

    .main-content {
        padding: 24px;
        margin: 16px auto;
        border-radius: 0;
        box-shadow: none;
    }

    .form-container h2 {
        font-size: 24px;
    }

    .form-section h3 {
        font-size: 18px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-actions {
        flex-direction: column;
        padding-top: 24px;
    }

    .btn {
        width: 100%;
        min-width: auto;
    }

    .footer {
        padding: 32px 0 16px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .modal-content {
        width: 95%;
        padding: 24px;
        margin: 20px auto;
    }

    .calculator-result span {
        display: block;
        margin: 12px 0;
    }

    .success-message {
        padding: 24px;
    }

    .success-content h3 {
        font-size: 22px;
    }

    .app-number {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .logo-text h1 {
        font-size: 20px;
    }

    .tagline {
        font-size: 12px;
    }

    .form-container h2 {
        font-size: 22px;
    }

    .form-section h3 {
        font-size: 16px;
    }

    .calculator-section {
        padding: 24px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s ease-in-out infinite;
    vertical-align: middle;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Input States */
input:invalid,
select:invalid,
textarea:invalid {
    border-color: #cbd2d6;
}

input:invalid:focus,
select:invalid:focus,
textarea:invalid:focus {
    border-color: #0070ba;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #d20000;
}

.error-message {
    color: #d20000;
    font-size: 13px;
    margin-top: 6px;
    display: none;
}

.form-group.error .error-message {
    display: block;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f5f7fa;
}

::-webkit-scrollbar-thumb {
    background: #cbd2d6;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #9da3a6;
}

/* Print Styles */
@media print {
    .header-nav,
    .btn-secondary,
    .footer {
        display: none;
    }

    body {
        background: white;
    }

    .main-content {
        box-shadow: none;
    }
}