/* Reset */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: #121212;
  color: #eee;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  transition: background-color 0.3s ease, color 0.3s ease;
  user-select: none;   
  -webkit-user-select: none; 
  -moz-user-select: none;    
  -ms-user-select: none;            
}

.container {
  width: 460px;
  max-width: 100%;
  background: #1e1e1e;
  border-radius: 12px;
  padding: 28px 32px;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.7);
}

h3 {
  margin: 0 0 24px 0;
  font-weight: 700;
  font-size: 1.6rem;
  text-align: center;
  color: #f0f0f0;
  margin-bottom: 30px;
}


.lang-switcher {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  align-items: center;
  gap: 10px;
  color: #bbb;
  font-weight: 600;
}

.lang-switcher select {
  background-color: #2c2c2c;
  border: none;
  color: #eee;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  outline: none;
  transition: background-color 0.3s ease;
}

.lang-switcher select:hover {
  background-color: #3a3a3a;
}

.test-section{
    margin: 30px auto;
}

.input-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
}

label {
  font-weight: 600;
  margin-bottom: 6px;
  color: #ccc;
  user-select: none;
}

input {
  padding: 10px 14px;
  border-radius: 8px;
  border: 1.8px solid #444;
  background-color: #222;
  color: #eee;
  font-size: 1rem;
  outline-offset: 3px;
  outline-color: transparent;
  transition: outline-color 0.2s ease-in-out, border-color 0.3s ease;
}

input::placeholder {
  color: #666;
}

input:focus {
  outline-color: #ffffff;
  border-color: #ffffff;
}

/* RTL for Persian */
body.rtl {
  direction: rtl;
}

body.rtl label {
  text-align: right;
}

body.rtl .lang-switcher {
  justify-content: flex-start;
}
/* -------------------------------- */

  #custom-section {
    width: 100%;
    margin: 30px auto;
    padding: 25px;
    border-radius: 10px;
    font-family: "Vazir", sans-serif;
    color: #333;
  }

  #custom-section h3 {
    text-align: center;
    color: #ffffff;
    margin-bottom: 30px;
  }

  h4{
     color: #ffffff;
  }
  .custom-switch {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #12121221;
    padding: 12px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
}

  .custom-switch label {
    font-weight: 400;
    font-size: 13px;
    user-select: none;
    color: #ffffff;
  }

  /* همان استایل سوییچ قبلی */
  .switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
  }

  .switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }

  .slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 13px;
  }

  .slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
  }

  .switch input:checked + .slider {
    background-color: #4a90e2;
  }

  .switch input:checked + .slider:before {
    transform: translateX(24px);
  }

  #config-output {
    background: #2d2d2d;
    color: #ccc;
    padding: 15px;
    border-radius: 8px;
    height: 150px;
    overflow-y: auto;
    font-family: "Source Code Pro", monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    user-select: text;
    white-space: pre-wrap;
    word-wrap: break-word;
  }

  #copy-config, #Test-Console {
    margin-top: 12px;
    background-color: #4a90e2;
    color: white;
    border: none;
    padding: 10px 18px;
    font-size: 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
  }

  #copy-config, #Test-Console:hover {
    background-color: #6aa7ed;
  }

  #Test-Console:disabled {
    background-color: #555 !important;  
    color: #aaa !important;             
    cursor: not-allowed !important;    
    pointer-events: none !important;   
    box-shadow: none !important;       
    transition: none !important;        
  }

  /* -------------------------------- */

    /* تب‌های بالا */
    .tabs {
      display: flex;
      justify-content: center;
      gap: 12px;
      margin-bottom: 20px;
    }

    .tab-button {
      padding: 10px 20px;
      background-color: #2c2c2c;
      border-radius: 8px;
      border: none;
      color: #ccc;
      font-weight: 600;
      cursor: pointer;
      transition: background-color 0.3s ease, color 0.3s ease;
    }

    .tab-button.active {
      background-color: #4a90e2;
      color: white;
      box-shadow: 0 2px 8px rgba(74, 144, 226, 0.7);
    }

    /* کانتینر بخش‌ها */
    .tab-content {
      display: none;
    }

    .tab-content.active {
      display: block;
    }



@media (max-width: 600px) {
  html {
    font-size: 14px; /* کوچک‌تر کردن فونت پایه */
  }

  body {
    padding: 10px;
    font-size: 0.95rem;
  }

  h1, h2, h3, h4 {
    font-size: 1rem;
  }

  label,
  .tab-button,
  #lang-select,
  input,
  button,
  pre {
    font-size: 12px !important;
  }

  input::placeholder {
    font-size: 0.85rem;
  }


  .tab-button {
    padding: 6px 10px;
  }

  .lang-switcher {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
  }

  .input-group {
    margin-bottom: 15px;
  }

  pre#config-output {
    font-size: 0.8rem;
    white-space: pre-wrap;
    word-break: break-word;
    overflow-x: auto;
  }

  .custom-switch {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    font-size: 5px !important;
    gap: 10px;
    margin-bottom: 15px;
  }

  #config-output{
     overflow: hidden !important;
  }

}

/* ------------------------------------- */

   #modalOverlay {
    display: none; 
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    justify-content: center;
    align-items: center;
  }
  #modalBox {
    background: #1e1e1e;
    box-shadow: 0 8px 24px rgb(0 0 0 / 0.7);
    padding: 20px 30px;
    border-radius: 8px;
    max-width: 400px;
    text-align: center;
  }
  #modalBox button {
    margin-top: 15px;
    padding: 8px 20px;
    border: none;
    background: #007bff;
    color: white;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
  }
  #modalBox button:hover {
    background: #0056b3;
  } 

.hidden {
  display: none !important;
}

