
:root {
    --pe-primary: #6c5ce7;
    --pe-primary-dark: #5a4bd1;
    --pe-primary-light: #a29bfe;
    --pe-accent: #00cec9;
    --pe-bg: #0a0a0f;
    --pe-surface: #12121a;
    --pe-surface-light: #1a1a25;
    --pe-border: rgba(255, 255, 255, 0.06);
    --pe-border-active: rgba(108, 92, 231, 0.4);
    --pe-text: #ffffff;
    --pe-text-secondary: rgba(255, 255, 255, 0.7);
    --pe-text-muted: rgba(255, 255, 255, 0.4);
    --pe-success: #00b894;
    --pe-error: #ff7675;
    --pe-warning: #fdcb6e;
    --pe-radius: 16px;
    --pe-radius-sm: 10px;
    --pe-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --pe-shadow-primary: 0 8px 32px rgba(108, 92, 231, 0.3);
    --pe-transition: cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

.pe-body {
    font-family: 'Vazir', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--pe-bg);
    color: var(--pe-text);
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    direction: rtl;
    -webkit-font-smoothing: antialiased;
}

.pe-loader {
    position: fixed;
    inset: 0;
    background: var(--pe-bg);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.pe-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.pe-loader-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255, 255, 255, 0.08);
    border-top-color: var(--pe-primary);
    border-radius: 50%;
    animation: pe-spin 0.7s linear infinite;
}

@keyframes pe-spin { to { transform: rotate(360deg); } }

.pe-app {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    position: relative;
    background: rgba(18, 18, 26, 0.8);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--pe-border);
    overflow: hidden;
}

@media (min-width: 640px) {
    .pe-app {
        height: 750px;
        max-height: 92vh;
        border-radius: 24px;
        box-shadow: var(--pe-shadow), 0 0 80px rgba(108, 92, 231, 0.05);
    }
    
    .pe-body {
        background: radial-gradient(ellipse at 30% 20%, #1a1a35 0%, #0a0a0f 60%);
    }
}

.pe-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.pe-particle {
    position: absolute;
    background: var(--pe-primary);
    border-radius: 50%;
    opacity: 0.08;
    animation: pe-float 8s ease-in-out infinite;
}

@keyframes pe-float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.2); }
}

.pe-header {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    border-bottom: 1px solid var(--pe-border);
    background: rgba(10, 10, 15, 0.5);
    backdrop-filter: blur(20px);
}

.pe-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pe-logo-text {
    font-size: 18px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--pe-primary), var(--pe-primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pe-steps {
    display: flex;
    align-items: center;
    gap: 0;
}

.pe-step {
    display: flex;
    align-items: center;
}

.pe-step-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--pe-text-muted);
    transition: all 0.4s var(--pe-transition);
    position: relative;
    z-index: 1;
}

.pe-step.active .pe-step-dot,
.pe-step.done .pe-step-dot {
    background: var(--pe-primary);
    border-color: var(--pe-primary);
    color: white;
    box-shadow: 0 0 16px rgba(108, 92, 231, 0.4);
}

.pe-step.done .pe-step-dot {
    background: var(--pe-success);
    border-color: var(--pe-success);
    box-shadow: 0 0 16px rgba(0, 184, 148, 0.4);
}

.pe-step-line {
    width: 20px;
    height: 2px;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.4s var(--pe-transition);
}

.pe-step.done .pe-step-line {
    background: var(--pe-primary);
}

.pe-content {
    flex: 1;
    position: relative;
    overflow: hidden;
    z-index: 5;
}

.pe-slide {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.45s var(--pe-transition);
    pointer-events: none;
    padding: 8px 0;
}

.pe-slide.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

.pe-slide.prev {
    opacity: 0;
    transform: translateX(-30px);
}

.pe-slide-inner {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 20px;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.pe-slide-inner::-webkit-scrollbar { width: 3px; }
.pe-slide-inner::-webkit-scrollbar-track { background: transparent; }
.pe-slide-inner::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 3px; }

.pe-question-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--pe-primary-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.pe-question-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 4px;
    line-height: 1.3;
}

.pe-question-desc {
    font-size: 13px;
    color: var(--pe-text-secondary);
    margin-bottom: 20px;
    line-height: 1.5;
}

.pe-services {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pe-service-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--pe-surface-light);
    border: 2px solid var(--pe-border);
    border-radius: var(--pe-radius-sm);
    cursor: pointer;
    transition: all 0.3s var(--pe-transition);
    position: relative;
    overflow: hidden;
}

.pe-service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pe-service-card:hover {
    border-color: var(--pe-border-active);
    transform: translateX(-4px);
}

.pe-service-card:hover::before {
    opacity: 1;
}

.pe-service-card.selected {
    border-color: var(--pe-primary);
    background: rgba(108, 92, 231, 0.08);
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.15);
}

.pe-service-icon {
    font-size: 32px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pe-service-info {
    flex: 1;
    min-width: 0;
}

.pe-service-name {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
}

.pe-service-desc {
    font-size: 11px;
    color: var(--pe-text-secondary);
}

.pe-service-check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--pe-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transform: scale(0.6);
    transition: all 0.3s var(--pe-transition);
    flex-shrink: 0;
}

.pe-service-card.selected .pe-service-check {
    opacity: 1;
    transform: scale(1);
}


.pe-form-group {
    margin-bottom: 20px;
}

.pe-form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--pe-text);
    margin-bottom: 10px;
}

.pe-form-label small {
    color: var(--pe-text-muted);
    font-weight: 400;
    font-size: 11px;
}

.pe-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pe-chip {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: var(--pe-surface-light);
    border: 1px solid var(--pe-border);
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: var(--pe-text-secondary);
    transition: all 0.25s ease;
    white-space: nowrap;
    user-select: none;
}

.pe-chip:hover {
    border-color: var(--pe-border-active);
    background: rgba(108, 92, 231, 0.05);
}

.pe-chip:has(input:checked) {
    border-color: var(--pe-primary);
    background: rgba(108, 92, 231, 0.15);
    color: white;
    font-weight: 600;
}

.pe-textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--pe-surface-light);
    border: 1px solid var(--pe-border);
    border-radius: var(--pe-radius-sm);
    color: var(--pe-text);
    font-family: 'Vazir', sans-serif;
    font-size: 13px;
    resize: none;
    transition: border-color 0.3s ease;
}

.pe-textarea:focus {
    outline: none;
    border-color: var(--pe-primary);
}

.pe-textarea::placeholder {
    color: var(--pe-text-muted);
}

.pe-contact-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pe-input-wrapper {
    position: relative;
}

.pe-input-icon {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    font-size: 16px;
    z-index: 2;
    pointer-events: none;
}

.pe-input {
    width: 100%;
    padding: 14px 44px 14px 14px;
    background: var(--pe-surface-light);
    border: 1px solid var(--pe-border);
    border-radius: var(--pe-radius-sm);
    color: var(--pe-text);
    font-family: 'Vazir', sans-serif;
    font-size: 13px;
    transition: all 0.3s ease;
}

.pe-input:focus {
    outline: none;
    border-color: var(--pe-primary);
    background: rgba(108, 92, 231, 0.05);
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.08);
}

.pe-input::placeholder {
    color: var(--pe-text-muted);
}

.pe-input.error {
    border-color: var(--pe-error);
    animation: pe-shake 0.4s ease;
}

@keyframes pe-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.pe-input-error {
    font-size: 10px;
    color: var(--pe-error);
    margin-top: 4px;
    display: none;
}

.pe-input.error + .pe-input-error {
    display: block;
}

.pe-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--pe-text-secondary);
    cursor: pointer;
    padding: 4px 0;
}

.pe-checkbox-box {
    width: 20px;
    height: 20px;
    border: 2px solid var(--pe-border);
    border-radius: 6px;
    flex-shrink: 0;
    position: relative;
    transition: all 0.3s ease;
}

.pe-checkbox input:checked + .pe-checkbox-box {
    background: var(--pe-primary);
    border-color: var(--pe-primary);
}

.pe-checkbox input:checked + .pe-checkbox-box::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.pe-captcha {
    background: var(--pe-surface-light);
    border: 1px solid var(--pe-border);
    border-radius: var(--pe-radius-sm);
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pe-captcha-question {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    color: var(--pe-primary-light);
}

.pe-captcha-input {
    width: 80px;
    text-align: center;
    padding: 10px;
}

.pe-price-badge {
    padding: 0 20px 8px;
    flex-shrink: 0;
    z-index: 5;
}

.pe-price-badge-inner {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(0, 206, 201, 0.05));
    border: 1px solid rgba(108, 92, 231, 0.15);
    border-radius: 12px;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pe-price-badge-label {
    font-size: 11px;
    color: var(--pe-text-muted);
}

.pe-price-badge-value {
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--pe-primary-light), var(--pe-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pe-footer {
    padding: 12px 20px 20px;
    display: flex;
    gap: 10px;
    flex-shrink: 0;
    z-index: 10;
    border-top: 1px solid var(--pe-border);
    background: rgba(10, 10, 15, 0.5);
    backdrop-filter: blur(20px);
}

.pe-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-family: 'Vazir', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--pe-transition);
}

.pe-nav-prev {
    background: rgba(255, 255, 255, 0.04);
    color: var(--pe-text-secondary);
    border: 1px solid var(--pe-border);
    flex: 0.3;
    min-width: 50px;
}

.pe-nav-prev:hover {
    background: rgba(255, 255, 255, 0.08);
}

.pe-nav-next {
    background: var(--pe-primary);
    color: white;
    flex: 1;
}

.pe-nav-next:hover {
    background: var(--pe-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--pe-shadow-primary);
}

.pe-nav-next:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.pe-nav-submit {
    background: linear-gradient(135deg, var(--pe-primary), var(--pe-accent));
    color: white;
    flex: 1;
    display: none;
}

.pe-nav-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(108, 92, 231, 0.4);
}

.pe-success {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    gap: 16px;
}

.pe-success-animation {
    margin-bottom: 8px;
}

.pe-success-check circle {
    animation: pe-drawCircle 0.6s ease forwards 0.2s;
}

.pe-success-check polyline {
    animation: pe-drawCheck 0.4s ease forwards 0.8s;
}

@keyframes pe-drawCircle {
    to { stroke-dashoffset: 0; }
}

@keyframes pe-drawCheck {
    to { stroke-dashoffset: 0; }
}

.pe-success-title {
    font-size: 22px;
    font-weight: 800;
}

.pe-success-text {
    font-size: 14px;
    color: var(--pe-text-secondary);
}

.pe-price-result {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.1), rgba(0, 206, 201, 0.05));
    border: 1px solid rgba(108, 92, 231, 0.2);
    border-radius: 16px;
    padding: 20px 24px;
    width: 100%;
    margin: 8px 0;
}

.pe-price-result-label {
    font-size: 12px;
    color: var(--pe-text-muted);
    margin-bottom: 8px;
}

.pe-price-result-value {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--pe-primary-light), var(--pe-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pe-success-actions {
    display: flex;
    gap: 10px;
    width: 100%;
}

.pe-btn {
    flex: 1;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Vazir', sans-serif;
    border: none;
}

.pe-btn-outline {
    background: transparent;
    border: 1px solid var(--pe-border);
    color: var(--pe-text-secondary);
}

.pe-btn-outline:hover {
    border-color: var(--pe-primary);
    color: white;
}

.pe-btn-primary {
    background: var(--pe-primary);
    color: white;
}

.pe-btn-primary:hover {
    background: var(--pe-primary-dark);
}