/* ایمپورت فونت وزیر */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;200;300;400;500;600;700;800;900&display=swap');

/* ریست ساده و فونت */
* { box-sizing: border-box; }
html, body { 
  height: 100%; 
  margin: 0; 
  padding: 0; 
  font-family: 'Vazirmatn', sans-serif; 
  direction: rtl;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-attachment: fixed;
}

/* کانتینر */
.container {
  max-width: 820px;
  margin: 40px auto;
  background: rgba(255, 255, 255, 0.95);
  padding: 40px;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  color: #333;
  text-align: right;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* عنوان */
h1, h2, h3, h4, h5 {
  font-weight: 600;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-family: 'Vazirmatn', sans-serif;
}

h2 {
  font-size: 32px;
  margin: 0 0 25px;
  text-align: center;
  text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* فرم */
label { 
  display:block; 
  margin-top:20px; 
  margin-bottom:8px;
  font-weight:600; 
  font-size: 18px;
  color: #495057;
  transition: color 0.3s ease;
}

label:hover {
  color: #667eea;
}
textarea, select, input[type="text"], button {
  width: 100% !important;
  padding: 12px 15px;
  border-radius: 12px;
  border: 2px solid #e9ecef;
  font-size: 18px;
  font-family: 'Vazirmatn', sans-serif !important;
  direction: rtl !important;
  text-align: right !important;
  transition: all 0.3s ease;
  background: #ffffff;
}

textarea:focus, select:focus, input[type="text"]:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
  outline: none;
  transform: translateY(-1px);
}

/* ستون‌ها (دو ستونه در دسکتاپ، تک ستونه موبایل) */
.row { display:flex; gap:12px; margin-top:6px; }
.row .col { flex:1; min-width: 0; } /* min-width:0 برای جلوگیری از overflow */

@media (max-width:720px){
  .row { flex-direction: column; }
}

/* دکمه‌ها */
button { cursor: pointer; border: none; text-align: center; }
.btn-primary { 
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff; 
  padding: 14px 32px; 
  border-radius: 25px; 
  margin: 20px auto 0;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  display: inline-block;
  width: auto;
  min-width: 180px;
  text-align: center !important;
}
.btn-primary:hover { 
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}
.btn-secondary { 
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
  color: #fff; 
  padding: 12px 24px; 
  border-radius: 20px; 
  margin: 12px auto 0;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s ease;
  display: inline-block;
  width: auto;
  min-width: 140px;
  text-align: center !important;
}
.btn-secondary:hover { 
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

/* یادآوری خطا سرویس */
.note {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  border: none;
  padding: 15px;
  border-radius: 12px;
  margin: 20px 0;
  color: #856404;
  text-align: center;
  box-shadow: 0 4px 10px rgba(255, 193, 7, 0.2);
  font-weight: 500;
  font-family: 'Vazirmatn', sans-serif;
}

/* فرم گزارش */
.report-form { margin-top:18px; background:#f7f9fb; padding:12px; border-radius:8px; }

/* دکمه گزارش خطا */
.btn-report {
  background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 25px;
  border: none;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(108, 117, 125, 0.2);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 10px auto 0;
  min-width: 120px;
  text-align: center !important;
}

.btn-report:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
  background: linear-gradient(135deg, #5a6268 0%, #343a40 100%);
}

/* جعبه نتیجه */
#resultBox {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px solid #dee2e6;
  padding: 20px;
  border-radius: 16px;
  margin-top: 20px;
  white-space: pre-wrap;
  text-align: right;
  direction: rtl;
  font-size: 18px;
  display: none;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
  line-height: 1.7;
  font-family: 'Vazirmatn', sans-serif;
}

/* کپی‌رایت */
copyright, .copyright {
  text-align: center;
  margin-top: 30px;
  font-size: 14px;
  color: #6c757d;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

copyright:hover, .copyright:hover {
  opacity: 1;
}

/* کپی‌رایت در داخل باکس */
.copyright-box {
  text-align: center;
  margin-top: 25px;
  padding: 15px;
  background: linear-gradient(135deg, rgba(108, 117, 125, 0.1) 0%, rgba(73, 80, 87, 0.1) 100%);
  border-radius: 12px;
  font-size: 13px;
  color: #6c757d;
  border: 1px solid rgba(108, 117, 125, 0.2);
  backdrop-filter: blur(10px);
  line-height: 1.6;
  transition: all 0.3s ease;
  font-family: 'Vazirmatn', sans-serif;
}

.copyright-box:hover {
  background: linear-gradient(135deg, rgba(108, 117, 125, 0.15) 0%, rgba(73, 80, 87, 0.15) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}


/* override احتمالی bootstrap یا CSS دیگر */
.container, label, textarea, select, input { direction: rtl !important; text-align: right !important; font-family: 'Vazirmatn', sans-serif !important; }
button { direction: rtl !important; font-family: 'Vazirmatn', sans-serif !important; }

/* اطمینان از اینکه همه متن‌ها از فونت Vazirmatn استفاده می‌کنند */
body, p, div, span, h1, h2, h3, h4, h5, h6, small, label, option, select, textarea, input, button, .modal-content, .alert, .form-control, .form-select, .form-label {
  font-family: 'Vazirmatn', sans-serif !important;
}

/* استایل بخش تنظیمات اضافی */
#extraSettings {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
  margin-top: 10px;
}

#extraSettings .form-label {
  font-weight: 500;
  color: #495057;
  margin-bottom: 5px;
}

#extraSettings .form-select,
#extraSettings .form-control {
  margin-bottom: 10px;
}

/* انیمیشن برای نمایش بخش تنظیمات */
#extraSettings {
  transition: all 0.3s ease-in-out;
}

/* استایل برای بخش انتخاب موضوع */
.form-group:has(#topic) {
  margin-top: 20px;
}

/* استایل انتخاب نوع خروجی */
select[name="output_type"] {
  font-size: 16px;
  font-weight: 500;
}

select[name="output_type"] option {
  padding: 10px;
}

/* استایل‌های فوتر جامع */
.system-footer {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: #ffffff;
  padding: 60px 0 30px;
  margin-top: 60px;
  font-family: 'Vazirmatn', sans-serif;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-section {
  background: rgba(255, 255, 255, 0.05);
  padding: 25px;
  border-radius: 15px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.footer-section:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.footer-section h3 {
  color: #3498db;
  font-size: 20px;
  margin-bottom: 20px;
  font-weight: 600;
  text-align: right;
}

.footer-section p {
  line-height: 1.8;
  color: #ecf0f1;
  font-size: 14px;
  text-align: justify;
}

/* مراحل کار */
.work-steps {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.step {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px;
  background: rgba(52, 152, 219, 0.1);
  border-radius: 10px;
  border-right: 3px solid #3498db;
}

.step-number {
  background: #3498db;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
  flex-shrink: 0;
}

.step-text {
  font-size: 14px;
  color: #ecf0f1;
  line-height: 1.6;
}

/* لیست ویژگی‌ها */
.features-list {
  list-style: none;
  padding: 0;
}

.features-list li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
  color: #ecf0f1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.features-list li:last-child {
  border-bottom: none;
}

/* کاربردها */
.applications {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.app-category {
  background: rgba(46, 204, 113, 0.1);
  padding: 15px;
  border-radius: 10px;
  border-right: 3px solid #2ecc71;
}

.app-category strong {
  color: #2ecc71;
  display: block;
  margin-bottom: 5px;
  font-size: 14px;
}

.app-category span {
  color: #ecf0f1;
  font-size: 13px;
  line-height: 1.6;
}

/* اطلاعات SEO */
.seo-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.seo-item {
  background: rgba(241, 196, 15, 0.1);
  padding: 12px;
  border-radius: 8px;
  border-right: 3px solid #f1c40f;
}

.seo-item strong {
  color: #f1c40f;
  font-size: 13px;
  display: block;
  margin-bottom: 5px;
}

.seo-item span {
  color: #ecf0f1;
  font-size: 12px;
  line-height: 1.5;
}

/* سوالات متداول */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.faq-item {
  background: rgba(155, 89, 182, 0.1);
  padding: 15px;
  border-radius: 10px;
  border-right: 3px solid #9b59b6;
}

.faq-question {
  color: #9b59b6;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
}

.faq-answer {
  color: #ecf0f1;
  font-size: 13px;
  line-height: 1.6;
}

/* اطلاعات تماس */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.contact-info p {
  margin: 0;
  font-size: 14px;
  color: #ecf0f1;
}

.contact-info strong {
  color: #e74c3c;
}

.contact-info a {
  color: #3498db;
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-info a:hover {
  color: #5dade2;
}

.quick-links {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.quick-links a {
  background: rgba(52, 152, 219, 0.2);
  padding: 8px 15px;
  border-radius: 20px;
  color: #3498db;
  text-decoration: none;
  font-size: 13px;
  transition: all 0.3s ease;
  border: 1px solid rgba(52, 152, 219, 0.3);
}

.quick-links a:hover {
  background: rgba(52, 152, 219, 0.3);
  transform: translateY(-1px);
}

/* کپی‌رایت پایین فوتر */
.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 20px;
}

.footer-bottom p {
  color: #bdc3c7;
  font-size: 13px;
  line-height: 1.8;
  margin: 0;
}

.footer-bottom strong {
  color: #ecf0f1;
}

.footer-bottom small {
  color: #95a5a6;
  font-size: 11px;
}

/* واکنش‌گرایی برای موبایل */
@media (max-width: 768px) {
  .footer-sections {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  
  .footer-section {
    padding: 20px;
  }
  
  .footer-section h3 {
    font-size: 18px;
  }
  
  .system-footer {
    padding: 40px 0 20px;
  }
  
  .quick-links {
    flex-direction: column;
    gap: 10px;
  }
  
  .step {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
}
