@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;600&display=swap');

@media (min-width: 768px) {
  body {
    font-size: 16px;
  }
  .column {
    width: 50%;
    float: left;
  }
}

/* Medium devices (desktops, 992px and up) */
@media (min-width: 992px) {
  body {
    font-size: 18px;
  }
  .column {
    width: 33.33%;
    float: left;
  }
}

/* Large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  body {
    font-size: 20px;
  }
  .column {
    width: 25%;
    float: left;
  }
}

/* Extra extra large devices (large desktops, 1400px and up) */
@media (min-width: 1400px) {
  body {
    font-size: 22px;
  }
  .column {
    width: 20%;
    float: left;
  }
}

/* Landscape phones and smaller */
@media (max-width: 480px) {
  body {
    font-size: 12px;
  }
  .column {
    width: 100%;
  }
  /* اینجا می‌تونی استایل‌های مخصوص صفحات خیلی کوچیک رو اضافه کنی */
}

/* iPhone 6/7/8 */
@media only screen and (min-device-width: 375px) and (max-device-width: 667px) and (-webkit-min-device-pixel-ratio: 2) {
  /* استایل‌های مخصوص آیفون 6/7/8 */
  body {
    font-size: 15px;
  }
}

/* iPhone 6/7/8 Plus */
@media only screen and (min-device-width: 414px) and (max-device-width: 736px) and (-webkit-min-device-pixel-ratio: 3) {
  /* استایل‌های مخصوص آیفون 6/7/8 پلاس */
  body {
    font-size: 16px;
  }
}

/* iPhone X, 11 Pro */
@media only screen and (min-device-width: 375px) and (max-device-width: 812px) and (-webkit-min-device-pixel-ratio: 3) {
  /* استایل‌های مخصوص آیفون X */
  body {
    font-size: 16px;
  }
}

/* iPad */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 2) {
  /* استایل‌های مخصوص آیپد */
  body {
    font-size: 17px;
  }
  .column {
    width: 50%;
    float: left;
  }
}

/* Desktops and laptops */
@media only screen and (min-width: 1024px) {
  /* استایل‌های مخصوص دسکتاپ */
  body {
    font-size: 18px;
  }
  .column {
    width: 25%;
    float: left;
  }
}

/* Large screens */
@media only screen and (min-width: 1200px) {
  /* استایل‌های مخصوص صفحه‌نمایش‌های بزرگ */
  body {
    font-size: 19px;
  }
}
body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: #0f172a;
    color: #94a3b8;
    margin: 0;
    padding: 0;
}
.snippet-card {
    background-color: #1e293b;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    margin-bottom: 1.5rem;
    position: relative;
    padding: 1rem;
    overflow: hidden;
}
/* بخش بالایی کارت */
.top- {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}
/* سرچ */
.searchinput {
    height: 2.5em;
    width: min(60em, 100vw);
    border: 0.2em solid #1e293b;
    border-radius: 1em;
    margin-bottom: 1.5em;
    margin-top: 0.5em;
    padding: 0 1em;
    outline: none;
    background-color: #0f172a;
    color: #e2e8f0;
}
/* دکمه کپی */
.copy-btn {
    border-radius: 1em;
    background-color: #94a3b8;
    width: 4.5em;
    height: 2.2em;
    border: none;
    cursor: pointer;
    transition: 300ms;
    color: #0f172a;
    font-weight: bold;
}
.copy-btn:hover {
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.35);
    transform: translateY(-1px);
}
/* گرید کارت‌ها */
.cart {
    display: flex;
    justify-content: space-around;
    gap: 0.5em;
    flex-wrap: wrap;
    align-items: flex-start;
}
/* استایل Prism و باکس کد */
.snippet-card pre {
    background-color: #1e293b !important;
    padding: 1rem !important;
    border-radius: 0 0 12px 12px !important;
    margin: 0 !important;
    max-height: 260px;   /* ارتفاع محدود */
    overflow: auto;      /* اسکرول عمودی و افقی */
    white-space: pre;    /* حفظ ساختار کد */
}
/* اگر کد داخل code هم باشد */
.snippet-card pre code {
    white-space: pre;
    direction: ltr;
    display: block;
}
/* خود باکس کد */
.code-block {
    max-height: 260px;
    overflow: auto;
    white-space: pre;
    direction: ltr;
}
.tags-container {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.tag {
    background: #334155;
    color: #94a3b8;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
}
.tag:hover {
    background: #475569;
    color: white;
}
.top-bar {
  display: flex;
  justify-content: space-around;
  align-items: center;
  margin-top: 0.3em;
  margin-bottom: 0.2em;
  border-radius: 1em;
  height: 1.8em;
  
}
a {
  text-decoration: none;
  color: #94a3b8;
  transition-duration: 300ms;
}
a:hover {
  color: #c0d0e5;
}
.bar-name {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #1e293b;
  height: 7em;
  margin-bottom: 0.3em;
}
@keyframes typing {
  from { width: 0; }
  to { width: 8ch; } /* تعداد حروف متن */
}

@keyframes blink {
  from, to { border-color: transparent; }
  50% { border-color: #94a3b8; }
}

.nilicode {
  font-size: 3em;
  overflow: hidden;
  white-space: nowrap;
  width: 0;
  animation: 
    typing 1s steps(8) forwards,
    blink 0.75s step-end infinite;
}
@keyframes sweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.body--- {
  display: flex;
  justify-content: center;
  align-items: center;
}
.card-- {
  margin-top: 2em;
  display: flex;
  justify-content: center;
  background-color: #1e293b;
  border-radius: 1em;
  width: 30em;
  height: 40em;
  transition-duration: 300ms;
}
.card--:hover {
    box-shadow: 0em 0em 20px #1e293b;
}
.en{
  font-family: 'Consolas', 'Courier New', monospace; /* فونت مخصوص کد */
  direction: rtl; /* جهت متن را از چپ به راست تنظیم می‌کند */
  unicode-bidi: embed; /* از بهم ریختگی جلوگیری می‌کند */
  border-radius: 4px;
}
.p-- {
  direction: rtl;
  padding: 1em;
}