:root {
    --instagram-primary: #0095f6;
    --instagram-border: #dbdbdb;
    --instagram-bg: #fafafa;
    --instagram-text: #262626;
    --instagram-text-light: #8e8e8e;
}

body {
    background-color: var(--instagram-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.5;
}

.upload-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--instagram-border);
    overflow: hidden;
}

.upload-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px 30px;
    text-align: center;
}

.upload-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

.upload-header p {
    margin: 10px 0 0 0;
    opacity: 0.9;
}

.upload-steps {
    display: flex;
    justify-content: center;
    margin: 30px 0;
    padding: 0 20px;
}

.step {
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 200px;
}

.step-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-left: 10px;
    transition: all 0.3s;
}

.step.active .step-number {
    background: var(--instagram-primary);
    color: white;
}

.step.completed .step-number {
    background: #28a745;
    color: white;
}

.step-text {
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
}

.step.active .step-text {
    color: var(--instagram-primary);
}

.step.completed .step-text {
    color: #28a745;
}

.step-line {
    flex: 1;
    height: 2px;
    background: #e9ecef;
    margin: 0 10px;
}

.upload-content {
    padding: 30px;
}

.form-section {
    margin-bottom: 30px;
    padding: 25px;
    border: 1px solid var(--instagram-border);
    border-radius: 8px;
    background: #fafafa;
    display: none;
}

.form-section.active {
    display: block;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--instagram-text);
}

.section-title i {
    color: var(--instagram-primary);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--instagram-text);
    display: flex;
    align-items: center;
    gap: 5px;
}

.form-label .required {
    color: #dc3545;
}

.form-control, .form-select {
    padding: 12px 15px;
    border: 1px solid var(--instagram-border);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--instagram-primary);
    box-shadow: 0 0 0 3px rgba(0, 149, 246, 0.1);
}

.form-text {
    font-size: 12px;
    color: var(--instagram-text-light);
    margin-top: 5px;
}

/* آپلود تصاویر */
.image-upload-container {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s;
    cursor: pointer;
}

.image-upload-container:hover {
    border-color: var(--instagram-primary);
    background: #f0f8ff;
}

.image-upload-container.dragover {
    border-color: var(--instagram-primary);
    background: #e3f2fd;
}

.upload-icon {
    font-size: 48px;
    color: #6c757d;
    margin-bottom: 15px;
}

.upload-text {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--instagram-text);
}

.upload-subtext {
    font-size: 14px;
    color: var(--instagram-text-light);
    margin-bottom: 15px;
}

.btn-upload {
    background: var(--instagram-primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-upload:hover {
    background: #0081d6;
    transform: translateY(-1px);
}

.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    cursor: pointer;
}

.preview-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.preview-remove {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
}

.preview-main {
    position: absolute;
    bottom: 5px;
    left: 5px;
    background: rgba(0, 149, 246, 0.9);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
}

/* ویژگی‌های آگهی */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.feature-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--instagram-border);
    border-radius: 6px;
    background: white;
}

.feature-name {
    font-weight: 500;
}

/* قیمت‌گذاری */
.price-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-input {
    flex: 1;
}

.price-unit {
    background: #e9ecef;
    padding: 12px 15px;
    border-radius: 6px;
    font-weight: 600;
    min-width: 80px;
    text-align: center;
}

.price-options {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.price-option {
    flex: 1;
    text-align: center;
    padding: 10px;
    border: 1px solid var(--instagram-border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.price-option:hover {
    border-color: var(--instagram-primary);
}

.price-option.selected {
    border-color: var(--instagram-primary);
    background: rgba(0, 149, 246, 0.1);
}

/* دکمه‌های اقدام */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--instagram-border);
}

.btn {
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn-prev {
    background: #6c757d;
    color: white;
}

.btn-prev:hover {
    background: #5a6268;
}

.btn-next {
    background: var(--instagram-primary);
    color: white;
}

.btn-next:hover {
    background: #0081d6;
}

.btn-submit {
    background: #28a745;
    color: white;
}

.btn-submit:hover {
    background: #218838;
}

/* پیش‌نمایش آگهی */
.preview-container {
    background: white;
    border: 1px solid var(--instagram-border);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 20px;
}

.preview-title {
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid var(--instagram-border);
    font-weight: 600;
}

/* واکنش‌گرایی */
@media (max-width: 768px) {
    .upload-steps {
        flex-direction: column;
        gap: 15px;
    }

    .step {
        max-width: none;
    }

    .step-line {
        display: none;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* استایل‌های خاص */
.character-count {
    font-size: 12px;
    color: var(--instagram-text-light);
    text-align: left;
    margin-top: 5px;
}

.character-count.warning {
    color: #ffc107;
}

.character-count.error {
    color: #dc3545;
}

.form-check {
    margin-bottom: 10px;
}

.form-check-input:checked {
    background-color: var(--instagram-primary);
    border-color: var(--instagram-primary);
}
/* استایل لودر */
.form-loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.form-loader {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.form-loader .spinner-border {
    width: 3rem;
    height: 3rem;
    margin-bottom: 15px;
}

.form-loader p {
    margin: 0;
    color: #666;
}

/* استایل مودال */
.form-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.form-modal {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.form-modal.success .modal-icon {
    color: #28a745;
    font-size: 3rem;
    margin-bottom: 15px;
}

.form-modal.error .modal-icon {
    color: #dc3545;
    font-size: 3rem;
    margin-bottom: 15px;
}

.modal-message {
    font-size: 16px;
    margin-bottom: 20px;
    color: #333;
}

/* اسپینر برای دکمه */
.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* بهبود استایل فرم در حالت لودینگ */
.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}