body {
  background-color: var(--color-light);
  font-family: Graphik, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.container {
  border: 0;

  background: #fff;
  border-radius: 8px;
  display: flex;
  flex-direction: row;
  padding: 8px;
  margin: 4px auto;
  justify-content: space-between;

  width: 1280px;
}


#dragMask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: none;
  justify-content: center;
  align-items: center;
  color: #fff;
  font-size: 32px;
  backdrop-filter: blur(3px);
  z-index: 999;
  pointer-events: none;
}

#dragMask.active {
  display: flex;
}

header.title {
  background-color: #fff;
  width: 1280px;
  margin: 0 auto;
  padding: 8px;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.setting {
  background-color: #fff;
  border-radius: 3px;

  padding: 8px 16px;
  padding-top: 0;
  display: flex;
  flex-direction: column;
  width: 360px;
}

#settingBox {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 3px;
}

.outputBox div {
  display: none;
  height: 22px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;

  align-items: center;
  border-radius: 3px;
  padding: 8px;
}

#downloadButton {
  line-height: 25px;
  text-decoration: none;
  text-align: center;
  width: 80px;
  height: 28px;
  background-color: var(--color-black);
  color: white;
  cursor: pointer;
  border-radius: 3px;
  border: 0;
  margin-left: 8px;
}

div.del_icon {
  position: absolute;
  right: 5px;
  top: 18px;

  cursor: pointer;
  color: #fff;
  font-weight: bold;
  background-color: #000;
  border-radius: 50%;
  border: 2px solid #fff;
  width: 26px;
  height: 26px;
  margin-left: -16px;
  margin-top: -16px;
  display: flex;
  align-items: center;
  justify-content: center;

  
  opacity: 0;
  pointer-events: none; 
  transition: opacity 0.2s ease; 
}


.del_icon:hover {
  background-color: #000; 
  transform: scale(1.1); 
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); 
}


@media (hover: hover) and (pointer: fine) {
  li[data-index]:hover .del_icon {
    opacity: 1;
    pointer-events: auto; 
  }
}


li[data-index].selected .del_icon {
  opacity: 1;
  pointer-events: auto;
}

li[data-index] {
  position: relative;
  border-radius: 6px;

  margin: 4px 0;
  transition: background-color 0.2s ease, transform 0.2s ease;
}


@media (hover: hover) and (pointer: fine) {
  li[data-index]:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
  }
}


li[data-index].selected {
  
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
}

.infoBox {
  display: flex;
  align-items: center;
  gap: 3px;
}

.tooltipImg {
  transition: transform 0.2s ease, filter 0.2s ease;
  cursor: pointer;
}

.tooltipImg:hover {
  transform: scale(1.2); 
  filter: brightness(1.3); 
}
.tooltip {
  position: absolute;
  background: #000;
  color: #fff;
  padding: 8px 12px;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-6px) scale(0.95);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
  text-align: center;
}


.tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px; 
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #000; 
}

.tooltip.show {
  opacity: 1;
  transform: translateY(-12px) scale(1);
}

.tooltip.hide {
  opacity: 0;
  transform: translateY(-4px) scale(0.97);
}

#compressOption {
  width: 80px;
  height: 26px;
  text-align: center;
  font-weight: 700;
  color: var(--color-black);
  border-radius: 3px;
  border: 2px solid #aaa;
}

#compressButton {
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 36px;
  background-color: var(--color-blue);
  color: white;
  cursor: pointer;
  border-radius: 3px;
  border: 1px solid var(--color-blue);
  transition: all 0.3s ease;
  font-size: 16px;
}

.tooltipImg {
  cursor: pointer;
  width: 22px;
  height: 22px;
}

.outputBox {
  font-size: 16px;
  border: 1px solid #aaa;
  border-radius: 3px;
  background-color: #fafafa;
  margin: 0;
  margin-top: 8px;
  display: none;
}

#settingBox label {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

#settingBox .svgTips {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

#inputFiles {
  display: none;
}

#addFiles {
  margin-top: 0;

  align-items: center;
  justify-content: space-between;
  background-color: #fff;
  border-radius: 3px;

  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row;
}

#addFiles button {
  background-color: var(--black-90);
  color: white;
  cursor: pointer;
  border-radius: 3px;
  font-weight: 700;
  height: 30px;
  width: 128px;
}

#addFiles span span {
  color: var(--color-blue);
  font-weight: 700;
}

.file-info #compressButton {
  border-radius: 3px;
  border: 0;
  background: var(--button-color);
  color: #fff;
  width: 60px;
  height: 36px;
  cursor: pointer;
  font-size: 13px;
  visibility: hidden;
}

.file-info #compressButton:disabled {
  background-color: #999;
  cursor: default;
}


.file-info > * {
  flex: 1;
}

#fileList {
  position: relative;
  font-size: 14px;
  height: calc(100vh - 125px);
  background-color: #fff;
  border: 1px solid #ddd;
  overflow-x: hidden;
  overflow-y: scroll;
  border-radius: 8px;
  list-style: none;
  display: none;
  width: 935px;
}

.fileListHeader {
  font-weight: 500;
  height: 45px;
  background-color: #f9f9f9;
  color: #000;
}

#fileList li.fixed-header {
  margin: 0;
  width: 100%;
  padding-top: 0;
  
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 10;
}

.fileListHeader div {
  flex: 1;
}

.fileListItem > * {
  word-break: break-all;
  flex: 1;
  line-height: 22px;
}

.fixed-header {
  font-weight: bold;
  position: sticky;
  top: 0;
  z-index: 1;
}

.fileListItem {
  font-weight: normal;
}

.section .file-info span {
  color: #333;
  margin-right: 16px;
  margin-left: 3px;
}

.grid-item svg {
  width: 54px;
  height: 54px;
  color: var(--color-dark);
}

#app_title {
  align-items: center;
  justify-content: center;
  flex: 1;

  display: none;
}

#settingBox {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}

.downloadBtn {
  color: #0056b3;
  cursor: pointer;
}

#fileInput {
  font-size: 13px;
}

#fileList button {
  background: #000;
  color: white;
  padding: 4px 8px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

#fileList button:hover {
  background: #0056b3;
}

#fileList button:disabled {
  background: #cccccc;
  cursor: not-allowed;
}

#fileList li {
  margin: 16px 0;
  padding: 8px 0;
  width: 100%;
}

#fileList .file-header {
  text-align: center;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  font-size: 16px;
  
}

#fileList .thumbnail {
  width: 260px;
  height: 130px;
  border-radius: 5px;
  object-fit: contain;
  padding: 4px;
  background-color: #fafafa;
  
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.fileListItem .filename {
  display: block;
  padding-top: 8px;
  line-height: 22px;
}

#compressButton:disabled {
  background-color: var(--black-30);
  cursor: default;
  border: 0;
}

#compressButton:hover {
  transform: scale(1.03);

  border: 0;
}

a.compress_single {
  width: 100%;
  text-align: center;
  display: inline-block;
  font-size: 16px;
  margin: 32px 0;
  text-decoration: none;
  display: none;
}


#guidePage {
  width: 1280px;

  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0;
}

.upload-label {
  font-size: 18px;
  margin: 16px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 245px;
  min-height: 60px;
  background-color: #009688;
  color: white;
  cursor: pointer;
  border-radius: 3px;
  font-weight: 700;
}

.drag_text {
  color: #999;
  font-size: 16px;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 16px;
  width: 60%;
}

.grid-container .grid-item {
  padding: 3px;
  text-align: center;
  margin-top: 48px;
}

.grid-container .grid-item p {
  font-size: 16px;
  line-height: 20px;
  margin-top: 4px;
  color: #333;
}

.main_title {
  font-size: 32px;
  font-weight: 700;
  margin-top: 64px;
}

#guidePage h2 {
  font-size: 24px;
  color: #333;
  margin: 16px;

  line-height: 30px;
}

#optimizeSize {
  width: 18px;
  height: 18px;
}


.button_box {
  display: flex;
  justify-content: center;
  padding: 0 8px;
}


#compressButton {
  position: relative;
  background: #009688;
  color: #fff;
  border: none;
  padding: 12px 24px;
  font-size: 16px;
  border-radius: 3px;
  cursor: pointer;
  overflow: hidden;
  margin-top: 8px;
}

#compressButton:disabled {
  background: #aaa;
  cursor: not-allowed;
}


#compressButton .progress-bg {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: #000;
  opacity: 1;
  transition: width 0.2s ease;
  z-index: 0;
}


#compressButton span,
#compressButton {
  position: relative;
  z-index: 1;
  font-weight: bold;
}


@media (max-height: 600px) {
  .grid-container .grid-item {
    margin: 0;
  }
}

.settingTitle {
  font-size: 16px;
  padding: 0 16px;
  font-weight: bold;
}

#zipPassword {
  height: 20px;
  width: 120px;
}

#zipLevel {
  text-align: center;
  height: 28px;
  width: 188px;
}

#fileList {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", monospace;
  font-size: 14px;
  line-height: 1.6;
}

.unzip-tips {
  line-height: 200px;
  background-color: #def2ff;
  text-align: center;
  height: 200px;
  border-radius: 8px;
  padding: 8px;
  display: none;
  width: 318px;
}


.file-row {
  padding: 2px 6px;
  transition: background 0.15s ease;
  border-radius: 4px;
}


.file-row.file:hover {
  background: rgba(0, 0, 0, 0.05);
}


.file-row.file:active {
  background: rgba(0, 0, 0, 0.08);
}


.file-row.folder {
  cursor: default;
}


.file-row.file::after {
  content: " ⬇";
  opacity: 0;
  font-size: 12px;
  transition: opacity 0.15s ease;
}

.file-row.file:hover::after {
  opacity: 0.6;
}

#zipFileName {
  height: 20px;
  width: 120px;
}

.container {
  overflow-y: auto;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.feature-item {
  text-align: center;
  border: 1px solid #aaa;
  padding: 8px;
  border-radius: 5px;
}

.feature-item h3 {
  font-size: 14px;
  margin-bottom: 12px;
  line-height: 20px;
  height: 60px;
  color: #e91e63;
}

.feature-item img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

#guidePage h2.iphone-issues {
  margin-top: 120px;
  color: #009688;
}

.faq {
  margin: 0 auto;
  min-height: 500px;
}

.faq dt {
  font-weight: 600;
  margin-top: 32px;
}

.faq dd {
  padding: 0 16px;
  margin: 8px 0 0 0;
  color: #555;
  line-height: 1.6;
}


@media screen and (orientation: portrait) {
  .feature-grid {
    grid-template-columns: 1fr;
  }



      .feature-item   {
        margin: 8px auto;
        width: 90%;
      }

  .drag_text {
    margin-bottom: 60px;
  }

  #fileList {
    padding: 0;
  }

  #zipPassword {
    height: 20px;
    width: 120;
  }

  #fileList li {
    margin: 0;
  }

  .unzip-tips {
    width: 100%;
    margin: 3% 0;
    height: 50px;
    line-height: 50px;
    padding: 0;
  }

  #compressButton:hover {
    transform: unset;
  }

  #guidePage h2 {
    font-size: 18px;
    line-height: 26px;
  }

  .main_title {
    font-size: 32px;
    margin-top: 32px;
  }
  .fileListItem .filename {
    line-height: 18px;
  }

  #page_footer {
    display: none;
  }

  .processing-details div {
    flex-direction: column;
  }

  .setting {
    height: 252px;
    margin: 1%;
    padding: 1%;
    width: 96%;
    outline: 0;
    overflow-y: scroll;
    margin-top: 3%;
  }

  #settingBox {
    border: 1px solid #ddd;
  }

  header.title {
    width: 98%;
    padding: 1%;
  }

  #fileList .thumbnail {
    min-width: 200px;
    width: 200px;
    height: 240px;
    border: 0;
    background-color: #fafafa;
  }

  .container {
    width: 98%;
    padding: 0 1%;
    flex-direction: column;
    justify-content: flex-start;
    overflow: hidden;
    overflow-y: auto;
  }

  .upload-label {
    margin-bottom: 8px;
    font-weight: 700;

    font-size: 18px;
  }

  .container .file-info {
    width: 100%;
    justify-content: space-between;
    min-height: 36px;
    font-size: 14px;
  }

  #guidePage {
    width: 100%;
    margin: 0 auto;
    margin-top: 0;
  }

  .grid-container .grid-item {
    margin-top: 12px;
  }

  .grid-container .grid-item p {
    font-size: 13px;
  }

  #fileList {
    border: 2px solid #aaa;
    width: 99%;
    margin: 0;
    height: 100%;
  }

  #compressButton {
    margin-top: 8px;
    min-height: 36px;
  }

  #compressButton:hover {
    transform: unset;

    border: 0;
  }

  .grid-container {
    width: unset;
    padding: 0;
    margin-top: unset;
    grid-template-columns: repeat(1, 1fr);
    grid-gap: 0;
  }

  .grid-container .grid-item p {
    font-size: 16px;
    margin-top: 8px;
  }

  .section .file-info {
    flex: unset;
    font-size: 13px;
    width: 100vw;
    padding: 0;
  }

  #fileInput {
    width: 70px;
  }

  .file-info > * {
    flex: unset;
  }

  .section .file-info {
    width: 96dvw;
    margin: 1dvw;
    padding: 1dvw;
    justify-content: space-around;
    outline: 1px solid #aaa;
  }

  .title {
    margin-bottom: 0;
  }

  .fileNameHeader,
  .fileName {
    display: none;
  }

  #fileList .file-header {
    gap: 8px;
    font-size: 12px;
  }

  .fileListHeader {
    font-weight: normal;
    background-color: #f9f9f9;
  }

  .section {
    display: block;
  }

  .file-info #compressButton {
    height: 30px;
    font-size: 13px;
  }

  .grid-container .grid-item {
    margin-top: 24px;
  }
}
