/* تنظیمات پایه */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
}

:root {
    --primary: #3498db;
    --success: #2ecc71;
    --danger: #e74c3c;
    --warning: #f39c12;
    --dark: #2c3e50;
    --light: #ecf0f1;
    --gray: #95a5a6;
    --light-gray: #f5f7fa;
}


body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

header h1 {
    color: var(--dark);
    font-size: 2.2rem;
    margin-bottom: 10px;
}

header p {
    color: var(--gray);
    font-size: 1.1rem;
}

/* فرم */
.form-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5eb;
    border-radius: 8px;
    font-size: 1rem;
    resize: vertical;
    min-height: 180px;
    transition: border 0.3s;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.btn-submit {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px 28px;
    font-size: 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
}

.btn-submit:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* پیش‌نمایش ایده */
#ideaPreview {
    margin-top: 40px;
    animation: fadeIn 0.5s;
}

.idea-form {
    background: var(--light-gray);
    border-radius: 10px;
    padding: 25px;
    margin-top: 20px;
}

.form-field {
    margin-bottom: 20px;
}

.form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.form-field textarea {
    min-height: 100px;
}

/* بخش‌های آرایه‌ای */
.form-array {
    margin-bottom: 25px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: white;
}

.array-items {
    margin-bottom: 15px;
}

.array-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    gap: 10px;
}

.array-item input {
    flex: 1;
}

.btn-remove {
    background: var(--danger);
    color: white;
    border: none;
    border-radius: 5px;
    width: 35px;
    height: 35px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-add {
    background: var(--success);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* مسیر یادگیری */
.learning-path {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px dashed #eee;
}

.path-items {
    margin-top: 15px;
}

.path-day {
    background: white;
    border: 1px solid #e1e5eb;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.path-day h3 {
    margin-bottom: 15px;
    color: var(--primary);
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* دکمه‌های اقدام */
.form-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.btn-save {
    background: var(--success);
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-reset {
    background: var(--warning);
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* لودینگ */
#loading {
    text-align: center;
    padding: 30px;
}

.spinner {
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

#loading p {
    color: var(--dark);
    font-weight: 500;
}

/* پیام‌ها */
.success-msg {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(46, 204, 113, 0.1);
    color: var(--success);
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    font-weight: 500;
    justify-content: center;
}

.error-msg {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger);
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
}

/* انیمیشن‌ها */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hidden {
    display: none;
}

/* واکنشگرایی */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    header h1 {
        font-size: 1.8rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-save, .btn-reset {
        width: 100%;
        justify-content: center;
    }
}


/* استایل‌های جدید برای بخش‌های لیستی */
.list-manager {
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #e1e5eb;
    border-radius: 8px;
    background-color: #f8f9fa;
}

.list-manager label {
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
    color: #2c3e50;
}

.list-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.list-item input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
}

.list-item button {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.add-item-btn {
    background: #2ecc71 !important;
    color: white !important;
    padding: 8px 15px;
    border-radius: 4px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* استایل کارت‌های ایده */
.ideas-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.idea-card {
    flex: 1;
    min-width: 300px;
    border: 1px solid #3498db;
    border-radius: 10px;
    padding: 20px;
    background: #f0f8ff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.idea-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #2980b9;
}

.idea-card.selected {
    border: 2px solid #e74c3c;
    background: #fff8f8;
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.2);
}

.idea-card h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #3498db;
    font-size: 1.3rem;
}

.learning-day {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.learning-day h4 {
    color: #3498db;
    margin-bottom: 10px;
}

.list-manager {
    margin: 15px 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background-color: #f9f9f9;
}

.list-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.list-item input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.list-item button {
    margin-right: 10px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    width: 30px;
    height: 30px;
    cursor: pointer;
}

.add-item-btn {
    background: #2ecc71 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* استایل‌های نمایش ایده‌ها */
.ideas-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.idea-card {
    flex: 1;
    min-width: 300px;
    border: 1px solid #3498db;
    border-radius: 10px;
    padding: 15px;
    background: #f0f8ff;
    cursor: pointer;
    transition: all 0.3s;
}

.idea-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.idea-card.selected {
    border: 2px solid #e74c3c;
    background: #fff8f8;
}

.idea-card h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    border-bottom: 1px solid #3498db;
    padding-bottom: 5px;
}