    /* انیمیشن چرخش بی‌نهایت */
    @keyframes spin {
      from {
        transform: rotate(0deg);
      }

      to {
        transform: rotate(360deg);
      }
    }
    #calc-spinner.spinning {
      display: inline-block !important;
      animation: spin 1s linear infinite;
    }
    .stat {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      cursor: pointer;
      transition: all 0.2s;
    }
    .stat i {
      transition: transform 0.2s, color 0.2s;
    }
    .stat:hover i {
      transform: scale(1.15);
      color: #000;
    }
    /* 🔖 ACTION BAR */
    .tool-actions {
      background: #fafafa;
      border: 1px solid #eee;
      border-radius: 12px;
      padding: 10px 16px;
      margin-bottom: 1rem;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    }
    .tool-meta {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }
    .btn-action {
      background: none;
      border: 0;
      padding: 4px 6px;
      cursor: pointer;
      transition: transform 0.2s ease, color 0.2s ease;
    }
    .btn-action:hover i {
      transform: scale(1.2);
      color: #0d6efd;
    }
    .share-buttons i {
      font-size: 1.2rem;
      opacity: 0.7;
      transition: opacity 0.2s, transform 0.2s;
    }
    .share-buttons i:hover {
      opacity: 1;
      transform: scale(1.2);
    }
    /* پیام کوچک گوشه بالا */
    .popup-message {
      position: fixed;
      top: 15px;
      right: 15px;
      background: #222;
      color: #fff;
      padding: 10px 18px;
      border-radius: 10px;
      font-size: 0.9rem;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
      opacity: 0;
      transform: translateY(-15px);
      transition: all 0.4s ease;
      z-index: 9999;
    }
    .popup-message.show {
      opacity: 1;
      transform: translateY(0);
    }
    @media (max-width: 576px) {
      .share-buttons i {
        font-size: 1.1rem;
      }
      .stat span {
        font-size: 0.9rem;
      }
    }
    mjx-container[jax="SVG"][display="true"] {
      text-align: start !important;
    }
  .value-updated {
    position: relative;
    display: inline-block;
  }
  .value-updated::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 0;
    height: 2px;
    background: #212529;
    transition: width 0.5s ease-out;
    pointer-events: none;
  }
  .value-updated.animate::after {
    width: 100%;
  }
  /* محو شدن بعد از انیمیشن */
  .value-updated.fade::after {
    opacity: 0;
    transition: opacity 0.3s ease;
  }
/* فقط این CSS رو اضافه یا جایگزین کن */
.ads-section {
  position: relative;
  min-height: 300px; /* ارتفاع دلخواه */
  overflow: hidden; /* خیلی مهمه! */

    width: 100%;
    padding: 20px 5% 56px;
    margin: 0 auto;
    overflow: hidden;
    box-sizing: border-box;
    background: linear-gradient(145deg, #fdfdfd 0%, #f8faff 40%, #f0f5ff 100%), radial-gradient(circle at 30% 30%, rgba(220, 235, 255, 0.4) 0%, transparent 50%), radial-gradient(circle at 70% 70%, rgba(200, 225, 255, 0.3) 0%, transparent 50%);
    box-shadow: 0 20px 20px rgba(82, 98, 248, 0.09), 0 12px 20px rgba(94, 83, 253, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: all 0.6s ease;
}

canvas#webgl-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1; /* پشت عکس و متن باشه */
  pointer-events: none; /* تا کلیک روی عکس و متن مشکلی نداشته باشه */
}


