body {
  margin: 0;
  direction: rtl;
  background-color: #f5f5f5;
  /* padding-top: 180px; */
  padding-top: 60px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Vazirmatn', sans-serif;
}

html,
body {
  height: 100%;
  overflow: hidden;
  direction: rtl;
  background: #f5f5f5;
}

.fixed-header {
  position: fixed;
  top: 0;
  width: 100%;
  background-color: #1e2a38;
  color: white;
  padding: 10px;
  z-index: 1000;
}

/* هدر با ورود نرم از راست */
.slide-in-right {
  opacity: 0;
  transform: translateX(60px);
  animation: slideRight 1.2s ease-out forwards;
}

@keyframes slideRight {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* حالت دسکتاپ */
.desktop-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.desktop-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-color: #263544;
  padding: 10px;
  border-radius: 12px;
  justify-content: center;
  text-align: center;
}

.top-cell{
  font-size: 1.39rem;
  font-weight: bold;
}

.bottom-cell {
  font-size: 1.0rem;
  font-weight: bold;
}

/* حالت موبایل */
.mobile-header {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.mobile-box {
  display: flex;
  justify-content: space-between;
  background-color: #263544;
  width: 100%;
  /* height: 70px; */
  height: 50px;
  text-align: center;  
  box-shadow: 
    5px 4px 8px rgba(0, 0, 0, 0.1),
    10px 8px 20px rgba(0, 0, 0, 0.2);
}

.right-part, .left-part{
  flex: auto;
  font-weight: bold;
  padding:5px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-shadow:
    5px 4px 8px rgba(0, 0, 0, 0.1),
    10px 8px 20px rgba(0, 0, 0, 0.2);  
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.1),
    0 8px 20px rgba(0, 0, 0, 0.2);
}

.right-part{
  font-size: 1.1rem;
}

.left-part {
  font-size: 0.9rem;
}

/* دایره‌ها */
.circle-row {
  display: flex;
  display: none;
  flex-wrap: nowrap;
  gap: 16px;
  overflow-x: auto;
  padding: 10px;
  -webkit-overflow-scrolling: touch;
}

.circle-row::webkit-scrollbar {
  display: none;
}

.circle {
  position: relative;
  flex: 0 0 auto;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: #f0f6ff;
  /* زمینه روشن */
  border: 4px solid #1f7aff;
  /* حاشیه برند */
  color: #253040;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.5;
  padding: 5px;
  font-size: 1.5;
  font-weight: bold;
  cursor: pointer;
}

/* SVG progress ring */
.progress-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg); /* شروع از بالا */
}

.progress-ring circle {
  fill: transparent;
  stroke: #1f7aff;
  stroke-width: 6;
  stroke-dasharray: 283; /* محیط دایره */
  stroke-dashoffset: 283;
  transition: stroke-dashoffset linear;
}

.circle.active .progress-ring circle {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 5s linear; /* پر شدن در ۵ ثانیه */
}

.overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(30, 42, 56, 0.9);
  display: none;
  z-index: 998;
}

.story {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  color: #111;
  padding: 24px;
  border-radius: 12px;
  font: 500 18px/1.5 system-ui, sans-serif;
  text-align: center;
  max-width: 80%;
  z-index: 999;
  display: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translate(-50%, -48%); }
  to   { opacity: 1; transform: translate(-50%, -50%); }
}

/* واکنش‌گرا برای موبایل */
@media (max-width: 768px) {
  .desktop-header {
    display: none;
  }

  #desktopDevNotice {
    display: none;
  }

  .fixed-header{
    padding: 0;
  }

  .mobile-header {
    display: block;
  }
  
  .circle {
    width: 75px;
    height: 75px;
    font-size: 0.8rem;
  }

  .site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1e2a38;
    color: white;
    padding: 30px 20px;
    font-size: 0.9rem;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
  }

  .footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
}

/* حالت دسکتاپ: بالای 769 */
@media (min-width: 769px) {
  main {
    display: none; /* مخفی کردن تب‌ها */
  }

  #desktopDevNotice {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: #F5F5F5;
  }

  #desktopDevNotice p {
    background: white;
    padding: 20px 40px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    font-size: 1.5rem;
    font-weight: bold;
    color: #00ACC1;
    margin-top: 15px;
    /* display: none; */
  }

  .dev-logo {
    width: 150px;
    height: auto;
    margin-top: -30%;
  }
}

main {
  height: calc(100% - 7%);
  position: relative;
  overflow: hidden;
}

.tab {
  display: flex;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  gap: 10px;
  padding: 10px;   
  opacity: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  position: absolute;
  transform: translateX(100%);
  transition: all 0.5s ease;
}

.tab.active {
  opacity: 1;
  transform: translateY(0);
  position: relative;
  z-index: 1;
}

.card {
  background: white;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 500px;
  height: -webkit-fill-available;
}

.hep-banner {
  width: 100%;
  border-radius: 12px;
}

.card button {
  margin-top: 10px;
  padding: 10px 20px;
  background: #00acc1;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.copyright-card {
  border-radius: 12px;
  text-align: center;
  font-size: 0.8rem;
  height: auto;
}

.copyright-card p {
  color: #aaa;
  margin-top: 8px;
}

.call-btn {
  display: inline-block;
  margin-top: 12px;
  background: #00ACC1;
  color: #fff;
  padding: 5px 15px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.3s ease;
}

.call-btn:hover {
  background: #008B9A;
  transform: translateY(-2px);
}

input,
select {
  width: 100%;
  margin-top: 10px;
  padding: 4px;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.form-row {
  display: flex;
  gap: 10px;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
}


.form-group label {
  margin-bottom: -10px;
  /* فاصله کمتر بین عنوان و ورودی */
  font-size: 0.9rem;
  color: #333;
}

.error-message {
  color: red;
  font-size: 0.85rem;
  margin-top: 4px;
}

input.error,
select.error {
  border: 1px solid red;
  /* وقتی خطا باشه */
}

.input-with-suffix {
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-with-suffix input {
  flex: 1;
}

.input-with-suffix .suffix {
  color: #555;
  font-size: 0.9rem;
  white-space: nowrap;
}

/* استایل خطا قبلی همچنان کار می‌کند */
input.error {
  border: 1px solid gold;
  background-color: #ffe6e6;
}

.thank-story {
  position: fixed;
  top: 40%;
  left: 10%;
  right: 10%;
  background: rgba(0, 172, 193, 0.95);
  color: white;
  padding: 20px 30px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  font-size: 1rem;
  text-align: center;
  z-index: 999;
  display: none;
  cursor: pointer;
}

.story-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 10px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -10%);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translate(-50%, -10%);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

footer {
  height: 8%;
  background: #1E2A38;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;
  padding-bottom: 5px;
}

footer button {
  background: none;
  border: none;
  color: #eee;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  /* padding: 10px; */
  padding: 0 5px 5px 10px;
  transition: color 0.3s ease;
}

footer button:hover {
  color: #00ACC1;
}

footer button.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #00ACC1;
  border-radius: 2px;
}

/* حالت تاریک */
@media (prefers-color-scheme: dark) {
  body {
    background-color: #121212;
    color: #ffffff;
  }

  header, footer {
    background-color: #1f1f1f;
  }

  .box {
    background-color: #2a2a2a;
  }
}

/* کلاس‌های دستی برای تغییر پویا */
body.dark {
  /* background-color: #1f1f1f; */
  background: rgba(30, 42, 56, 0.9);
  /* color: #ffffff; */
}

body.dark .card {
  background: rgba(30, 42, 56, 0.9);
  color: rgba(196, 208, 223, 0.92);
}

body.dark .card button {
  background: rgba(14, 18, 24, 0.9);
}

body.dark .overlay {
  background-color: rgba(13, 17, 22, 0.9);
}

body.dark .story,
body.dark .thank-story {
  background: rgba(3, 4, 5, 0.9);
  color: white;
}

body.dark header,
body.dark footer {
  /* background-color: #1f1f1f; */
  background: rgba(30, 42, 56, 0.9);
}

body.dark .box {
  background-color: #2a2a2a;
}

body.light {
  background-color: #f5f5f5;
  color: #000000;
}

body.light header,
body.light footer {
  background-color: #1e2a38;
  color: white;
}

body.light .box {
  background-color: #e0e0e0;
}