:root {
  font-family: Inter, sans-serif !important;
  font-feature-settings: "liga" 1, "calt" 1 !important;
}

@supports (font-variation-settings: normal) {
  :root {
    font-family: InterVariable, sans-serif;
  }
}

@font-face {
  font-family: "IRANYekanMedium";
  src: url("../font/IRANYekanMedium.ttf");
  font-display: swap;
}
@font-face {
  font-family: "IRANYekanBold";
  src: url("../font/IRANYekanBold.ttf");
  font-display: swap;
}
@keyframes shake {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-2px) rotate(-1deg);
  }
  50% {
    transform: translateX(2px) rotate(1deg);
  }
  75% {
    transform: translateX(-2px) rotate(-1deg);
  }
  100% {
    transform: translateX(0);
  }
}

body {
  margin: 0;
  padding: 0;
  background-color: black;
  color: white;
  transition: background 0.3s, color 0.3s;
  user-select: none;
}

/* حالت‌های دیگر بدون تغییر، فقط به کدهای مربوط به تم توجه کنید */

.app {
  min-height: 100vh;
  padding: 11px;
  padding-bottom: 100px; /* اضافه کردن فاصله در پایین برای جلوگیری از تداخل با نوار پایین */
  /* height: 80rem; */ /* حذف ارتفاع ثابت */
}

@media (min-width: 376px) {
  .app {
    width: 375px;
    margin: 0 auto;
  }
}

.container {
  margin: 0 auto;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.header h1 {
  font-size: 2.5rem;
  font-weight: bold;
  margin-left: 5px;
  margin-right: 0;
  margin-top: 0;
  margin-bottom: 0;
}

.time {
  color: #a1a1aa;
  font-size: 0.875rem;
  margin-top: 2rem;
  margin-right: 6px;
  transition: background 0.3s, color 0.3s;
}

.currency-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.currency-card {
  background-color: #1c1b1d;
  border-radius: 1rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  /* max-height: 250px; */ /* حذف محدولیت ارتفاع */
  overflow: visible; /* اجازه نمایش محتوا */
  transition: background 0.3s, color 0.3s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.currency-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.currency-flag {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
}

.currency-flag-modal {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
}

.currency-info {
  flex: 1;
}

.currency-name {
  color: white;
  font-size: 0.875rem;
  transition: background 0.3s, color 0.3s;
  font-family: IRANYekanMedium !important;

}

.currency-code {
  color: #71717a;
  font-size: 0.75rem;
  font-family: IRANYekanMedium !important;
}

.currency-change {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #df5351;
  font-size: 1rem;
  margin-top: 1rem;
}

.trending-up-icon {
  width: 12px;
  height: 12px;
}

.currency-value {
  color: white;
  font-size: 2rem;
  font-weight: 500;
  margin-top: 0.25rem;
  transition: background 0.3s, color 0.3s;
}

.ad-banner {
  background-color: #1c1b1d;
  border-radius: 1rem;
  padding: 1rem;
  margin: 0.5rem 4px;
  transition: background 0.3s, color 0.3s;
}

.ad-content {
  display: flex;
  justify-content: center; /* وسط‌چین کردن کل محتوای درون .ad-content */
}

.ad-content h3 {
  color: white;
  font-size: 1.125rem;
  margin: 0;
  text-align: center;
  font-family: "IRANYekanMedium" !important;
  transition: background 0.3s, color 0.3s;
}

.ad-content p {
  color: #a1a1aa;
  font-size: 0.875rem;
  margin: 0.25rem 0 0 0;
}

.install-button {
  background-color: #3f3f46;
  color: white;
  border: none;
  border-radius: 0.5rem;
  padding: 0.5rem 1.5rem;
  font-size: 0.875rem;
  cursor: pointer;
}

.bottom-bar {
  position: fixed; /* ثابت نگه داشتن نوار در پایین صفحه */
  bottom: 40px; /* فاصله از پایین صفحه (می‌توانی این مقدار را تغییر دهی) */
  left: 0;
  right: 0;
  margin-top: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(39, 39, 42, 0.5);
  border-radius: 21px;
  padding: 0.75rem 1.5rem;
  backdrop-filter: blur(10px); /* بلور پس‌زمینه */
  margin-right: 23px;
  margin-left: 23px;
  transition: background 0.3s, color 0.3s;
 
}

.action-button {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s, color 0.3s;
}
.add-button {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s, color 0.3s;
}

.status {
  color: #71717a;
  transition: background 0.3s, color 0.3s;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: flex-end;

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-title {
  font-size: 19px;
}

.modal-code {
  font-size: 10px;
  color: #8c8c8e;
  font-family: IRANYekanMedium !important;

}

.modal-content {
  width: 100%;
  max-width: 500px;
  background: #1a1a1a;
  color: white;
  padding: 20px;
  border-radius: 15px 15px 0 0;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.modal-header {
  display: flex;
  align-items: flex-start; /* تراز کردن از بالا */
  gap: 10px; /* فاصله بین عکس و عنوان */
}

.modal-title {
  display: block; /* نمایش به صورت بلوک برای قرار گرفتن در خط جدید */
  font-size: 19px;
  margin-bottom: 5px; /* فاصله بین عنوان و کد */
  color: white;
  font-family: IRANYekanMedium !important;

}

.modal-code {
  display: block; /* نمایش به صورت بلوک برای قرار گرفتن در خط جدید */
  font-size: 10px;
  color: #8c8c8e;
}

.modal.active .modal-content {
  transform: translateY(0);
}

.close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
}

.close-button2 {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
}

.currency-change.positive {
  color: green;
}

.currency-change.negative {
  color: red;
}

.trending-up-icon {
  stroke: green;
}

.trending-down-icon {
  stroke: red;
}

.action-menu {
  position: fixed;
  bottom: 60px; /* ارتفاع کمی بالاتر از دکمه */
  right: 20px; /* کنار دکمه باز شدن */
  width: 225px;
  background: rgba(30, 30, 30, 0.9);
  backdrop-filter: blur(15px);
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.9) translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.action-menu-content .about-text {
  max-height: 300px; /* تعیین ارتفاع حداکثر برای جلوگیری از overflow */
  overflow-y: auto; /* نمایش اسکرول در صورت زیاد بودن متن */
  padding-right: 10px; /* فاصله برای اسکرول */
}

.action-menu.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
  margin-bottom: 2.2rem;
}

.action-menu-content {
  display: flex;
  flex-direction: column;
}

.action-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.action-menu li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-radius: 10px 10px 0 0; /* گرد کردن فقط گوشه‌های بالا */
  transition: background 0.2s ease;
  cursor: pointer;
  border-bottom: 1px solid #ccc; /* خط پایین برای همه آیتم‌ها */
}

/* حذف خط از آخرین آیتم */
.action-menu li:last-child {
  border-bottom: none;
}
.add-menu {
  position: fixed;
  bottom: 60px; /* ارتفاع کمی بالاتر از دکمه */
  left: 20px; /* کنار دکمه باز شدن از سمت چپ */
  width: 225px;
  background: rgba(30, 30, 30, 0.9);
  backdrop-filter: blur(15px);
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.9) translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;

  max-height: 317px;
  overflow-y: auto; /* فعال کردن اسکرول عمودی */
}

.add-menu-content .about-text {
  max-height: 300px; /* تعیین ارتفاع حداکثر برای جلوگیری از overflow */
  overflow-y: auto; /* نمایش اسکرول در صورت زیاد بودن متن */
  padding-right: 10px; /* فاصله برای اسکرول */
}

.add-menu.active {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
  margin-bottom: 2.2rem;
}

.add-menu-content {
  display: flex;
  flex-direction: column;
}

.add-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.add-menu li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-radius: 10px 10px 0 0; /* گرد کردن فقط گوشه‌های بالا */
  transition: background 0.2s ease;
  cursor: pointer;
  border-bottom: 1px solid #ccc; /* خط پایین برای همه آیتم‌ها */
}

/* حذف خط از آخرین آیتم */
.add-menu li:last-child {
  border-bottom: none;
}

.close-button2 {
  position: absolute;
  top: 5px;
  right: 10px;
  font-size: 22px;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
}

ul {
  list-style-type: none;
  padding: 0;
}

ul li {
  padding: 10px;
  border-bottom: 1px solid #444;
  cursor: pointer;
  font-family: "IRANYekanMedium" !important;
}

.IRANYekanMediumFont {
  font-family: "IRANYekanMedium" !important;
}

.modal-value {
  font-size: 38px;
  margin-top: -7px;
  margin-bottom: -4px;
  font-weight: bold;
}

#back-button {
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  border-radius: 0.2rem;
  color: #fff;
  background-color: #007bff; /* رنگ اولیه (primary) */
  border: 1px solid #007bff; /* مرز دکمه */
  cursor: pointer;
  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;
  font-family: "IRANYekanMedium" !important;
}

#back-button:hover {
  background-color: #0056b3; /* تغییر رنگ به آبی تیره‌تر */
  border-color: #0056b3;
}

#back-button:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(38, 143, 255, 0.5); /* حاشیه آبی روشن هنگام فوکوس */
}

#back-button:disabled {
  background-color: #e0e0e0;
  border-color: #e0e0e0;
  color: #6c757d;
  cursor: not-allowed;
}
.copybtn {
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  border-radius: 0.2rem;
  color: #fff;
  background-color: #007bff; /* رنگ اولیه (primary) */
  border: 1px solid #007bff; /* مرز دکمه */
  cursor: pointer;
  font-family: "IRANYekanMedium" !important;
}

.copybtn:hover {
  background-color: #0056b3; /* تغییر رنگ به آبی تیره‌تر */
  border-color: #0056b3;
}

.copybtn:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(38, 143, 255, 0.5); /* حاشیه آبی روشن هنگام فوکوس */
}

#editButton {
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  background-color: #007bff;
  color: white;
  border-radius: 0.2rem;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;
  font-family: "IRANYekanMedium" !important;
  border-bottom: 1px solid #0056b3; /* خط پایین برای همه آیتم‌ها */
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

#editButton:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(38, 143, 255, 0.5);
}

#editButton:disabled {
  background-color: #e0e0e0;
  border-color: #e0e0e0;
  color: #6c757d;
  cursor: not-allowed;
}
#confirmButton {
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  border-radius: 0.2rem;
  color: white;
  background-color: rgba(39, 39, 42, 0);
  border: 1px solid rgba(39, 39, 42, 0);
  cursor: pointer;
  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;
  font-family: "IRANYekanMedium" !important;
}

#confirmButton:focus {
  outline: none;
  box-shadow: 0 0 0 0.2rem rgba(38, 143, 255, 0.5); /* حاشیه آبی روشن هنگام فوکوس */
}

#confirmButton:disabled {
  background-color: #e0e0e0;
  border-color: #e0e0e0;
  color: #6c757d;
  cursor: not-allowed;
}

#chartContainer {
  position: relative;
}
.ritecl {
  direction: rtl;
}

.new-action-menu {
  position: fixed;
  top: 60px; /* بالا‌تر از دکمه */
  right: 20px;
  width: 225px;
  background: rgba(30, 30, 30, 0.9);
  backdrop-filter: blur(15px);
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
  padding: 10px;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.9) translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  border-bottom: 1px solid #ccc; /* خط پایین برای همه آیتم‌ها */
}

/* لایت مد */
.lite-mode {
  background: #d7d2cf;
  color: #000000;
}

.lite-mode .currency-card {
  background: #f8f7f5;
}
.lite-mode .currency-value {
  color: #010101;
}
.lite-mode .time {
  color: #82817f;
}
.lite-mode .ad-banner {
  background: #f8f7f5;
}
.lite-mode .ad-content h3 {
  color: #010101;
}
.lite-mode .currency-name {
  font-size: 0.875rem;
  color: #010101;
}
.lite-mode .bottom-bar {
  background-color: #e9e3e3;
}
.lite-mode .status {
  color: #423c3c;
}
.lite-mode .action-button {
  color: #100f0d;
}
.lite-mode .add-button {
  color: #100f0d;
}
.lite-mode .modal-content {
  background-color: #ffffff;
}
.lite-mode .modal-value {
  color: #040404;
}
.lite-mode .modal-title {
  color: #040404;
}
.lite-mode #modal-update {
  color: #040404;
}
.lite-mode .modal-code {
  color: #8a8a8a;
}
.lite-mode #confirmButton {
  color: black;
  background-color: #e9e3e3;
  border: 1px solid #e9e3e3;
}
/* #toggle-theme {
  border: none;
  border-radius: 5px;
} */
.lite-mode .action-menu {
  background: #e9e3e3;
}
.lite-mode .action-menu li {
  border-bottom: 1px solid rgba(0, 0, 0, 0.336);
}
.lite-mode .action-menu li:last-child {
  border-bottom: none;
}
.lite-mode .add-menu {
  background: #e9e3e3;
}
.lite-mode .add-menu li {
  border-bottom: 1px solid rgba(0, 0, 0, 0.336);
}
.lite-mode .add-menu li:last-child {
  border-bottom: none;
}

/* پس‌زمینه و موقعیت لودر */
#loader {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: black;
  z-index: 9999;
}

/* تنظیمات لودر */
.loading-spinner {
  height: 40px;
  width: 40px;
  transform-origin: center;
  animation: rotate 2s linear infinite;
}

.car {
  fill: none;
  stroke: white; /* رنگ لودر سفید */
  stroke-width: 5px;
  stroke-dasharray: 80, 200;
  stroke-dashoffset: 0;
  stroke-linecap: round;
  animation: stretch 1.5s ease-in-out infinite;
}

.track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.3); /* رنگ نیمه‌شفاف برای پس‌زمینه لودر */
}

/* انیمیشن چرخش */
@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

/* انیمیشن حرکت */
@keyframes stretch {
  0% {
    stroke-dasharray: 0, 150;
    stroke-dashoffset: 0;
  }
  50% {
    stroke-dasharray: 75, 150;
    stroke-dashoffset: -25;
  }
  100% {
    stroke-dashoffset: -100;
  }
}

.delete-btn {
  position: relative;
  top: -108%;
  right: -88%;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  display: none;
  margin-bottom: -28px;
  background: #e52320;
}

.sorting-active .delete-btn {
  display: block;
}
.hidden {
  display: none;
}

.btnprime {
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  border-radius: 0.2rem;
  color: #fff;
  background-color: #007bff; /* رنگ اولیه (primary) */
  border: 1px solid #007bff; /* مرز دکمه */
  cursor: pointer;
  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;
  font-family: "IRANYekanMedium" !important;
}
