html, body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', Arial, sans-serif;
    background: #f4f7fa;
    color: #222;
    min-height: 100vh;
  }
  .box {
    max-width: 800px;
    margin: 8px auto 0 auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    padding: 28px 28px 18px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  h1 {
    font-size: 1.7em;
    font-weight: 700;
    margin: 0 0 8px 0;
    text-align: center;
  }
  .desc {
    color: #4a5a6a;
    font-size: 1.08em;
    margin-bottom: 18px;
    text-align: center;
  }
  .form-group {
    width: 100%;
    margin-bottom: 18px;
    text-align: center;
  }
  label {
    font-weight: 600;
    margin-bottom: 7px;
    display: block;
    color: #2a7ae2;
    text-align: center;
  }
  #quality {
    display: block;
    margin: 0 auto;
    max-width: 220px;
    width: 100%;
}
  .upload-area {
    border: 2px dashed #b5c7d3;
    border-radius: 10px;
    background: #f8fafc;
    padding: 28px 0;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
    margin-bottom: 8px;
    position: relative;
  }
  .upload-area.dragover {
    border-color: #2a7ae2;
    background: #eaf3fb;
  }
  .upload-icon {
    font-size: 2.2em;
    margin-bottom: 6px;
  }
  .upload-text {
    color: #4a5a6a;
    font-size: 0.8em;
  }
  input[type="file"] {
    display: none;
  }
  .filename {
    font-size: 0.98em;
    color: #2a7ae2;
    margin-bottom: 6px;
    word-break: break-all;
    text-align: center;
  }
  .preview {
    margin-bottom: 8px;
    text-align: center;
  }
  .preview img {
    max-width: 100%;
    max-height: 180px;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.07);
  }
  .message {
    color: #04AA6D;
    font-size: 0.98em;
    min-height: 18px;
    margin-bottom: 4px;
    text-align: center;
  }
  .message:not(.success) {
    color: #64748b;
}
.success {
    color: #22c55e;
}
  select, button {
    font-family: inherit;
    font-size: 1em;
    border-radius: 7px;
    border: 1px solid #b5c7d3;
    padding: 8px 12px;
    outline: none;
    margin-top: 4px;
    margin-bottom: 0;
    background: #f8fafc;
    transition: border-color 0.2s;
    display: block;
    margin-left: auto;
    margin-right: auto;
  }
  select:focus, button:focus {
    border-color: #2a7ae2;
  }
  .action-row {
    display: inline-flex;
    gap: 4px;
    margin: 18px 0 0 0;
  }
  button {
    background: #2a7ae2;
    color: #fff;
    border: none;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 18px;
    box-shadow: 0 1px 4px rgba(42,122,226,0.07);
    transition: background 0.2s;
  }
  button.secondary-btn {
    background: #eaf3fb;
    color: #2a7ae2;
    border: 1px solid #b5c7d3;
  }
  button:active {
    background: #1a5bb8;
  }
  button.secondary-btn:active {
    background: #d6e7f7;
  }
  #about-tool, #faq-section {
    width: 100%;
    margin: 36px 0 0 0;
    padding: 32px 32px 24px 32px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.07);
    font-size: 1.08em;
    color: #222;
    line-height: 1.7;
    box-sizing: border-box;
    text-align: left;
  }
  #faq-section {
    background: #f8fafd;
    margin-top: 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  }
  #about-tool h2, #faq-section h2 {
    text-align: center;
    margin-bottom: 18px;
    font-size: 1.4em;
    font-weight: 700;
    letter-spacing: 0.01em;
  }
  #about-tool h3 {
    margin-top: 24px;
    font-size: 1.15em;
    font-weight: 600;
    color: #2a7ae2;
  }
  #about-tool ul, #about-tool ol, #faq-section ul, #faq-section ol {
    margin-left: 1.2em;
    margin-bottom: 18px;
    padding-left: 0.5em;
  }
  #about-tool ul li, #about-tool ol li, #faq-section ul li, #faq-section ol li {
    margin-bottom: 7px;
  }
  .faq-item {
    margin-bottom: 18px;
  }
  .faq-item strong {
    display: block;
    color: #2a7ae2;
    margin-bottom: 2px;
  }
  #about-tool p, #about-tool ul, #about-tool ol, #faq-section p, #faq-section ul, #faq-section ol, #faq-section .faq-item div {
    text-align: left;
  }
  @media (max-width: 700px) {
    .box {
      max-width: 98vw;
      padding: 16px 5vw 12px 5vw;
    }
    #about-tool, #faq-section {
      width: 100%;
      padding: 16px 5vw 16px 5vw;
      font-size: 1em;
    }
    h1 {
      font-size: 1.18em;
    }
    .logo-header {
      width: 38px;
      height: 38px;
    }
    .action-row {
      flex-direction: column;
      gap: 8px;
    }
    button, select {
      width: 100%;
      font-size: 1em;
      /*padding: 10px 0;*/
    }
  }
  @media (max-width: 480px) {
    .box {
      padding: 8px 4vw 8px 4vw;
    }
    #about-tool, #faq-section {
      padding: 10px 4vw 10px 4vw;
    }
  }

  .btn {
    background-color: #04AA6D; /* Green */
    border: none;
    color: white;
    padding: 16px 32px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 4px 2px;
    transition-duration: 0.4s;
    cursor: pointer;
  }
  
  .btn1 {
    background-color: white; 
    color: black; 
    border: 2px solid #04AA6D;
  }
  
  .btn1:hover {
    background-color: #04AA6D;
    color: white;
  }
  
  .btn2 {
    background-color: white; 
    color: #008CBA; 
    border: 2px solid #008CBA;
  }
  
  .btn2:hover {
    background-color: #008CBA;
    color: white;
  }
  
  .btn3 {
    background-color: white; 
    color: black; 
    border: 2px solid #f44336;
  }
  
  .btn3:hover {
    background-color: #f44336;
    color: white;
  }
  
  .btn4 {
    background-color: white;
    color: black;
    border: 2px solid #e7e7e7;
  }
  
  .btn4:hover {background-color: #e7e7e7;}
  
  .btn5 {
    background-color: white;
    color: black;
    border: 2px solid #555555;
  }
  
  .btn5:hover {
    background-color: #555555;
    color: white;
  }

  .spinner-bgremove {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 160px;
    width: 100%;
}
.spinner-bgremove .loader {
    border: 4px solid #e0e7ff;
    border-top: 4px solid #6366f1;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    50% { transform: translateX(6px); }
    75% { transform: translateX(-6px); }
    100% { transform: translateX(0); }
}

#popup-error {
    position: fixed;
    top: 32px;
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    max-width: 90vw;
    z-index: 9999;
    display: none;
    pointer-events: none;
}
.popup-error-content {
    background: #ef4444;
    color: #fff;
    padding: 16px 32px;
    border-radius: 10px;
    font-size: 1.08rem;
    font-weight: 600;
    box-shadow: 0 4px 24px #ef444455;
    text-align: center;
    animation: fadeInPopup 0.2s;
    pointer-events: auto;
}
@keyframes fadeInPopup {
    from { opacity: 0; transform: translateY(-20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.logo-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
  }
  .logo-header {
    width: 54px;
    height: 54px;
    display: block;
  }
  .logo-title {
    font-size: 2em;
    font-weight: 700;
    color: #2a7ae2;
    letter-spacing: 0.5px;
    font-family: 'Inter', Arial, sans-serif;
    position: relative;

  }
  @media (max-width: 700px) {
    .logo-header {
      width: 38px;
      height: 38px;
    }
    .logo-title {
      font-size: 1.08em;
    }
  }