* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
}

.header {
      background-color: #31bb9a;
      padding: 15px 0;
    }

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.l_title {
  font-family: 'Ubuntu Condensed', sans-serif;
  font-size: 2em;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.highlight {
  color: #fff9c4;
}

.nav-section {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.nav-link,
.dropdown-toggle,
.language-toggle {
  background: white;
  color: #31bb9a;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.3s;
}

.nav-link:hover,
.dropdown-toggle:hover,
.language-toggle:hover {
  background: #31bb9a;
  color: white;
}

.dropdown-menu,
.language-menu {
  display: none;
  position: absolute;
  background: white;
  top: 100%;
  left: 0;
  margin-top: 5px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  list-style: none;
  padding: 0;
  z-index: 100;
  min-width: 180px;
}

.dropdown-menu li,
.language-menu li {
  border-bottom: 1px solid #eee;
}

.dropdown-menu li a,
.language-menu li a {
  display: block;
  padding: 10px 15px;
  text-decoration: none;
  color: #333;
  font-size: 14px;
}

.dropdown-menu li a:hover,
.language-menu li a:hover {
  background-color: #31bb9a;
  color: white;
}

.dropdown-wrapper,
.language-wrapper {
  position: relative;
}

.dropdown-wrapper.open .dropdown-menu,
.language-wrapper.open .language-menu {
  display: block;
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    align-items: center;
  }

  .nav-section {
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 12px;
    margin-top: 10px;
  }

  .nav-link,
  .dropdown-toggle,
  .language-toggle {
    width: 90% !important;
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
    justify-content: center;
    font-size: 14px;
    padding: 8px 0px;
    display: flex;
    align-items: center;
    border-radius: 6px;
    background: white;
    color: #31bb9a;
    font-weight: 600;
    border: none;
  }

  .nav-wrapper a.dropdown-toggle {
    width: 90% !important;
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
    justify-content: center;
    font-size: 14px;
    padding: 8px 0px;
    display: flex;
    align-items: center;
    border-radius: 6px;
    background: white;
    color: #31bb9a;
    font-weight: 600;
    border: none;
  }

  .dropdown-menu,
  .language-menu {
    width: 90%;
    margin: 6px auto 0;
    position: static;
    border: 1px solid #ccc;
    background: #fff;
    box-shadow: none;
    border-radius: 4px;
  }

  .dropdown-wrapper,
  .language-wrapper,
  .nav-wrapper {
    width: 90%;
  }

  .dropdown-menu li a,
  .language-menu li a {
    padding: 10px 16px;
    font-size: 15px;
    text-align: left;
    display: block;
    color: #333;
  }

  .dropdown-menu li a:hover,
  .language-menu li a:hover {
    background-color: #31bb9a;
    color: white;
  }
}



.main-content {
    width: 1000px;
    margin: 20px auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    flex: 1;
}

.compression-control {
    background-color: #e2ffea;
    padding: 5px;
    border-radius: 10px;
}

.compression-control table {
    width: 100%;
}

.compression-label {
    width: 25%;
    text-align: right;
    color: #31bb9a;
    font-family: 'Ubuntu Condensed', sans-serif;
    padding-right: 15px;
}

.compression-slider {
    width: 50%;
}

.compression-value {
    width: 25%;
    font-size: 2em;
    color: #31bb9a;
    font-family: 'Ubuntu Condensed', sans-serif;
    padding-left: 15px;
}

.image-processing {
    margin: 20px 0;
}

.images-container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.image-section {
    width: 300px;
}

.control-section {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.mobile-upload,
.mobile-download {
    display: none;
    text-align: center;
}

.control-buttons {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 39px;
}

.format-info {
    text-align: center;
    color: #51555a !important;
    font-size: 13px;
    font-style: italic;
    font-weight: 500;
}

.control-buttons .format-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -30px;
}

.control-buttons {
    position: relative;
}

@media (max-width: 1020px) {
    .mobile-upload {
        display: block;
    }

    .mobile-download {
        display: block;
        margin-top: 20px;
    }

    .control-buttons .button-wrapper,
    .control-buttons .mybt,
    .control-section .format-info {
        display: none;
    }

    .ad-space {
        margin-bottom: 20px;
    }

    .mobile-download .mybt {
        display: inline-block;
    }
}

.button-wrapper {
    position: relative;
    overflow: hidden;
}

.button-wrapper input[type="file"] {
    position: absolute;
    top: 0;
    right: 0;
    opacity: 0;
    cursor: pointer;
}

.btn-file-input, .mybt {
    background-color: #31bb9a;
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    min-width: 120px;
    text-align: center;
}

.btn-file-input:hover, .mybt:hover {
    color: #fff;
}

.ad-space {
    width: 100%;
    min-height: 250px;
    background-color: #f5f5f5;
    border: 1px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    margin-top: auto;
}

.image-title {
    text-align: center;
    font-size: 1.1em;
    font-weight: 700;
    color: #51555a;
    margin-bottom: 5px;
}

.image-size {
    text-align: center;
    font-size: 0.9em;
    color: #51555a;
    margin-bottom: 10px;
    min-height: 20px;
}

.image-box {
    border: 6px solid #e6e6e6;
    height: 380px;
    padding: 15px;
    text-align: center;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.file-size {
    text-align: center;
    font-size: 0.9em;
    color: #31bb9a;
    margin-bottom: 5px;
}

.compressed_img {
    width: 260px;
    height: auto;
}

.file-preview, .result-preview {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: auto;
    border: 1px solid #ddd;
    padding: 10px;
    box-sizing: border-box;
}

.instructions {
    margin-top: 30px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 5px;
}

.instruction-title {
    font-size: 1.4em;
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.instructions ol {
    margin-left: 20px;
    margin-bottom: 20px;
}

.instructions ol li {
    font-size: 17px;
    margin-bottom: 8px;
    opacity: 0.7;
}

.faq-table {
    width: 100%;
    margin: 20px 0;
    border-collapse: collapse;
}

.faq-table td {
    padding: 10px;
    font-size: 0.9em;
    vertical-align: top;
}

.footer-note {
    font-size: 16px;
    line-height: 1.8;
    padding-top: 0px;
    opacity: 0.7
}

.footer {
    background-color: #31bb9a;
    border-top: 1px solid #31bb9a;
    padding: 15px 0;
    margin-top: auto;
}

.footer-content {
    width: 1000px;
    margin: 0 auto;
    text-align: center;
    color: #fff;
    font-size: 0.9em;
}

.footer-link {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s ease;
}

#various_message {
    text-align: center;
    margin: 10px 0;
    color: #f44336;
    font-size: 0.9em;
}

.form-range {
    width: 100%;
    height: 1rem;
    padding: 0;
    background-color: transparent;
    -webkit-appearance: none;
    appearance: none;
}

.form-range::-webkit-slider-thumb {
    width: 1.5rem;
    height: 1.5rem;
    margin-top: -0.25rem;
    border: 0;
    background-color: #fff;
    border-radius: 1rem;
    box-shadow: 0 0.1rem 0.25rem rgba(0, 0, 0, .1);
    -webkit-appearance: none;
}

.form-range::-webkit-slider-runnable-track {
    width: 100%;
    height: 1rem;
    color: transparent;
    cursor: pointer;
    background-color: #31bb9a;
    border-color: transparent;
    border-radius: 1rem;
}

.dl_box_right {
    margin: 15px 0;
    text-align: center;
}

.clr {
    clear: both;
}

.terms-privacy-content {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.terms-privacy-content h1 {
    color: #333;
    font-size: 2em;
    margin-bottom: 30px;
    text-align: center;
}

.terms-privacy-content h2 {
    color: #31bb9a;
    font-size: 1.5em;
    margin: 30px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #31bb9a;
}

.terms-privacy-content h3 {
    color: #51555a;
    font-size: 1.2em;
    margin: 20px 0 10px;
}

.terms-section, .privacy-section {
    margin-bottom: 40px;
}

.terms-content, .privacy-content {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.terms-privacy-content ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-bottom: 20px;
}

.terms-privacy-content li {
    margin-bottom: 8px;
    color: #51555a;
}

.terms-privacy-content p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #51555a;
}

.back-to-home {
    text-align: center;
    margin: 40px 0;
}

.btn-back {
    display: inline-block;
    background-color: #31bb9a;
    color: #fff;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background-color: #31bb9a;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.header-compress-nav {
  position: relative;
  margin-left: 30px;
}

.main-compress-link {
  color: white;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.2s ease;
  cursor: pointer;
}

.main-compress-link:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

.compress-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 6px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  list-style: none;
  padding: 6px 0;
  min-width: 180px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 100;
}

.compress-dropdown-menu li a {
  display: block;
  padding: 8px 14px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
}

.compress-dropdown-menu li a:hover {
  background-color: #31bb9a;
  color: white;
}

.header-compress-nav.open .compress-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (max-width: 768px) {
  .header-compress-nav {
    margin-left: 10px;
  }

  .main-compress-link {
    font-size: 14px;
  }

  .compress-dropdown-menu {
    min-width: 150px;
    font-size: 13px;
  }
  
  .nav-level-link {
    font-size: 14px;
    padding: 6px 10px;
  }
}

  .compression-control {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    font-family: Arial, sans-serif;
  }
  
  .size-selector {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  
  .row-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
  }
  
  .compression-label {
    color: #31bb9a;
    white-space: nowrap;
    margin-top: 10px;
    font-size: 17px;
    margin-right: 60px;
  }
  
  .size-tags {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .size-tag {
    padding: 4px 10px;
    background-color: #fff;
    border-radius: 10px;
    cursor: pointer;
    border: 1px solid #ccc;
    font-size: 13px;
    color: #333;
    transition: background-color 0.3s;
  }
  
  .size-tag:hover {
    background-color: #31bb9a;
    color: white;
  }
  
  .size-tag.active {
    background-color: #31bb9a;
    color: white;
    border-color: #31bb9a;
  }
  
  .custom-size-input {
    justify-content: center;
    color: #31bb9a;
    flex-wrap: wrap;
    flex-direction: column;
  }
  
  .custom-size-input label {
    font-size: 17px;
    margin-right: 6px;
    margin-bottom: -5px;
  }
  
  .custom-size-input input {
    width: 350px;
    height: 35px;
    padding: 4px 8px;
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid #ccc;
    margin-bottom: 10px;
  }
  
  @media (max-width: 767px) {
    .size-tags{
        gap: 2px;
    }
    
    .custom-size-input input{
        width: 310px;
    }
    
    .row-wrapper {
      flex-direction: column;
      align-items: center;
    }
  
    .custom-size-input {
      flex-direction: column;
    }
  
    .custom-size-input label {
      margin-bottom: -5px;
      margin-right: 0;
      font-size: 17px;
    }
  }

@media (max-width: 1020px) {
    .header-content,
    .main-content,
    .footer-content {
        width: 95%;
        padding: 10px;
    }

    .images-container {
        flex-direction: column;
        align-items: center;
    }

    .image-section,
    .control-section {
        width: 100%;
        max-width: 320px;
    }

    .faq-table {
        display: block;
    }

    .faq-table tr {
        display: flex;
        flex-direction: column;
    }

    .faq-table td {
        display: block;
        margin-bottom: 10px;
    }

    .compression-control {
        padding: 0 10px;
        position: relative;
    }

    .compression-control table tr {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px;
    }

    .compression-label {
        width: 100%;
        text-align: center;
        order: 1;
    }

    .compression-slider {
        flex: 1;
        order: 2;
        padding: 0 10px;
        position: relative;
    }

    .compression-value {
        width: auto;
        text-align: right;
        padding: 5px 0;
        order: 3;
        font-size: 1.5em;
    }

    .compression-slider::before,
    .compression-slider::after {
        content: attr(data-original-size);
        position: absolute;
        bottom: -20px;
        font-size: 0.8em;
        color: #666;
    }

    .compression-slider::before {
        left: 10px;
    }

    .compression-slider::after {
        right: 10px;
        content: attr(data-compressed-size);
    }

    .mobile-download {
        order: 2;
        margin-top: 10px;
    }

    .image-section:last-child {
        display: flex;
        flex-direction: column;
    }

    .image-section:last-child .image-box {
        order: 1;
    }

    .image-section:last-child + .mobile-download {
        order: 2;
        margin-top: 15px;
    }

    .control-buttons {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        margin: 0;
    }

    .button-wrapper {
        order: -1;
        margin-bottom: 8px;
    }

    .control-section {
        display: flex;
        flex-direction: column;
    }

    .mybt {
        order: 1;
        margin: 20px 0 0 50px;
    }

    .ad-space {
        order: 0;
        margin: 20px 0;
    }
}

#holder, #compressed_result {
    overflow: auto;
    max-height: 500px;
    border: 3px solid #ddd;
    padding: 10px;
    scrollbar-width: thin;
    scrollbar-color: #31bb9a #f0f0f0;
}

#holder {
    border-style: dashed;
}

#holder::-webkit-scrollbar,
#compressed_result::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#holder::-webkit-scrollbar-track,
#compressed_result::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}

#holder::-webkit-scrollbar-thumb,
#compressed_result::-webkit-scrollbar-thumb {
    background-color: #31bb9a;
    border-radius: 4px;
}

#holder::-webkit-scrollbar-thumb:hover,
#compressed_result::-webkit-scrollbar-thumb:hover {
    background-color: #31bb9a;
}

.download-all-btn {
    padding: 6px 12px;
    background-color: rgb(49, 187, 154);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-family: Arial, sans-serif;
    transition: background-color 0.3s;
    position: sticky;
    top: 0;
    z-index: 100;
}

.compressed_img {
    width: 260px;
    height: auto;
}

.features-section {
    padding: 25px 0;
    background: #f9f9f9;
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    padding: 0 20px;
}

.feature-box {
    flex: 0 0 calc(33.33% - 20px);
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-5px);
}

.feature-box img {
    width: 72px;
    height: 72px;
    margin-bottom: 20px;
}

.feature-box h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.feature-box p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.faq-section {
    margin: 0 auto;
    padding: 0 20;
    max-width: 1000px;
}

.faq-section h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 25px;
    text-align: center;
}

.faq-section details {
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    background: white;
}

.faq-section summary {
    padding: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    transition: all 0.3s ease;
}

.faq-section summary:hover {
    background-color: #f5f5f5;
}

.faq-section summary span {
    flex-grow: 1;
}

.faq-section .arrow-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    fill: #31bb9a;
}

.faq-section details[open] .arrow-icon {
    transform: rotate(180deg);
}

.faq-section details[open] summary {
    background-color: #f9f9f9;
    border-bottom: 1px solid #e0e0e0;
}

.faq-content {
    padding: 20px;
    line-height: 1.6;
    color: #666;
}

.faq-content p {
    margin: 0;
    font-size: 15px;
}

.text-h1 {
    text-align:center;
    margin-bottom:20px;
}

.text-h1 h1{
    font-size: 27px !important;
    font-weight: 700;
}

.text-h1 p {
    font-size: 17px !important;
    line-height: 30px !important;
    color:#51555a;
}

@media (max-width: 768px) {
    .feature-box {
        flex: 0 0 100%;
    }

    .text-h1 h1{
        font-size: 22px !important;
    }

    .text-h1 p {
        font-size: 15px !important;
        line-height: 27px !important;
    }

    .faq-section {
        padding: 0 15px;
        margin: 40px auto;
    }
    
    .faq-section summary {
        padding: 10px;
    }
    
    .faq-content {
        padding: 15px;
    }

    .l_title {
        font-size: 1.5em;
    }
}