html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: sans-serif;
  background-color: #ddd;
}


#map {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0; /* نقشه همیشه پشت */
}


/* قاب رویی */
.frame-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border: 0 solid #000;
  box-sizing: border-box;
  pointer-events: none;
  z-index: 1500; /* بالاتر از نقشه */
}


/* ظرف داخلی برای جعبه‌ها */
.frame-content {
  position: relative;
  width: 100%;
  height: 100%;
  pointer-events: none; /* خودش کلیک‌پذیر نباشد */
}

/* جعبه‌ها داخل قاب */
#stats-container {
  position: absolute;
  top: 20px;   /* فاصله از قاب */
  right: 20px; /* فاصله از قاب */
  display: flex;
  flex-direction: column;
  gap: 0;
  z-index: 1500;
  pointer-events: auto; /* جعبه کلیک‌پذیر باشد */
}

#country-info-box {
  position: absolute;
  top: 0;
  right: 0;
  background: rgba(255,255,255,0.95);
  border-radius: 10px;
  padding: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  width: 520px;
  font-size: 14px;
  z-index: 1505;
  display: none;

  /* متن‌ها راست‌به‌چپ */
  direction: rtl;
  text-align: right;

  pointer-events: auto;
  white-space: normal;

  height: 100vh;
  overflow: hidden;   /* 👈 اسکرول روی کل باکس حذف شد */

  animation: fadeIn 0.3s ease;
}

/* تب‌های داخلی اسکرول داشته باشند */
#tab-events,
#tab-community,
#tab-industries,
#tab-info {
  overflow-y: auto;
  max-height: calc(100vh - 50px); /* بسته به ارتفاع هدر */
  padding: 10px;
  direction: rtl;      /* متن راست‌به‌چپ */
  text-align: right;
}

/* 👇 این خط باعث میشه اسکرول‌بار همیشه سمت راست باشه */
#tab-events,
#tab-community,
#tab-industries,
#tab-info {
  direction: ltr;      /* برای اسکرول سمت راست */
}
#tab-events * ,
#tab-community * ,
#tab-industries * ,
#tab-info * {
  direction: rtl;      /* محتوای داخلی راست‌به‌چپ */
  
}


/* هدر */
.country-info-header {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f5f5f5;
  padding: 10px 12px; /* کمی بیشتر برای نفس کشیدن */
  border-bottom: 1px solid #bbb;
}

.country-info-header .title {
  font-weight: bold;
  color: #222;
  font-size: 18px;       /* 👈 بزرگ‌تر از 14px */
  background: rgba(0,0,0,0.05);
  padding: 6px 12px;     /* کمی بیشتر برای تعادل */
  border-radius: 6px;
  flex-grow: 1;
  text-align: center;
}


/* دکمه ضربدر مستقل از هدر */
#country-info-box .close-btn {
  position: absolute;
  top: 6px;    /* کمی پایین‌تر از لبه */
  right: 6px;  /* گوشه راست باکس */
  background: transparent;
  border: none;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  color: #666;
  transition: color 0.2s ease;
  z-index: 1500; /* همیشه بالاترین لایه */
}
#country-info-box .close-btn:hover {
  color: #c00;
}



/* Body split into two columns */
.country-info-body {
  display: flex;
  flex-direction: row-reverse; /* پرچم سمت چپ، توضیحات سمت راست */
  padding: 10px;
  gap: 12px;
}

/* ستون پرچم و نام کشور (الان سمت چپ) */
.country-right {
  flex: 1;
  border-right: 1px solid #eee; /* خط جداکننده سمت راست */
  padding-right: 12px;
  text-align: center;
}

.country-right .flag {
  font-size: 48px;
  line-height: 1;
}

.country-right .country-name {
  margin-top: 6px;
  font-weight: bold;
  font-size: 14px;
  color: #333;
}

/* ستون توضیحات (الان سمت راست) */
.country-left {
  flex: 2;
  padding-right: 8px;
}

.country-left ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.country-left li {
  margin: 4px 0;
  padding-bottom: 4px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 18px;
  color: #444;
}

.country-left li:last-child {
  border-bottom: none;
}

/* Fade-in animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* باکس اصلی بالای نقشه */

#stats {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1000;          /* بالاتر از نقشه */
    pointer-events: auto;   /* اجازه تعامل موس */
    
}

.silver-frame, .inner-black, .hoi4-flag {
    pointer-events: auto;   /* مطمئن شو همه لایه‌ها موس رو می‌گیرن */
}


.silver-frame {
    background: #C0C0C0;  /* نقره‌ای */
    padding: 4px;          /* فاصله داخلی سیاه */
    border-radius: 4px;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
    display: inline-block;
}
.gdp-rank-badge {
  position: absolute;
  bottom: -6px;
  left: -6px;
  background: #000;       /* پس‌زمینه مشکی */
  color: #fff;            /* متن سفید */
  font-size: 14px;
  font-weight: bold;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #8B4513; /* قهوه‌ای */
  box-shadow: 0 0 4px rgba(0,0,0,0.4);
  cursor: pointer;        /* حالت دکمه */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gdp-rank-badge:hover {
  transform: scale(1.15); /* کمی بزرگ‌تر شود */
  box-shadow: 0 4px 10px rgba(0,0,0,0.6);
}

.inner-black {
    position: relative; /* برای اینکه badge نسبت به این div جای‌گذاری شود */
    background: #000;      /* لایه سیاه */
    padding: 4px;          /* فاصله بین سیاه و پرچم */
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gdp-box {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255,255,255,0.97);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  padding: 15px;
  z-index: 9999;          /* بالاتر از نقشه */
  pointer-events: auto;   /* کلیک‌پذیر */
  min-width: 320px;
  max-width: 600px;
  max-height: 70%;
  overflow-y: auto;
  direction: rtl;
  text-align: center;
}


.gdp-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  margin-bottom: 10px;
  margin-top: 10px;

}

.gdp-box .close-btn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

#gdp-table-container table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
#gdp-table-container th, #gdp-table-container td {
  border: 1px solid #ccc;
  padding: 6px;
  text-align: center;
}
#gdp-table-container th {
  background: #f2f2f2;
}


.hoi4-flag {
    display: block;
    width: 100%;
    height: auto;
    max-width: 100px;
    max-height: 75px;
    cursor: pointer;                 /* شبیه دکمه */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 4px;              /* کمی گرد برای حس دکمه */
}

/* افکت هاور: بزرگ‌تر شدن و سایه */
.hoi4-flag:hover {
    transform: scale(1.10);
    box-shadow: 0 0 10px rgba(255,255,255,0.6);
}

/* افکت کلیک: کمی کوچک‌تر شدن مثل فشار دادن */
.hoi4-flag:active {
    transform: scale(0.95);
    box-shadow: inset 0 0 6px rgba(0,0,0,0.6);
}

/* باکس اطلاعات ایران */
#iran-info-box {
  display: none;                   /* مخفی پیش‌فرض */
  position: fixed;                 /* نسبت به ویوپورت برای وسط دقیق */
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.98);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  padding: 18px 22px;
  z-index: 1500;                   /* بالاتر از نقشه */
  min-width: 320px;
  max-width: 420px;
  pointer-events: auto;            /* تعامل فقط روی کارت */
  animation: popupIn 180ms ease-out;
}

/* انیمیشن ورود لطیف */
@keyframes popupIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.95); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

#iran-info-box table {
  border-collapse: collapse;
  width: 100%;
  font-family: Tahoma, sans-serif;
  font-size: 14px;
}

#iran-info-box th {
  background: linear-gradient(90deg, #f7f7f7, #ededed);
  padding: 10px;
  text-align: center;
  font-size: 16px;
  border-radius: 8px;
}

#iran-info-box td {
  border-bottom: 1px solid #e6e6e6;
  padding: 8px 12px;
}

/* دکمه بستن بالا-راست */
#iran-info-box .close-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 20px;
  font-weight: bold;
  color: #666;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color 0.2s ease;
}
#iran-info-box .close-btn:hover {
  color: #d00;
}

/* پاپ‌آپ مختصات */
.coord-popup {
  font-family: sans-serif;
  font-size: 14px;
  padding: 8px;
  background: white;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  text-align: center;
  min-width: 140px;
}

.coord-popup strong {
  display: block;
  font-size: 15px;
  margin-bottom: 4px;
}

.coord-popup button {
  margin-top: 6px;
  padding: 5px 10px;
  font-size: 13px;
  background: #0078d4;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
}

.coord-popup button:hover {
  background: #005a9e;
}

/* مارکرهای کاربر */
.marker-circle { border-radius: 50%; border: 2px solid white; }
.marker-circle.blue { background-color: #0078d4; box-shadow: 0 0 4px rgba(0,120,212,0.8); }
.marker-circle.gray { background-color: #888; }

/* افکت خورشیدی و درخشان ثابت‌سایز */
.sun-aura {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,0,0.85) 0%, rgba(255,255,0,0.25) 60%, transparent 100%);
  box-shadow: 0 0 15px rgba(255,255,0,0.9), 0 0 30px rgba(255,255,0,0.6), 0 0 45px rgba(255,255,0,0.4);
  animation: pulse 2s infinite;
  pointer-events: none; /* تا کلیک‌ها به مارکر اصلی برسه */
}
.sun-aura.red {
  background: radial-gradient(circle, rgba(255,0,0,0.85) 0%, rgba(255,0,0,0.25) 60%, transparent 100%);
  box-shadow: 0 0 15px rgba(255,0,0,0.9), 0 0 30px rgba(255,0,0,0.6), 0 0 45px rgba(255,0,0,0.4);
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.75; }
  100% { transform: scale(1); opacity: 1; }
}


/* حذف استایل باکس قدیمی */
.info-box { display: none; }

/* هسته استایل‌ها (CSS خالص) */
/* کانتینر مأموریت‌ها روی نقشه */


/* باکس‌ها */

/* جعبه کلی */
/* جعبه کلی */
.update-box {
  position: fixed;
  right: 0;
  top: 0;
  width: 520px;
  height: 100%;
  background: rgba(43, 36, 32, 0.85);
  color: #f5e6c8;
  border: 2px solid #8b7355;
  border-radius: 8px;
  padding: 0;
  font-family: "Vazirmatn", sans-serif;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  text-align: right;
  z-index: 15000;
  overflow: hidden;
  display: none;

  pointer-events: auto; /* 👈 این خط مهمه */
}

/* توضیح آپدیت با استایل مشابه زمان باقی‌مانده */
.update-desc {
  background: rgba(0,0,0,0.4); /* نیمه‌شفاف مثل ظرف ۵ سال */
  padding: 6px 12px;
  border-radius: 4px;
  margin-bottom: 4px;
}

.update-inline {
  font-size: 13px;       /* ریز مثل زمان باقی‌مانده */
  font-weight: bold;     /* بولد برای تأکید */
  color: #ffffff;        /* سفید برای خوانایی روی پس‌زمینه نیمه‌شفاف */
}
.update-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 22px;
  font-weight: bold;
  color: #f5e6c8;
  cursor: pointer;
  transition: color 0.2s ease;
}
.update-close:hover {
  color: #ff6b6b;
}

/* تیترهای جداگانه */
.section-header {
  background-color: #7b1e3a;
  color: #fff8e1;
  font-weight: bold;
  font-size: 16px;
  padding: 8px 12px;
  text-align: center;
  border-bottom: 1px solid #5e152c;
}

.section-header.no-border {
  border-bottom: none;
}


/* توضیح مأموریت */
.mission-desc {
  font-size: 14px;
  color: #ffffff;
  padding: 10px 12px;
  background: rgba(0,0,0,0.4);
  line-height: 1.5;
}

/* پروژه امیرکبیر بولد ریز */
.project-inline {
  font-weight: 700;
  font-size: 13px;
  color: #ffffff;
}

/* زمان باقی‌مانده نارنجی */
.time-remaining {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  color: #ff9800;
}
.time-red {
  color: #ff9800;
  font-weight: bold;
}

/* نوار پیشرفت */
/* نوار پیشرفت */
.progress-container {
  position: relative;
  width: 100%;
  height: 22px;              /* ارتفاع ثابت برای قاب */
  border-radius: 6px;        /* گوشه‌های مستطیل */
  overflow: hidden;
  background: repeating-linear-gradient(
    45deg,
    #3c352e,
    #3c352e 10px,
    #2b2420 10px,
    #2b2420 20px
  );
  background-size: 40px 40px;
  animation: moveStripes 3s linear infinite;
}

/* متن بالای نوار (اگر لازم داری) */
.progress-context {
  font-size: 13px;
  font-weight: bold;
  color: #ffffff;
  background: rgba(0,0,0,0.4);
  padding: 6px 12px;
  margin: 0;
  border: none;
  border-radius: 0;
}

/* نوار پرشونده سبز */
.progress-fill {
  height: 100%;              /* پر کردن کل ارتفاع قاب */
  background-color: #3da35a; /* سبز */
  transition: width 0.5s ease;
  z-index: 1;
}

/* متن درصد */
.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-weight: bold;
  font-size: 12px;
}



@keyframes moveStripes {
  from { background-position: 0 0; }
  to { background-position: 40px 0; }
}


/* مودال */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.9);
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80%;
}
/* نوار پرشونده سبز */
.progress-fill-red {
  height: 100%;              /* پر کردن کل ارتفاع قاب */
  background-color: red; /* سبز */
  transition: width 0.5s ease;
  z-index: 1;
}

.progress-fill-green {
  height: 100%;              /* پر کردن کل ارتفاع قاب */
  background-color: #3da35a; /* سبز */
  transition: width 0.5s ease;
  z-index: 1;
}


/* متن درصد */
.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-weight: bold;
  font-size: 12px;
}

.user-label {
  background: transparent;
  border: none;
  box-shadow: none;
  font-family: Tahoma, sans-serif;
}
/* استایل جدید برای لیست کاربران در تب جامعه */
/* کانتینر لیست کاربران (خود تب جامعه) */
#tab-community {
  padding: 6px 10px;
  overflow-y: auto;
  font-family: Tahoma, sans-serif;
  border-radius: 0 0 8px 8px;
  direction: ltr;       /* اسکرول سمت راست */
  text-align: right;    /* متن راست‌چین */
}

/* هر کاربر */
.user-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  direction: rtl;       /* متن راست‌به‌چپ */
  padding: 6px 8px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
 font-size: 16px;   /* حالت عادی */
  transition: font-size 0.2s ease, background 0.2s ease; /* انیمیشن نرم */  background: transparent;
}

.user-item:last-child {
  border-bottom: none;
}

.user-skill {
  font-style: italic;
  font-size: 14px;   /* 👈 کوچیک‌تر از نام */
  color: #555;
}

.user-legend {
  display: flex;
  justify-content: center;   /* 👈 آیتم‌ها وسط‌چین افقی */
  align-items: center;       /* 👈 وسط‌چین عمودی */
  gap: 20px;                 /* فاصله یکنواخت بین آیتم‌ها */

  margin: 8px auto;          /* 👈 خودش هم وسط باکس قرار بگیره */
  padding: 6px 12px;
  font-size: 13px;
  color: #555;

  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 6px;
  text-align: center;        /* 👈 متن‌ها هم وسط */
}


.user-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 4px; /* فاصله بین نقطه و متن */
}

.user-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot-free { background-color: #4caf50; } /* سبز: آزاد */
.dot-busy { background-color: #2196f3; } /* آبی: مشغول */


/* افکت‌ها */
/* افکت‌ها */
.user-item:hover {
  background: #f5f5f5;  /* خاکستری ملایم */
  font-size: 17px;      /* یک شماره بزرگ‌تر */
}

.user-item:hover .user-name,
.user-item:hover .user-skill {
  font-weight: bold;
  font-style: normal;
}

.user-item.active-row {
  background: #e9f0f5;   /* خاکستری مایل به آبی برای تمایز */
  border: 1px solid #339af0;
  border-radius: 6px;
  font-size: 17px;
}

.user-item.active-row .user-name,
.user-item.active-row .user-skill {
  font-weight: bold;
  font-style: normal;
}



/* متن‌ها */
@font-face {
  font-family: 'B Nazanin';
  src: url('fonts/B-NAZANIN.TTF') format('truetype'); /* مسیر فونت را درست بگذار */
  font-weight: normal;
  font-style: normal;
}

.user-name {
  font-family: 'B Nazanin', Tahoma, sans-serif; /* 👈 اولویت با B Nazanin */
  font-weight: bold;
  color: #333;
}


.user-skill {
  font-style: italic;
  color: #555;
}

/* کانتینر دکمه‌ها پایین وسط با پس‌زمینه */

/* باکس در بالا سمت راست */


/* کانتینر تب صنایع */
#tab-industries {
  padding: 6px 10px;
  overflow-y: auto;
  font-family: Tahoma, sans-serif;
  border-radius: 0 0 8px 8px;
  direction: ltr;
  text-align: right;
}

/* جدول صنایع */
.industry-header,
.industry-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  direction: rtl;
  padding: 6px 8px;
  border-bottom: 1px solid #eee;
  font-size: 16px;
}

.industry-header {
  font-weight: bold;
  background: #fafafa;
  border-bottom: 2px solid #ccc;
}

.industry-header-name,
.industry-name {
  width: 240px; /* حدود 20 کاراکتر */
  text-align: right;
  font-family: 'B Nazanin', Tahoma, sans-serif;
  font-weight: bold;
  color: #222;
  padding-right: 8px;
}

.industry-header-workopportunity,
.industry-header-internshipopportunity,
.industry-workopportunity,
.industry-internshipopportunity {
  flex: 1;
  text-align: center;
  font-size: 14px;
  color: #444;
  white-space: nowrap;
}

.industry-workopportunity {
  color: green;
  font-weight: bold;
}

.industry-internshipopportunity {
  color: red;
  font-weight: bold;
}

.industry-item:hover {
  background: #f5f5f5;
  font-size: 17px;
}

.industry-item.active-row {
  background: #e9f0f5;
  border: 1px solid #339af0;
  border-radius: 6px;
  font-size: 17px;
}



#zoom-control {
  position: absolute;
  bottom: 0;
  left: 200px;
   display: none;
  z-index: 1500;
  font-family: sans-serif;
  text-align: center;
  pointer-events: auto;
  width: 81px; /* کمی پهن‌تر برای جا دادن متن و ایموجی */
}

#zoom-value {
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 4px 8px;
  border-radius: 6px 6px 0 0;
  font-size: 14px;
}

#zoom-desc {
  background: rgba(0,0,0,0.5);
  color: #fff;
  padding: 4px 8px;
  border-radius: 0 0 6px 6px;
  font-size: 12px;
  min-height: 20px; /* ثابت نگه داشتن ارتفاع */
}

.zoom-track {
  position: relative;
  width: 14px;
  height: 110px; /* ارتفاع نوار */
  background: #ccc;
  border-radius: 8px;
  margin: 10px auto 0;
}
.zoom-handle {
  position: absolute;
  left: 50%;                 /* وسط نوار */
  transform: translateX(-50%);
  width: 16px;               /* نسبت 4 */
  height: 12px;              /* نسبت 3 */
  background: #0078d4;       /* رنگ اصلی */
  border-radius: 0;          /* مستطیل کامل */
  cursor: grab;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.4),
              0 2px 4px rgba(0,0,0,0.3); /* حس کابین */
  border: 2px solid #fff;    /* قاب سفید مثل پنجره */
}


.zoom-emojis {
  position: absolute;
  left: -28px; /* کنار نوار مثل دماسنج */
  top: 0;
  height: 100%;
  width: 26px;
  pointer-events: none;
}

.zoom-emojis .emoji {
  position: absolute;
  left: 0;
  font-size: 18px;
  transform: translateY(-50%); /* مرکز روی نقطه */
}


.modal {
  display: none;
  position: fixed;
  top: 0; 
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100000;
  background: rgba(0,0,0,0.5); /* 👈 پس‌زمینه تیره پشت کل باکس */
  pointer-events: auto;
}

.modal-content {
  position: absolute;
  top: 50%; 
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  max-width: 700px;
  max-height: 75vh;
background: #dfe3e6; /* کمی آبی‌مایل */
 /* 👈 خود باکس روشن می‌ماند */
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
  padding: 12px 20px;
  font-family: "B Nazanin", Tahoma, sans-serif;
  font-size: 22px;
  line-height: 1.9;
  text-align: justify;
  direction: rtl;
  display: flex;
  flex-direction: column;
}

.modal-content h3 {
  font-size: 28px;
  font-weight: bold;
    margin-top: 40px;
  margin-bottom: 8px;
  text-align: right; /* 👈 تیتر راست‌چین */
}

.modal-text {
  max-height: 60vh;        /* محدودیت ارتفاع */
  overflow-y: auto;        /* اسکرول داخلی */
  text-align: justify;     /* پر شدن خطوط */
  text-justify: inter-word;/* توزیع کلمات */
  padding-right: 8px;      /* اسکرول سمت راست */
    margin-bottom: 20px;
      direction: ltr;          /* 👈 اسکرول سمت راست */
}

/* استایل اسکرول بار */
.modal-text::-webkit-scrollbar {
  width: 8px;
}

.modal-text::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.3);
  border-radius: 6px;
}

.modal-text::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.05);
}

.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 22px;
  cursor: pointer;
  background: none;
  border: none;
}

.close-btn:hover {
  color: red;
}


.corner-image {
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 290px;
  transition: transform 0.3s ease;
  cursor: pointer;
  z-index: 2100;
  pointer-events: auto;
  transform-origin: bottom left; /* ✅ مبدا بزرگ شدن گوشه پایین-چپ */
}

.corner-image:hover {
  transform: scale(1.2);
}
#company-square {
  left: 4px;
  bottom: 4px;
  width: 70px;
  height: 70px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  font-family: "Vazirmatn", sans-serif;
  font-size: 11px;
  color: #333;
  z-index: 15000;
  pointer-events: auto;
  text-align: center;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.company-logo {
  height: 40px;
}

.company-name {
  font-weight: bold;
}

/* Hover effect with golden glow */
.corner-image:hover + #company-square,
#company-square:hover {
  transform: scale(1.15);
  box-shadow: 0 0 12px rgba(255, 215, 0, 0.9),
              0 0 20px rgba(255, 223, 100, 0.7);
  border-color: #FFD700;
}
/* Wrapper to align company square + envelope side by side */
.corner-wrapper {
  position: fixed;
  bottom: 4px;
  left: 4px;
  display: flex;
  align-items: flex-end;
  gap: 6px; /* space between boxes */
  z-index: 2100;
}

/* Envelope square */
#envelope-square {
  width: 40px;
  height: 40px;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  transition: transform 0.25s ease;
  margin-left: 15px;

  /* 🔑 Ensure it can always be hovered/clicked */
  pointer-events: auto;
  z-index: 2200; /* higher than .corner-image */
}

.envelope-icon {
  width: 22px;
  height: 22px;
}

#envelope-square:hover {
  transform: scale(1.2);
}

.tabs {
  display: flex;
  border-bottom: 1px solid #ccc;
  margin: 6px 0;
}
.tab-btn {
  flex: 1;
  padding: 6px;
  cursor: pointer;
  background: #f5f5f5;
  border: none;
  border-right: 1px solid #ccc;
  font-weight: bold;
}
.tab-btn.active {
  background: white;
  border-bottom: 2px solid #0078d4;
}
.tab-content {
  padding: 6px;
}


/* قاب نقره‌ای */
.silver-frame {
  background: #C0C0C0;   /* نقره‌ای */
  padding: 3px;          /* 👈 ضخامت بیشتر قاب */
  border-radius: 8px;    /* کمی گردتر */
  box-shadow: 2px 2px 8px rgba(0,0,0,0.5);
  display: inline-block;
  transition: transform 0.25s ease;
}

/* قاب مخصوص موشک */
.rocket-frame {
  position: fixed;
  right: 0;
  top: 230px;
  z-index: 1000;
}

/* لایه مشکی داخلی */
.inner-black {
  background: #000;       /* مشکی */
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* خود دکمه موشک */
#rocket-btn {
  width: 50px;   /* 👈 بزرگ‌تر شد */
  height: 50px;  /* 👈 بزرگ‌تر شد */
  background: transparent; /* شفاف، تا موشک یا انیمیشن دیده شود */
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease;
}

/* افکت هاور */
#rocket-btn:hover {
  transform: scale(1.15);
}

/* مودال کلی */
.login-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 99999;
  pointer-events: auto;
}

/* جعبه داخلی */
.login-modal-content {
  position: relative;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  width: 300px;
  text-align: right;
  font-family: Tahoma, sans-serif;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* دکمه ضربدر */
.login-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f0f0f0;
  border: 1px solid #ccc;
  font-size: 18px;
  font-weight: bold;
  color: #666;
  cursor: pointer;
  line-height: 26px;
  text-align: center;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.login-close:hover {
  background: #ff4d4d;
  color: #fff;
  border-color: #d00;
  transform: scale(1.1);
}
.login-close:active { transform: scale(0.9); }

/* ورودی‌ها: عرض کامل */
.login-modal-content input {
  width: 100%;
  padding: 8px;
  margin: 6px 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  text-align: right;   /* 👈 متن داخل ورودی سمت راست */
  direction: rtl;      /* 👈 جهت نوشتار راست به چپ */
}


/* دکمه ورود */
.login-submit {
  width: 100%;
  padding: 8px;
  background: #0078d4;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  margin-top: 10px;
  
}
.login-submit:hover { background: #005a9e; }

/* پیام خطا */
#error { margin-top:10px; font-size:13px; }
.country-overlay { z-index: 2990; }

.country-overlay {
  display: none;              /* پیش‌فرض مخفی */
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5); /* نیمه‌شفاف */
  z-index: -1;              /* پشت country-info-box (مثلاً 2000) */
}

#user-info-box {
  position: absolute;
  top: 0;
  left: 0;
  background: rgba(255,255,255,1);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  width: 520px;
  z-index: 2505;
  display: none;
  direction: rtl;
  text-align: right;
  height: 100vh;
  overflow: hidden;
  animation: fadeIn 0.3s ease;
  padding: 0;
  pointer-events: auto;
}

#user-info-box img {
  width: 200px;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 0;
  object-fit: cover;
}

#user-info-box .fullname {
  font-weight: bold;
  font-size: 20px;
  color: #333;
  margin-top: 12px;
}

#user-info-box .close-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 22px;
  font-weight: bold;
  color: #fff;   /* 👈 تغییر به سفید */
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color 0.2s ease;
}

#user-info-box .close-btn:hover {
  color: #d00;  /* هنگام هاور قرمز شود */
}


@keyframes fadeIn {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}

.image-wrapper {
  position: relative;
  width: 520px;
  height: 200px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.image-wrapper .close-btn {
  position: absolute;
  top: 8px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 22px;
  font-weight: bold;
  color: #666;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color 0.2s ease;
}
.image-wrapper .close-btn:hover { color: #d00; }

.image-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("Full background image/1.png") center/cover no-repeat;
  filter: blur(20px) brightness(0.7); /* بلور و کمی تیره‌تر */
  transform: scale(1.1);              /* کمی بزرگ‌تر برای پوشش کامل */
}

.image-wrapper img {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  z-index: 1;
}


