* {
  margin: 0;
  padding: 0;
}

body {
  background-color: #f1f2f3;
}

.container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1560px;
  min-width: 1240px;
  margin: 20px auto;
  color: #333;
  line-height: 1.5;
}

.container *{
  box-sizing: border-box;
}

header {
  width: 100%;
  text-align: center;
  margin-bottom: 20px;
}

header h1 {
  font-size: 2.2rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
}

main {
  padding: 20px;
  background: #fff;
  border-radius: 20px;
}

.tool-section {
  margin-bottom: 25px;
}

.section-title {
  font-size: 1.5rem;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #eaeaea;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title span {
  font-size: 1.8rem;
}

.file-upload {
  border: 3px dashed #d1d5db;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  background: #f9fafb;
  transition: all 0.3s ease;
  margin-bottom: 20px;
  cursor: pointer;
}

.file-upload:hover {
  border-color: #6a11cb;
  background: #f0f5ff;
}

.upload-icon {
  font-size: 4rem;
  margin-bottom: 5px;
  color: #6a11cb;
}

.upload-text {
  font-size: 1.3rem;
  margin-bottom: 5px;
  color: #4b5563;
}

.upload-hint {
  color: #6b7280;
  font-size: 1rem;
}

.upload-btn {
  background: #6a11cb;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 8px;
  font-size: 1.1rem;
  cursor: pointer;
  margin-top: 10px;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.upload-btn:hover {
  background: #5a0db3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(106, 17, 203, 0.3);
}

.settings-panel {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  margin-bottom: 25px;
}

.setting-group {
  background: #f9fafb;
  border-radius: 10px;
  padding: 20px;
  border: 1px solid #e5e7eb;
}

.setting-group h3 {
  font-size: 1.2rem;
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.setting-options {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.option {
  display: flex;
  align-items: center;
  gap: 10px;
}

.option label {
  cursor: pointer;
  font-size: 1.05rem;
}

select,
input[type="range"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: white;
  font-size: 1rem;
}

input[type="range"] {
  padding: 8px 0;
}

.compression-level {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  color: #6b7280;
  font-size: 0.9rem;
}

.action-buttons {
  display: flex;
  gap: 20px;
  margin-bottom: 25px;
}

.action-btn {
  flex: 1;
  padding: 18px 0;
  font-size: 1.2rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.action-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.compress-btn {
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  color: white;
}

.compress-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 7px 15px rgba(106, 17, 203, 0.4);
}

.download-btn {
  background: linear-gradient(135deg, #00b09b 0%, #96c93d 100%);
  color: white;
}

.download-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 7px 15px rgba(0, 176, 155, 0.4);
}

.clear-btn {
  background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
  color: white;
}

.clear-btn:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 7px 15px rgba(255, 65, 108, 0.4);
}

.file-list {
  margin-bottom: 25px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
}

.file-list-header {
  background: #f3f4f6;
  padding: 15px 20px;
  font-weight: 600;
  display: grid;
  grid-template-columns: 50px 3fr 1fr 1fr;
  gap: 15px;
}

.file-list-items {
  max-height: 300px;
  overflow-y: auto;
}

.file-item {
  padding: 15px 20px;
  display: grid;
  grid-template-columns: 50px 3fr 1fr 1fr;
  gap: 15px;
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
  transition: background 0.2s;
}

.file-item:hover {
  background: #f9fafb;
}

.file-icon {
  font-size: 1.8rem;
  text-align: center;
}

.file-name {
  word-break: break-all;
}

.file-size {
  color: #6b7280;
}

.file-status {
  font-weight: 500;
}

.instructions {
  background: #f0f5ff;
  border-radius: 10px;
  padding: 20px;
  border-left: 4px solid #6a11cb;
}

.instructions h2 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.instructions ul {
  padding-left: 25px;
  margin: 15px 0;
}

.instructions li {
  margin-bottom: 10px;
}

.warning {
  background: #fff9db;
  padding: 15px;
  border-radius: 8px;
  margin-top: 15px;
  border-left: 4px solid #ffd43b;
  display: flex;
  gap: 10px;
}

footer {
  text-align: center;
  padding: 25px;
  background: #f3f4f6;
  color: #6b7280;
  border-top: 1px solid #e5e7eb;
}

.progress-container {
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 25px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #6a11cb 0%, #2575fc 100%);
  width: 0%;
  transition: width 0.5s ease;
}

#fileInput {
  display: none;
}

.status-processing {
  color: #2575fc;
}

.status-success {
  color: #00b09b;
}
