body {
  background-color: var(--color-light);
}

#guidePage {
  flex-direction: column;
  display: flex;
  gap: 8px;
  width: 1280px;
  min-height: 600px;
  text-align: center;
  align-items: center;
  margin: 0 auto;
}

section.panel {
  display: none;
  width: 100%;
  justify-content: space-between;
}

.controls {
  display: grid;
  
  grid-template-columns: repeat(2, 1fr);
  
  grid-template-rows: repeat(2, auto);
  
  gap: 16px;
  margin-top: 24px;

  
  justify-items: center;
  
  align-items: center;

    
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
}

.add-button,
.clean-button,
.save-all,
#processBtn {
  height: 36px;
  width: 96%;
  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.5px;
  border-radius: 5px;
  border: 1px solid #e91e63;
  background: #e91e63;
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s ease;

  text-decoration: none;
  box-sizing: border-box;

  opacity: 0.3;
  pointer-events: none;
}

.add-button {
  opacity: 1;
  pointer-events: auto;
}

.save-all {
  opacity: 0.2;
  pointer-events: none;
}

.clean-button:hover {
  background: #fff;
  color: #e91e63;
}

.add-button {
  position: relative;
  background: #2db7f5;
  border: 1px solid #2db7f5;
}

.add-button:hover {
  background: #fff;

  color: #2db7f5;
}

#processBtn {
  position: relative;
  background: #00b578;
  border: 1px solid #00b578;
}

#processBtn:hover {
  background: #fff;
  color: #00b578;
}

.save-all {
  position: relative;
  background: #121212;
  border: 1px solid #121212;
}
.save-all:hover {
  background: #fff;
  color: #121212;
}

.button_count,
.output_count {
  position: absolute;
  top: -11px;
  right: -11px;
  margin-left: 8px;
  font-size: 0.85em;
  font-weight: 700;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  background-color: #00b578;
  border: 2px solid #fff;
  color: #fff;
  border-radius: 50%;
  box-shadow: 0px 3px 4px -2px rgba(233, 30, 99, 0.6);
  transition: background-color 0.2s ease-out;
}

.output_count {
  background-color: #000;
  visibility: hidden;
}

.h2_title {
  margin: 16px auto;
  text-align: center;
  border-radius: 5px;
  font-size: 24px;
  padding: 16px;

  color: #333;
  font-weight: 700;
}

.setting fieldset legend {
  padding: 0 8px;
  font-weight: bold;
  color: #333;
  font-size: 16px;
}

.setting label[for="fitMode"] {
  justify-content: flex-start;
}

label[for="fitMode"] span {
  font-size: 14px;
}

.setting label.size_label {
  margin-left: 0;
}

.setting fieldset div {
  padding-top: 16px;
  text-align: left;
}

.setting fieldset {
  align-items: center;

  border: 1px solid #ccc;
  border-radius: 5px;
  margin-top: 24px;
  border-radius: 5px;
  padding: 16px 8px;
  font-size: 14px;
  display: flex;
  justify-content: space-between;
}

.setting input[type="radio"] {
  margin: 0;
  margin-right: 5px;
}

.no_preview {
  font-size: 12px;
  line-height: 50px;

  width: 50px;
  display: inline-block;
  color: red;
  height: 50px;
}

.compressOption {
  width: 90px;
  height: 22px;
  text-align: center;
  font-weight: 700;
  color: var(--color-black);
}

#downloadButton:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.thumb-box.active img.thumb {
  
  border: 1px solid #e6e6e6;
}

.outputSpan {
  height: 13px;
  display: inline-block;
}

.outputSpan span {
  background-color: #00b578d6;
  color: #fff;
  padding: 1px 5px;
  border-radius: 3px;
}

#imageSize {
  font-size: 16px;
  width: 165px;

  text-align: center;

  color: #555;
}

.setting select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  padding: 10px 48px 10px 14px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background-color: #fff;
  font-size: 14px;

  background-image: url("data:image/svg+xml;utf8,<svg fill='%23666' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 6 5-6z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 20px;
  height: 40px;
  font-size: 16px;
  width: auto;
  text-align: center;
  color: #555;
}

.setting label {
  display: block;

  margin: 8px;
}

.container {
  border: 0;
  width: 1280px;
  background: #fff;
  border-radius: 8px;
  display: flex;
  flex-direction: row;

  margin: 8px auto;
  height: auto;
}

.file-info {
  padding: 0 8px;

  align-items: center;
  justify-content: space-between;
  column-gap: 16px;

  background-color: #fff;
  border-radius: 3px;
  display: flex;

  margin: 8px 0;
}

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

#headerUserBack {
  margin-right: 0;
}

#headerUserBack img {
  background: var(--header-bgcolor);
  padding: 8px;
  border-radius: 8px;
}

.file-info .qualityRangeBox {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.setting {
  gap: 0;
  background-color: #fff;
  border-radius: 3px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  width: 350px;
  transition: opacity 0.2s ease;
}

.file-info #qualityRange {
  width: 150px;
}

.file-info #qualityValue {
  width: 50px;
  color: #000;
}

.file-info #download_zip {
  border-radius: 3px;
  border: 0;
  background: #000;
  color: #fff;
  width: 120px;
  height: 36px;
  cursor: pointer;
  font-size: 13px;
  display: none;
}

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

.fileListHeader {
  font-weight: bold;
  height: 32px;
  background-color: #eee;
}

#slogan li.fixed-header {
  margin: 0;
  width: 100%;
}

.fileListHeader div {
  flex: 1;
}

.fileListItem > * {
  flex: 1;
}

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

.fileListItem {
  font-weight: normal;
}

.section .file-info span {
  color: #fff;
}

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

#fileInput {
  font-size: 13px;
}

#site_title img {
  width: 46px;
  height: 46px;
  border-top-left-radius: 3px;
  border-bottom-right-radius: 3px;
}




#file-list {
  margin-bottom: 8px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 6px;
  list-style: none;
  margin-top: 8px;
  background-color: #fff;
  border-radius: 3px;
  height: calc(100vh - 80px);

  width: 900px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  align-content: start;

  position: relative;
}

#file-list li#empty_tip,
#file-list li#loading_tip {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease; 
  opacity: 1;
  list-style: none;
  color: #999;
  pointer-events: none;
  white-space: nowrap;
  outline: none;
  font-size: 16px;
}

span.filename {
  font-weight: 600;
}

#file-list li:hover .del_img {
  visibility: visible;
}

#file-list .del_img {
  visibility: hidden;
  position: absolute;
  top: 5px; 
  right: 5px; 

  
  width: 22px;
  height: 20px;
  background-color: #eee; 
  border-radius: 50%;

  
  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  font-size: 16px; 
  padding-bottom: 2px;
  line-height: 1;
  color: #666;

  z-index: 10; 
}

#file-list .del_img:hover {
  background-color: #ff4d4f; 
  color: #fff; 
}


#file-list li {
  border-radius: 5px;
  outline: 1px solid #ccc;
  display: flex;
  align-items: center;
  flex-direction: column;

  margin: 3px;
  padding: 8px;
  font-size: 13px;
  text-align: center;
  gap: 8px;
  position: relative;
}

#file-list li:hover {
  background-color: #fff;

  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

#file-list .file-list-header {
  position: sticky;
  top: 0;
  background: #f9f9f9;
  z-index: 10;
  font-weight: 500;
}

#file-list .file-list-header .col {
  font-size: 16px;
}

.file-list-header .col {
  flex: 1;
}


.col.index {
  flex: 0 0 50px;
}

.col.preview {
  flex: 0 0 100px;
}

.col.name {
  flex: 1;
  width: 60px;
  word-break: break-all;
}

.col.orig-size,
.col.status,
.col.new-size,
.col.actions {
  flex: 1;
}


.button_box {
  width: 100%;
  position: relative;
  margin-top: 32px;
}

.drag_tips {
  margin:  0;
  padding: 64px;
  border: 1px dashed #666;
  border-radius: 8px;
  font-size: 16px;
  color: #666;
}

.drag_tips div {
  margin-top: 48px;
}


#file-list .col {
  padding: 3px;
  text-align: center;
  font-size: 14px;
  flex: 1;
}

img.thumb {
  width: auto;
  max-width: 182px;
  max-height: 200px;
  object-fit: contain;
  
  
  height: auto;
}

.thumb-box {
  width: 182px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.compressed:hover {
  cursor: pointer;
  box-shadow: 0 0 12px #1e88e5;
}

.status {
  color: #999;
}

#percentOpt {
  display: none;
}

.userCustom label {
  margin: 8px;
  margin-left: 0;
}

.userCustom input,
.userCustom select {
  margin: 0 5px;
}

.userCustom label input {
  width: 105px;
  height: 24px;
  padding: 0 5px;
}

#downloadZipBtn {
  margin: 8px;
  border-radius: 3px;
  border: 0;
  background: var(--button-color);
  color: #fff;
  width: 120px;
  height: 36px;
  cursor: pointer;
  font-size: 13px;
}

#convertAllBtn {
  border-radius: 3px;
  border: 0;
  background: #000;
  color: #fff;
  width: 80px;
  height: 36px;
  cursor: pointer;
  font-size: 13px;
  visibility: hidden;
}

#downloadDiv {
  display: flex;
  justify-content: center;
  width: 100%;
}

.button_box {
  width: 180px;
  text-align: right;
}

#inputFiles {
  width: 180px;
}

#format {
  height: 30px;
}

#convertAllBtn:disabled {
  background-color: #999;
  cursor: default;
}

#settingBox {
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
}

#settingBox input[type="radio"] {
  margin: 0;
  padding: 0;
}

.col.actions a {
  text-decoration: none;
}

#pixelGroup input {
  width: 60px;
}

.upload-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 245px;
  height: 60px;
  background-color: #E91E63;
  color: white;
  cursor: pointer;
  border-radius: 3px;
  margin: 0 auto;
}


.upload-label:hover {
  background-color: #1565c0; 
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); 
}

#inputFiles {
  display: none;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-gap: 36px;
  width: 60%;
  margin: 0 auto;
  margin-top: 48px;
}

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

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

.image_title {
  font-size: 36px;
  font-weight: 700;
}

.image_title div {
  font-size: 16px;
  color: #666;
  margin: 8px 16px;
  line-height: 23px;
  font-weight: normal;
}



.userCustom label input {
  padding: 6px 8px 6px 15px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background-color: #fff;
  width: 143px;
}

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

.fileBox {
  flex-direction: column;

  margin-bottom: 8px;
  border-radius: 3px;
}

.file-action {
  text-align: center;
  margin-bottom: 16px;
}

.download_image {
  visibility: hidden;
}

.file-action input[type="range"] {
  width: 360px;
}

#file-list a {
  text-decoration: none;
  color: #2db7f5;
  background: none;
  border: none;
  outline: none;
  cursor: pointer;
  margin: 0 3px;
}

#file-list a.disabledA {
  visibility: hidden;
  color: gray;
  
  pointer-events: none;
  
  cursor: default;
  
  text-decoration: none;
  
  opacity: 0.6;
  
}


#hoverPreview {
  position: fixed;
  top: 50%;
  left: 25%;
  transform: translate(-50%, -50%);
  display: none;
  z-index: 9999;
  
  border: 1px solid #ccc;
  background: white;
  padding: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

#hoverPreview img {
  max-width: 500px;
  max-height: 500px;
  min-width: 100px;
  min-height: 100px;
}

#scalePctLabel {
  display: inline-block;
  width: 50px;
  text-align: center;
}

#pixelGroup {
  display: none;
  gap: 12px;
  justify-content: center;
  align-items: center;
}

#pixelGroup,
#percentGroup {
  font-size: 14px;
  height: 20px;
}

.main_title {
  font-size: 32px;
  font-weight: 700;
  margin-top: 64px;
 
}
#guidePage h2 {
  width: 50%;
  font-size: 18px;
  color: #666;
  margin: 16px;
  line-height: 30px;
  font-weight: normal;
  word-break: break-all;
}

#recommnedInfo {
  margin-top: 64px;
  background-color: #fff;
  padding: 8px;
  border-radius: 8px;
}


#guidePage article {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 24px;
  margin: 16px 0;

  line-height: 1.7;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  text-align: left;
  
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}


#guidePage article h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111111;
  margin-bottom: 32px;
  line-height: 1.3;
  text-align: center;
  
}

#guidePage article h3 {
  font-size: 18px; 
  font-weight: 700; 
  color: #111111; 
  margin-bottom: 12px; 
  line-height: 1.3; 
  text-align: left; 
  margin-top: 32px;
}


article section {
  font-size: 1rem;
  color: #333333;
  text-align: center;
  
}

#guidePage article p {
  text-align: left;
  margin-top: 16px;
  color: #333;
}


article strong {
  color: #1a73e8;
  font-weight: 600;
}


article ol {
  margin: 16px 0 0 24px;
  padding: 0;
}

article ol li {
  margin-bottom: 12px;
}

.more-links ul li {
  display: inline-block;
  margin: 8px;
}
.more-links a {
  text-decoration: none;
}

.common-issues dl dt {
  font-size: 16px;
  font-weight: 700;
  margin-top: 8px;
  text-align: left;
}

.common-issues dl dd {
  text-align: left;
  color: #333;
}


@media screen and (max-width: 768px) {
  #file-list .file-list-header .col {
    font-size: 14px;
  }
  img.thumb {
    width: 182px;
    height: 230px;
  }

  #guidePage h2 {
    width: 95%;
  }

  .drag_tips {
    border: 0;
    margin: 24px 0;
  }

  .more-links ul {
    list-style: none;
    padding: 0;
    margin: 16px 0 0 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 0; 
  }

  .more-links ul li {
    display: grid;
    margin: 8px;
  }

  article {
    padding: 18px;
  }

  article h2 {
    font-size: 1.5rem;
  }

 

  .setting fieldset {
    padding: 8px;
  }

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

  .drag_tips div {
    display: none;
  }

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

 

  .previewImage {
    display: none;
  }

  .container {
    width: 98%;
    padding: 1%;
  }

  section.panel {
    flex-direction: column;
    justify-content: flex-start;
  }

  #pixelGroup,
  #percentGroup {
    width: 100%;
  }

  #pixelGroup input {
    width: 45px;
  }

  .file-action input[type="range"] {
    width: 300px;
  }

  #downloadZipBtn {
    margin-bottom: 0;
  }

  .setting {
    margin: 1%;
    padding: 0;
    width: 98%;
    gap: 8px;
    outline: 0;
  }

  #inputFiles {
    display: none;
    padding: 8px;
    align-items: center;
    justify-content: space-between;
    background-color: #fff;
    border-radius: 3px;
    flex-direction: column;
    outline: 1px solid #aaa;
    border-radius: 3px;
    background-color: #fafafa;
    width: calc(100% - 16px);
  }

  #processBtn {
    margin-top: 12px;
  }

  .setting fieldset {
    margin: 0;
  }

  .container .file-info {
    width: 98%;

    padding: 1%;
    justify-content: space-between;
    display: flex;
    font-size: 14px;
  }

  .setting fieldset {
    width: calc(100% - 16px);
  }

  #format {
    width: 80px;
  }

  #file-list {
    margin: 0 auto;
    width: 55%;
    height: auto;
    grid-template-columns: repeat(1, 1fr);
          
  }

  #file-list .index,
  #file-list .name,
  #file-list .status {
    display: none;
  }

  #file-list .col {
    padding: 0.5em 0;
    font-size: 12px;
  }

  #downloadDiv {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .file-info > :nth-child(2) {
    text-align: center;
  }

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

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

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

  .button_box {
    width: 70px;
    text-align: right;
  }

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

  #hoverPreview img {
    max-width: 360px;
    max-height: 360px;
    min-width: 100px;
    min-height: 100px;
  }
}
