  :root {
      --digikala-red: #ef394e;
      --text: #2e2e2e;
      --muted: #666;
      --card-bg: #fff;
  }

  * {
      box-sizing: border-box;
      font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
  }

  body {
      font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
      margin: 0;
      color: var(--text);
      background: #fafafa
  }


  /* Header / Hero */
  header {
      background: linear-gradient(180deg, var(--digikala-red) 0%, #e63a48 100%);
      color: #fff;
      padding: 2.2rem 1rem 3rem;
      text-align: center;
  }

  header h1 {
      margin: 0 0 .6rem;
      font-family: 'Vazirmatn', Tahoma, sans-serif;
      font-weight: 700;
      /* improved large, modern headline */
      font-size: clamp(1.6rem, 4.5vw, 2.6rem);
      letter-spacing: .6px;
      line-height: 1.1;
      text-rendering: optimizeLegibility;
      margin-block: 1rem;

  }

  .hero-sub {
      opacity: .95;
      margin-block: 2rem;
  }




  .hero-input {
      max-width: 980px;
      margin: 0 auto;
      display: flex;
      gap: .6rem;
      padding: 0 1rem;
      align-items: center;
      justify-content: center
  }

  .hero-input form {
      width: 100%;
      display: flex;
      gap: .6rem;
      align-items: center
  }

  .hero-input input[type="text"] {
      flex: 1;
      padding: 1rem 1rem;
      border-radius: 12px;
      border: 2px solid rgba(255, 255, 255, .15);
      background: rgba(255, 255, 255, .12);
      color: #fff;
      font-size: 1rem;
  }

  .hero-input input::placeholder {
      color: rgba(255, 255, 255, .8)
  }

  .hero-input button {
      padding: 0.9rem 1.2rem;
      border-radius: 12px;
      border: 0;
      background: #fff;
      color: var(--digikala-red);
      font-weight: 600;
      cursor: pointer
  }

  .hero-input button:hover {
      opacity: .95
  }

  main {
      width: min(160ch, 100%);
      margin-inline: auto;
      min-height: 100svh;
  }

  .form-container {
      margin-bottom: 20px;

  }

  .images-container {
      margin-top: 20px;
      padding: 1rem;
  }

  .image-wrapper {
      position: relative;
      display: inline-block;
      margin: 8px;
      max-width: 400px;
      border: 1px solid rgb(180, 180, 180);
  }

  .image-wrapper img {
      max-width: 100%;
      display: block;
  }

  .download-btn {
      position: absolute;
      top: 8px;
      right: 8px;
      background: rgba(0, 0, 0, 0.6);
      color: #fff;
      padding: 5px;
      text-decoration: none;
      border-radius: 3px;
      cursor: pointer;
  }

  .download-btn .material-symbols-outlined {
      vertical-align: middle;
  }

  .main-images img {
      width: 100%;
      display: block;
      margin-bottom: 10px;
  }

  .list-images img {
      max-width: 150px;
      display: inline-block;
      margin: 5px;
  }

  .buttons-container {
      margin-top: 20px;

  }

  .buttons-container a {
      display: inline-block;
      margin: 5px;
      padding: 10px 15px;
      background: #007bff;
      color: #fff;
      text-decoration: none;
      border-radius: 5px;
  }

  .buttons-container a:hover {
      background: #0056b3;
  }

  .top {
      display: flex;
      justify-content: space-between;
      align-items: center;
  }

  .top a button {

      padding: 0.6rem 2rem;
      border-radius: 2rem;
      background-color: rgb(44, 44, 44);
      color: white;
      cursor: pointer;
      border: none;
  }

  .top a button:hover {
      background-color: white;
      color: black;
      border: 1px solid rgb(66, 66, 66);
  }

  input {
      display: block;
      padding: 8px;
      border-radius: 2rem;
      border: 1px solid rgb(126, 126, 126);
      width: 100%;
      color: rgb(66, 66, 66);
      outline: none;
  }

  form button {
      padding: 0.6rem 2rem;
      border-radius: 2rem;
      background-color: rgb(44, 44, 44);
      cursor: pointer;
      color: white;
      font-weight: 900;
      border: none;
  }

  form button:hover {
      background-color: white;
      color: black;
      border: 1px solid rgb(66, 66, 66);
  }

  /* Modal styles for image editing */
  #editModal {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      background: rgba(0, 0, 0, 0.7);
      display: none;
      align-items: center;
      justify-content: center;
      z-index: 1000;
  }

  #editModal .modal-content {
      background: #fff;
      padding: 20px;
      border-radius: 8px;
      position: relative;
      text-align: center;
  }

  #editModal canvas {
      border: 1px solid #ccc;
      cursor: crosshair;
  }

  #editModal .modal-buttons {
      margin-top: 10px;
  }

  #editModal button {
      margin: 0 5px;
      padding: 8px 12px;
      cursor: pointer;
      border-radius: 4px;
      background: #f0f0f0;
      transition: background 0.3s;
      border: none;
  }

  #editModal .cmodal {
      background: rgb(66, 66, 66);
      color: white;
  }

  #editModal .smodal {
      background: #007bff;
      color: white;
  }

  #editModal .cmodal:hover {
      background: rgb(163, 0, 0);
  }

  #editModal .smodal:hover {
      background: #026cdd;
  }

  /* New style for the edit button so it appears beside the download button */
  .edit-btn {
      position: absolute;
      top: 8px;
      right: 50px;
      background: rgba(0, 0, 0, 0.6);
      color: #fff;
      padding: 5px;
      text-decoration: none;
      border-radius: 3px;
      cursor: pointer;
  }

  .edit-btn .material-symbols-outlined {
      vertical-align: middle;
  }

  footer {
      width: min(160ch, 100%);
      margin-inline: auto;
  }

  footer p {
      font-size: 0.8rem;
      color: rgb(80, 80, 80);
      border-top: 1px solid rgb(180, 180, 180);
      padding-top: 1rem;
  }

  .line {

      color: #b8b8b8;
      margin-block: 1rem;
      border-style: dashed;
      border-width: 1px;
  }

  section {
      width: min(1200px, 95%);
      margin: 3rem auto;
      text-align: center;
  }

  section h2 {
      color: var(--digikala-red);
      margin-bottom: 1rem;
  }

  .benefits {
      display: grid;
      gap: 1.5rem;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }

  .benefit {
      background: #fff;
      padding: 2rem;
      border-radius: 1rem;
      box-shadow: 0 3px 10px rgba(0, 0, 0, 0.07);
  }

  .benefit span {
      font-size: 2rem;
      margin-bottom: 0.5rem;
      display: block;
      color: #007bff;
  }


  .faq {
      text-align: right;
  }

  .faq details {
      background: #fff;
      margin: 0.5rem 0;
      padding: 1rem;
      border-radius: 0.5rem;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
      cursor: pointer;
  }

  footer {
      text-align: center;
      padding: 2rem 1rem;
      font-size: 0.9rem;
      color: #555;

      margin-top: 3rem;
  }

  #tutorial {
      text-align: right;
      margin-top: 3rem;
  }

  .tutorial-steps {
      list-style: none;
      padding: 0;
  }

  .tutorial-steps li {
      display: flex;
      align-items: flex-start;
      gap: 0.8rem;
      margin-bottom: 1rem;
      background: #f9f9f9;
      padding: 1rem;
      border-radius: 0.8rem;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  }

  .tutorial-steps li span {
      font-size: 2rem;
      color: #007bff;
  }

  .tutorial-tips {
      margin-top: 2rem;
      padding: 1.5rem;
      border-radius: 1rem;
      background: #eef6ff;
      border: 1px solid #cde1ff;
      text-align: right;
  }

  .tutorial-tips h3 {
      margin-bottom: 0.8rem;
      color: #0056b3;
  }


  @media (max-width: 769px) {
      .hero-input form {
          flex-direction: column;
      }

      .hero-input form button {
          width: 100%;
      }
  }