:root {
  --primary-color: #4361ee;
  --secondary-color: #3f37c9;
  --accent-color: #4895ef;
  --background-color: #f1f2f3;
  --card-color: #ffffff;
  --text-color: #333333;
  --border-color: #e0e0e0;
  --success-color: #4caf50;
  --warning-color: #ff9800;
  --error-color: #f44336;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

* {
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--background-color);
}

.container {
  box-sizing: border-box;
  max-width: 1560px;
  min-width: 1240px;
  margin: 20px auto;
  color: var(--text-color);
}
.container *{
  box-sizing: border-box;
}

header {
  width: 100%;
  text-align: center;
  margin-bottom: 25px;
}

h1 {
  font-size: 2.2rem;
  margin-bottom: 5px;
}

.subtitle {
  font-size: 1rem;
  color: #666;
  max-width: 95%;
  opacity: 0.9;
  margin: 0 auto;
}

.main-content {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.card {
  background: var(--card-color);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 20px;
  height: 100%;
}

.card-title {
  font-size: 1.4rem;
  margin-bottom: 15px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.config-section {
  flex: 1;
}

.preview-section {
  width: 52%;
}

.result-section {
  width: 100%;
}

.form-box{
  display: flex;
  gap: 20px;
}

.form-box .form-group{
  flex: 1;
}

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  font-size: 15px;
  margin-bottom: 10px;
  font-weight: 500;
}

input[type="file"] {
  display: none;
}

.file-upload {
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  padding: 30px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: rgba(67, 97, 238, 0.05);
}

.file-upload:hover {
  border-color: var(--primary-color);
  background-color: rgba(67, 97, 238, 0.1);
}

.file-upload-icon {
  font-size: 3rem;
  margin-bottom: 10px;
}

.file-info {
  margin-top: 15px;
  padding: 12px;
  background-color: rgba(67, 97, 238, 0.05);
  border-radius: 8px;
  display: none;
}

select,
input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 1rem;
  transition: border 0.3s;
}

select:focus,
input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.custom-encoding {
  display: none;
  margin-top: 10px;
}

.custom-name-rule {
  display: none;
  margin-top: 10px;
}

.actions {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.btn {
  flex: 1;
  padding: 14px 20px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--secondary-color);
}

.btn-secondary {
  background-color: #f0f0f0;
  color: var(--text-color);
}

.btn-secondary:hover {
  background-color: #e0e0e0;
}

.btn-success {
  background-color: var(--success-color);
  color: white;
}

.btn-success:hover {
  background-color: #388e3c;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.preview-content {
  height: 390px;
  overflow: auto;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 15px;
  font-family: monospace;
  white-space: pre-wrap;
  background-color: #f8f9fa;
}

.result-container {
  display: none;
}

.result-options {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.result-options button{
  flex: none;
}

.file-list {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid var(--border-color);
}

.file-item:last-child {
  border-bottom: none;
}

.file-name {
  flex: 1;
  font-weight: 500;
}

.file-size {
  color: #666;
  margin: 0 20px;
  min-width: 80px;
  text-align: right;
}

.file-actions {
  display: flex;
  gap: 20px;
}

.btn-sm {
  padding: 8px 12px;
  font-size: 0.9rem;
}

.instruction {
  background-color: #fff;
  border-left: 4px solid var(--primary-color);
  padding: 20px;
  margin: 20px 0;
  border-radius: 0 6px 6px 0;
  border-radius: 12px;
}

.instruction h3 {
  margin-bottom: 15px;
  color: var(--primary-color);
}

.note {
  background-color: #fff8e1;
  padding: 15px;
  border-radius: 6px;
  margin-top: 15px;
  border-left: 4px solid var(--warning-color);
}

.note ul{
  margin-left: 20px;
  margin-top: 10px;
  opacity: 0.85;
  font-size: 14px;
  line-height: 1.4;
}
.note ul li{
  margin-bottom: 6px;
}

.progress-container {
  height: 6px;
  background-color: #e0e0e0;
  border-radius: 3px;
  margin: 20px 0;
  overflow: hidden;
  display: none;
}

.progress-bar {
  height: 100%;
  background-color: var(--primary-color);
  width: 0%;
  transition: width 0.3s ease;
}

footer {
  text-align: center;
  padding: 20px;
  color: #666;
  font-size: 0.9rem;
  margin-top: 10px;
}
