:root {
    --primary: #6658f4;
    --primary-dark: #4c3bd1;
    --accent: #2ebfa5;
    --surface: #ffffff;
    --text: #1f1f2c;
    --muted: #5d5d6d;
    --stroke: #e4e6f0;
    --bg: #f8f8fb;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Vazirmatn', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: clamp(1rem, 4vw, 2.5rem);
}

.page-shell {
    width: min(100%, 920px);
    display: flex;
    flex-direction: column;
    gap: clamp(1.25rem, 3vw, 2rem);
}

img,
svg {
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

.background-ornament {
    position: fixed;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at top right, rgba(127, 87, 255, 0.15), transparent 40%),
                radial-gradient(circle at bottom left, rgba(77, 208, 181, 0.2), transparent 35%);
}

.hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    flex-wrap: wrap;
    background: var(--surface);
    border: 1px solid var(--stroke);
    border-radius: 18px;
    padding: clamp(1.5rem, 4vw, 2.25rem);
    width: 100%;
}

.hero h1 {
    margin-top: 0;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--primary-dark);
}

.hero p {
    margin-bottom: 0;
    color: var(--muted);
    max-width: 50ch;
}

.hero__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.badge {
    background: var(--surface);
    border-radius: 999px;
    padding: 0.5rem 1rem;
    border: 1px solid var(--stroke);
    font-size: 0.9rem;
}

.hero__stats {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.hero__stats strong {
    display: block;
    font-size: 1.3rem;
    color: var(--text);
}

.wizard-card {
    background: var(--surface);
    border-radius: 24px;
    border: 1px solid var(--stroke);
    box-shadow: 0 18px 50px rgba(21, 24, 48, 0.06);
    overflow: hidden;
    width: 100%;
}

.wizard-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    border-bottom: 1px solid var(--stroke);
}

.wizard-step {
    background: none;
    border: none;
    padding: 1.1rem 1.3rem;
    font-weight: 600;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease, background 0.3s ease;
}

.wizard-step::after {
    content: "";
    position: absolute;
    inset-inline: 1.5rem;
    bottom: 0.75rem;
    height: 2px;
    background: transparent;
    transition: background 0.3s ease;
}

.wizard-step.is-active {
    color: var(--text);
    background: rgba(102, 88, 244, 0.06);
}

.wizard-step.is-active::after {
    background: var(--primary);
}

.wizard-step:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.step-icon {
    inline-size: 34px;
    block-size: 34px;
    border-radius: 10px;
    background: rgba(102, 88, 244, 0.12);
    display: grid;
    place-items: center;
}

.step-icon svg {
    width: 18px;
    height: 18px;
    stroke: var(--primary-dark);
    stroke-width: 1.7;
    fill: none;
}

.wizard-content {
    padding: clamp(1.5rem, 4vw, 2.5rem);
}

.wizard-panel {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.wizard-panel.is-visible {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.upload-zone {
    border: 1px dashed var(--stroke);
    border-radius: 20px;
    padding: 1.75rem;
    text-align: center;
    transition: border-color 0.3s ease, background 0.3s ease;
    background: #fbfbff;
}

.upload-zone:focus-visible {
    outline: none;
    border-color: var(--primary);
}

.upload-zone.dragover {
    border-color: var(--primary);
    background: rgba(102, 88, 244, 0.05);
}

.upload-zone__icon svg {
    width: 60px;
    height: 60px;
    stroke: var(--primary);
    stroke-width: 3;
    fill: none;
    margin-bottom: 1rem;
}

.upload-zone input {
    display: none;
}

.file-list {
    list-style: none;
    padding: 0;
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.file-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: var(--surface);
    border: 1px solid var(--stroke);
    font-size: 0.9rem;
    gap: 0.75rem;
}

.file-list li div {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.file-name {
    font-weight: 600;
}

.file-size {
    font-size: 0.8rem;
    color: var(--muted);
}

.file-placeholder {
    justify-content: center;
    color: var(--muted);
}

.file-remove {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.file-remove svg {
    width: 16px;
    height: 16px;
    stroke: var(--muted);
    stroke-width: 2;
    fill: none;
}

.file-remove:hover,
.file-remove:focus-visible {
    border-color: var(--stroke);
    background: rgba(0, 0, 0, 0.03);
    outline: none;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-weight: 600;
}

.field select,
.field input,
.field textarea {
    border-radius: 14px;
    border: 1px solid var(--stroke);
    padding: 0.8rem 1rem;
    background: #fafbff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.field select:focus,
.field input:focus,
.restriction-input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(127, 87, 255, 0.15);
}

.toggle-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(100px, 1fr));
    background: #fafbff;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    overflow: hidden;
}

.toggle-group input {
    display: none;
}

.toggle-group label {
    text-align: center;
    padding: 0.6rem 0.8rem;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s ease, color 0.3s ease;
}

.toggle-group input:checked + label {
    background: var(--primary);
    color: #fff;
}

.checkbox-control {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
}

.checkbox-control input {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--stroke);
    border-radius: 4px;
    display: grid;
    place-items: center;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.checkbox-control input::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: var(--surface);
    transform: scale(0);
    transition: transform 0.2s ease;
}

.checkbox-control input:checked {
    border-color: var(--primary);
    background: var(--primary);
}

.checkbox-control input:checked::after {
    transform: scale(1);
}

.restrictions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

@media (max-width: 680px) {
    .restrictions {
        grid-template-columns: 1fr;
    }
}

.restriction-item {
    border: 1px solid var(--stroke);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    background: #fbfbff;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.restriction-item.is-active {
    border-color: rgba(102, 88, 244, 0.4);
    background: #f7f6ff;
}

.restriction-header {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 0.75rem;
}

.restriction-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.icon-circle {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(102, 88, 244, 0.08);
    display: grid;
    place-items: center;
}

.icon-circle svg {
    width: 20px;
    height: 20px;
    stroke: var(--primary-dark);
    stroke-width: 1.5;
    fill: none;
}

.restriction-body {
    display: none;
    padding-inline-start: 2.75rem;
    animation: fadeIn 0.3s ease forwards;
}

.restriction-item.is-active .restriction-body {
    display: block;
}

.restriction-input {
    border-radius: 12px;
    border: 1px solid var(--stroke);
    background: var(--surface);
    padding: 0.7rem 1rem;
    resize: vertical;
    font-family: inherit;
}

.tooltip-trigger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem;
    display: grid;
    place-items: center;
}

.tooltip-trigger svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--muted);
    stroke-width: 1.5;
    transition: stroke 0.3s ease;
}

.tooltip-trigger:hover svg,
.tooltip-trigger:focus-visible svg {
    stroke: var(--primary);
}

.tooltip {
    position: absolute;
    background: rgba(17, 22, 33, 0.95);
    color: #fff;
    padding: 0.6rem 0.7rem;
    border-radius: 8px;
    font-size: 0.82rem;
    transform-origin: bottom;
    animation: pop 0.2s ease;
    max-width: 220px;
    box-shadow: 0 12px 30px rgba(4, 10, 25, 0.35);
    z-index: 10;
}

.tooltip-mobile {
    position: fixed;
    inset-inline: 1rem;
    bottom: 1rem;
    background: rgba(17, 22, 33, 0.96);
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    box-shadow: 0 18px 30px rgba(5, 5, 10, 0.35);
    display: none;
    z-index: 20;
}

@keyframes pop {
    from { opacity: 0; transform: translateY(8px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.wizard-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 2rem;
}

.button {
    border: none;
    border-radius: 16px;
    padding: 0.85rem 1.6rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button.primary {
    background: var(--primary);
    color: #fff;
    box-shadow: none;
}

.button.ghost {
    background: transparent;
    border: 1px solid var(--stroke);
    color: var(--text);
}

.button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.button:not(:disabled):active {
    transform: translateY(2px);
}

.step-counter {
    display: flex;
    align-items: baseline;
    gap: 0.2rem;
    color: var(--muted);
    font-weight: 600;
}

@media (max-width: 900px) {
    .hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero__meta {
        align-items: flex-start;
    }

    .wizard-footer {
        flex-direction: column;
        gap: 1rem;
    }

    .wizard-steps {
        grid-template-columns: 1fr;
    }

    .wizard-step {
        border-bottom: 1px solid rgba(127, 87, 255, 0.08);
    }

    .wizard-step::after {
        inset-inline-end: auto;
        inset-inline-start: 0;
    }
}

.panel-subtitle {
    color: var(--muted);
    margin-bottom: 2rem;
    text-align: center;
}

.php-versions-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.php-series {
    background: var(--surface);
    border: 1px solid var(--stroke);
    border-radius: 20px;
    padding: 1.5rem;
}

.series-title {
    margin-top: 0;
    margin-bottom: 1.25rem;
    font-size: 1.3rem;
    color: var(--text);
    border-bottom: 2px solid var(--stroke);
    padding-bottom: 0.5rem;
}

.version-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.version-card {
    position: relative;
    cursor: pointer;
}

.version-card input {
    position: absolute;
    opacity: 0;
}

.card-content {
    border: 2px solid var(--stroke);
    border-radius: 16px;
    padding: 1.25rem;
    background: #fbfbff;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    height: 100%;
    text-align: center;
}

.version-card input:checked + .card-content {
    border-color: var(--primary);
    background: rgba(102, 88, 244, 0.05);
    box-shadow: 0 8px 25px rgba(102, 88, 244, 0.15);
    transform: translateY(-2px);
}

.version-card:hover .card-content {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.version-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    display: block;
}

.coverage-info {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.4;
}

.selection-summary {
    background: var(--surface);
    border: 2px dashed var(--stroke);
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.selection-summary.has-selection {
    border-color: var(--accent);
    background: rgba(46, 191, 165, 0.05);
}

.summary-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-weight: 600;
    color: var(--muted);
}

.summary-icon {
    font-size: 1.2rem;
}

.selected-versions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.5rem;
}

.selected-version-tag {
    background: var(--primary);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.selected-version-tag button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: grid;
    place-items: center;
}

.selected-version-tag button:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* بخش توضیح ترکیب */
.coverage-explanation {
    background: var(--surface);
    border: 1px solid var(--stroke);
    border-radius: 16px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    display: none;
}

.coverage-explanation.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

.explanation-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.explanation-icon {
    font-size: 1.1rem;
}

.explanation-content {
    color: var(--muted);
    line-height: 1.6;
}

.coverage-range {
    background: rgba(46, 191, 165, 0.1);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    margin-top: 0.5rem;
    border-right: 3px solid var(--accent);
}

.coverage-range strong {
    color: var(--accent);
}

@media (max-width: 768px) {
    .version-cards {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .card-content {
        padding: 1rem;
    }
    
    .version-number {
        font-size: 1.3rem;
    }
}
.selection-notice {
    background: linear-gradient(135deg, rgba(102, 88, 244, 0.08), rgba(46, 191, 165, 0.08));
    border: 1px solid rgba(102, 88, 244, 0.2);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    position: relative;
    overflow: hidden;
}

.selection-notice::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--accent));
}

.notice-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.notice-content {
    flex: 1;
}

.notice-content strong {
    display: block;
    color: var(--primary-dark);
    margin-bottom: 0.4rem;
    font-size: 1rem;
}

.notice-content p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.9rem;
}

/* انیمیشن برای ظاهر شدن نوتیس */
@keyframes slideInNotice {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.selection-notice {
    animation: slideInNotice 0.5s ease-out;
}

@media (max-width: 768px) {
    .selection-notice {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .selection-notice::before {
        width: 100%;
        height: 3px;
        top: 0;
        right: 0;
        background: linear-gradient(90deg, var(--primary), var(--accent));
    }
}
/* استایل برای پیام موفقیت دانلود */
.download-success {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #2ebfa5, #27a189);
    color: white;
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(46, 191, 165, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 500px;
    width: 90%;
}

.download-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.download-content {
    flex: 1;
}

.download-content strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.download-button {
    display: inline-block;
    background: white;
    color: #2ebfa5;
    padding: 0.7rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 0.5rem;
    transition: transform 0.2s ease;
}

.download-button:hover {
    transform: translateY(-2px);
}

/* استایل برای پیام‌های فرم */
.form-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.form-message.success {
    background: #2ebfa5;
}

.form-message.error {
    background: #f56565;
}

/* نوتیس محدودیت‌ها */
.restrictions-notice {
    background: linear-gradient(135deg, rgba(102, 88, 244, 0.08), rgba(245, 101, 101, 0.08));
    border: 1px solid rgba(102, 88, 244, 0.2);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.notice-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.notice-content strong {
    display: block;
    color: var(--primary-dark);
    margin-bottom: 0.4rem;
}

.notice-content p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.9rem;
}

/* کانتینر اصلی */
.restrictions-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* هر بخش محدودیت */
.restriction-section {
    background: var(--surface);
    border: 1px solid var(--stroke);
    border-radius: 18px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.restriction-section.active {
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(102, 88, 244, 0.15);
}

/* هدر هر بخش */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: #fafbff;
    border-bottom: 1px solid var(--stroke);
    cursor: pointer;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text);
}

.section-icon {
    font-size: 1.3rem;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 54px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: var(--primary);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* بدنه هر بخش */
.section-body {
    padding: 1.5rem;
    display: none;
    animation: fadeIn 0.3s ease;
}

.restriction-section.active .section-body {
    display: block;
}

/* گزینه‌های زمانی */
.time-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.time-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--stroke);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.time-option:hover {
    border-color: var(--primary);
}

.time-option input[type="radio"] {
    margin: 0;
}

.option-label {
    font-weight: 600;
    min-width: 150px;
}

.option-controls {
    display: flex;
    gap: 0.5rem;
    flex: 1;
}

.option-controls input[type="number"] {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid var(--stroke);
    border-radius: 8px;
}

.option-controls select {
    padding: 0.5rem;
    border: 1px solid var(--stroke);
    border-radius: 8px;
    background: white;
}

.date-picker {
    padding: 0.5rem;
    border: 1px solid var(--stroke);
    border-radius: 8px;
    font-family: inherit;
}

/* Input tags برای دامنه و IP */
.tags-input {
    border: 1px solid var(--stroke);
    border-radius: 12px;
    padding: 0.75rem;
    background: white;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    min-height: 36px;
}

.tag {
    background: var(--primary);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tag-remove {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    padding: 0;
    width: 16px;
    height: 16px;
    display: grid;
    place-items: center;
}

.tag-input {
    border: none;
    outline: none;
    padding: 0.5rem;
    width: 100%;
    font-family: inherit;
    background: transparent;
}

/* فرم‌های چند ستونی */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-row label {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-row input {
    padding: 0.75rem;
    border: 1px solid var(--stroke);
    border-radius: 12px;
    font-family: inherit;
}

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* مبهم‌سازی */
.obfuscation-levels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.level-option {
    border: 1px solid var(--stroke);
    border-radius: 12px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.level-option:hover {
    border-color: var(--primary);
}

.level-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.level-desc {
    font-size: 0.85rem;
    color: var(--muted);
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

/* Propertyها */
.properties-editor {
    border: 1px solid var(--stroke);
    border-radius: 12px;
    padding: 1rem;
    background: #fafbff;
}

.property-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.property-row input {
    padding: 0.5rem;
    border: 1px solid var(--stroke);
    border-radius: 8px;
    font-family: inherit;
}

.equals {
    text-align: center;
    font-weight: bold;
    color: var(--muted);
}

.remove-property {
    background: #f56565;
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    display: grid;
    place-items: center;
}

.add-property-button {
    background: transparent;
    border: 1px dashed var(--stroke);
    border-radius: 12px;
    padding: 0.75rem;
    width: 100%;
    cursor: pointer;
    color: var(--muted);
    font-family: inherit;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.add-property-button:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* انیمیشن‌ها */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* واکنش‌گرا */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .obfuscation-levels {
        grid-template-columns: 1fr;
    }
    
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
    
    .property-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .equals {
        display: none;
    }
    
    .remove-property {
        justify-self: start;
    }
}
/* طراحی کامپکت مرحله ۲ */
.wizard-panel[data-panel="2"].is-visible {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.panel-subtitle {
    color: var(--muted);
    margin-top: -0.5rem;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 0.9rem;
}

/* انتخاب سریع Encoder */
.quick-encoder-select {
    background: var(--surface);
    border: 1px solid var(--stroke);
    border-radius: 16px;
    padding: 1rem;
}

.encoder-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.encoder-tab {
    background: #fafbff;
    border: 1px solid var(--stroke);
    border-radius: 12px;
    padding: 0.75rem 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
    border: none;
    font-family: inherit;
}

.encoder-tab:hover {
    background: rgba(102, 88, 244, 0.05);
    border-color: var(--primary);
}

.encoder-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 88, 244, 0.2);
}

.encoder-tab.active .tab-title,
.encoder-tab.active .tab-desc,
.encoder-tab.active .tab-badge {
    color: white;
}

.tab-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.2);
    color: var(--accent);
}

.encoder-tab.active .tab-badge {
    background: rgba(255, 255, 255, 0.3);
}

.tab-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.tab-desc {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* Grid مرتب برای PHP */
.php-grid-select {
    background: var(--surface);
    border: 1px solid var(--stroke);
    border-radius: 16px;
    padding: 1rem;
}

.grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--stroke);
}

.grid-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 1.1rem;
    color: var(--text);
}

.grid-icon {
    font-size: 1.2rem;
}

.grid-counter {
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 500;
    background: #fafbff;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    border: 1px solid var(--stroke);
}

.php-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.grid-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.row-label {
    font-weight: 600;
    color: var(--muted);
    font-size: 0.9rem;
    min-width: 70px;
    padding-top: 0.5rem;
    text-align: left;
}

.row-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex: 1;
}

.php-item {
    position: relative;
    cursor: pointer;
    min-width: 70px;
}

.php-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.php-item.disabled .item-content {
    background: #f5f5f7 !important;
    color: var(--muted) !important;
    border-color: var(--stroke) !important;
}

.php-item input {
    position: absolute;
    opacity: 0;
}

.item-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fafbff;
    border: 1px solid var(--stroke);
    border-radius: 10px;
    padding: 0.75rem 0.5rem;
    transition: all 0.2s ease;
    min-height: 70px;
}

.php-item:not(.disabled):hover .item-content {
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(102, 88, 244, 0.1);
}

.php-item:not(.disabled) input:checked + .item-content {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 88, 244, 0.2);
    transform: translateY(-2px);
}

.item-version {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.item-hint {
    font-size: 0.7rem;
    opacity: 0.8;
    text-align: center;
    line-height: 1.2;
}

.php-item input:checked + .item-content .item-hint {
    opacity: 0.9;
}

/* خلاصه کامپکت */
.compact-summary {
    background: var(--surface);
    border: 1px solid var(--stroke);
    border-radius: 16px;
    padding: 1rem;
    margin-top: 0.5rem;
}

.summary-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--stroke);
}

.summary-icon {
    font-size: 1.1rem;
}

.summary-body {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
}

.item-label {
    font-weight: 500;
    color: var(--muted);
    font-size: 0.9rem;
}

.item-value {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
}

.coverage-item .item-value {
    color: var(--accent);
    font-size: 0.85rem;
    line-height: 1.4;
    text-align: left;
    max-width: 200px;
}

/* انیمیشن‌ها */
@keyframes popIn {
    from { 
        opacity: 0; 
        transform: scale(0.95); 
    }
    to { 
        opacity: 1; 
        transform: scale(1); 
    }
}

.php-item input:checked + .item-content {
    animation: popIn 0.2s ease;
}

.encoder-tab.active {
    animation: popIn 0.2s ease;
}

/* واکنش‌گرا */
@media (max-width: 768px) {
    .encoder-tabs {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .encoder-tab {
        flex-direction: row;
        justify-content: space-between;
        padding: 0.75rem 1rem;
    }
    
    .grid-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .row-label {
        min-width: auto;
        padding: 0;
        text-align: right;
        align-self: flex-start;
        font-size: 0.85rem;
    }
    
    .row-items {
        width: 100%;
        justify-content: flex-start;
    }
    
    .php-item {
        min-width: 65px;
    }
    
    .item-content {
        min-height: 65px;
        padding: 0.6rem 0.4rem;
    }
    
    .item-version {
        font-size: 1rem;
    }
    
    .summary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }
}

/* حالت کوچک‌تر برای موبایل */
@media (max-width: 480px) {
    .row-items {
        justify-content: space-between;
    }
    
    .php-item {
        min-width: calc(50% - 0.5rem);
    }
    
    .item-content {
        min-height: 60px;
    }
    
    .item-version {
        font-size: 0.95rem;
    }
    
    .item-hint {
        font-size: 0.65rem;
    }
}
.payment-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-popup {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.payment-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-popup {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.payment-body {
    padding: 20px;
}

.payment-loader {
    text-align: center;
    padding: 30px 0;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.info-row.total {
    border-top: 2px solid #ddd;
    margin-top: 10px;
    padding-top: 15px;
    font-size: 18px;
}

.btn-pay {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    margin-top: 20px;
    transition: background 0.3s;
}

.btn-pay:hover {
    background: #45a049;
}

.btn-pay:disabled {
    background: #ccc;
    cursor: not-allowed;
}