* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Arial', sans-serif;
}

html, body {
  min-height: 100%;
  height: auto;
}

body {
  background-color: #eaf2fc;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.container {
  background-color: #fff;
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  border-radius: 20px;
  overflow-x: hidden;
  overflow-y: auto;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-height: auto;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 1px solid #d0e2f9;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 26.4px; /* 原22px × 1.2 */
  font-weight: bold;
  color: #2f4a73;
  transform: scale(1.2); /* 整体放大 20% */
  transform-origin: left center; /* 保持左对齐不偏移 */
}

.logo img {
  width: 43px;
  height: 43px;
  border-radius: 50%;
  margin-right: 10px;
}

nav a {
  margin: 0 14px;
  color: #2f4a73;
  text-decoration: none;
  font-weight: 500;
}

nav .menu {
  display: none;
}

main {
  display: flex;
  justify-content: space-between;
  padding: 60px 32px 20px;
  gap: 40px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.left {
  flex: 1.2;
  transform: translateY(-10%);
}

.left img {
  width: 100%;
  max-width: none;
  border-radius: 16px;
}

.right {
  flex: 0.8;
  display: flex;
  flex-direction: column;
  align-self: flex-start;
  gap: 36px;
  transform: translateY(-10%);
}

.right h1 {
  font-size: 44px;
  color: #2f4a73;
  font-weight: bold;
  line-height: 1.3;
  text-align: left;
}

.upload-box {
  display: flex;
  align-items: center;
  border: 2px dashed #9db4d5;
  border-radius: 12px;
  padding: 20px;
  color: #2f4a73;
  background-color: #f7faff;
  margin-bottom: 16px;
}

.upload-box img {
  width: 60px;
  height: 60px;
  margin-right: 20px;
  border-radius: 12px;
  object-fit: cover;
}

.upload-text p {
  font-size: 16px;
  line-height: 1.4;
  margin-bottom: 0;
}

.mp3-info {
  font-size: 18px;
  color: #2f4a73;
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon {
  font-size: 20px;
}

.play-icon {
  width: 24px;
  height: 24px;
  object-fit: contain;
  vertical-align: middle;
}

.voice-select {
  font-size: 16px;
  color: #2f4a73;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 25px;
}

.voice-select label {
  font-weight: 500;
}

.voice-select select {
  padding: 8px 12px;
  width: 60%;
  border: 1px solid #9db4d5;
  border-radius: 8px;
  background-color: #f7faff;
  color: #2f4a73;
  font-size: 16px;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M6 8L0.803847 0.5H11.1962L6 8Z' fill='%232f4a73'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px 8px;
}

.placeholder {
  height: 100px;
  flex-shrink: 0;
}

.demo-section {
  margin-top: 20px;
}

.demo-buttons {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items: center;
}

.demo-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: #2f4a73;
  color: #fff;
  font-size: 18px;
  font-weight: bold;
  padding: 14px 28px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(77, 166, 255, 0.4);
  transition: background-color 0.3s ease;
  min-width: 280px;
  justify-content: center;
}

.demo-btn:hover {
  background-color: #1e3557;
}

.demo-btn img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

footer {
  border-top: 1px solid #d0e2f9;
  padding: 20px 32px;
  text-align: right;
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin-top: auto;
}

.button-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
}

.transcribe-button {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.transcribe-button button {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: #2f4a73;
  color: #fff;
  font-size: 21.6px; /* 原18px × 1.2 */
  font-weight: bold;
  padding: 16.8px 33.6px; /* 原14px 28px × 1.2 */
  border: none;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(77, 166, 255, 0.4);
  transition: background-color 0.3s ease;
  transform: scale(1.2); /* 放大20% */
  transform-origin: center;
}

.transcribe-button button:hover {
  background-color: #1e3557;
}

.transcribe-button button img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.download-section {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 0 32px 60px;
  flex-wrap: wrap;
}

.download-box {
  background-color: #f7faff;
  border: 2px dashed #9db4d5;
  border-radius: 16px;
  padding: 24px 32px;
  font-size: 18px;
  color: #2f4a73;
  font-weight: 500;
  text-align: center;
  min-width: 180px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.download-box:hover {
  background-color: #e0efff;
  box-shadow: 0 4px 10px rgba(77, 166, 255, 0.3);
}

.progress-section {
  background: #f8f9ff;
  padding: 30px;
  border-radius: 10px;
  margin: 20px 32px;
  border: 1px solid #e0e7ff;
}

.progress-bar {
  width: 100%;
  height: 20px;
  background: #e0e7ff;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 15px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #2f4a73 0%, #4a6ba7 100%);
  width: 0%;
  transition: width 0.3s ease;
}

.progress-text {
  text-align: center;
  color: #333;
  font-weight: bold;
  margin-bottom: 10px;
}

.stage-info {
  text-align: center;
  color: #666;
  margin-top: 10px;
  font-style: italic;
}

.error-section {
  background: #fff8f8;
  padding: 30px;
  border-radius: 10px;
  margin: 20px 32px;
  border: 1px solid #f5c6cb;
}

.error-text {
  color: #721c24;
  text-align: center;
}

.file-info {
  background: #e8f4f8;
  padding: 15px;
  border-radius: 8px;
  margin: 15px 32px;
  text-align: center;
  color: #0c5460;
  border: 1px solid #9db4d5;
}

.options-row {
  margin: 20px 0 15px 0;
}

.left .options-row {
  margin: 25px 0 0 0;
  display: flex;
  justify-content: center;
}

.left .processing-options.inline {
  justify-content: center;
}

.processing-options {
  margin: 0;
  padding: 0;
  background-color: transparent;
  border: none;
}

.processing-options.inline {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
}

.options-label {
  color: #2f4a73;
  font-size: 16px;
  font-weight: bold;
  white-space: nowrap;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkbox-group.horizontal {
  flex-direction: row;
  justify-content: space-around;
  gap: 20px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 16px;
  color: #2f4a73;
  font-weight: 500;
}

.checkbox-item input[type="checkbox"] {
  display: none;
}

.checkmark {
  position: relative;
  width: 20px;
  height: 20px;
  background-color: #fff;
  border: 2px solid #9db4d5;
  border-radius: 4px;
  margin-right: 12px;
  transition: all 0.3s ease;
}

.checkbox-item input[type="checkbox"]:checked + .checkmark {
  background-color: #2f4a73;
  border-color: #2f4a73;
}

.checkbox-item input[type="checkbox"]:checked + .checkmark::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-item:hover .checkmark {
  border-color: #2f4a73;
  box-shadow: 0 0 5px rgba(47, 74, 115, 0.3);
}

.label-text {
  user-select: none;
}

.checkbox-item input[type="checkbox"]:disabled + .checkmark {
  background-color: #f5f5f5;
  border-color: #ccc;
}

.checkbox-item input[type="checkbox"]:disabled:checked + .checkmark {
  background-color: #ccc;
  border-color: #ccc;
}

.checkbox-item input[type="checkbox"]:disabled:checked + .checkmark::after {
  border-color: #fff;
}

@media (max-width: 768px) {
  main {
    flex-direction: column;
    align-items: center;
    padding: 40px 20px;
    gap: 40px;
  }

  .left, .right {
    flex: unset;
    width: 100%;
    transform: none;
  }

  .right h1 {
    font-size: 28px;
    text-align: center;
  }

  .upload-box {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .upload-box img {
    margin: 0 0 16px 0;
  }

  .mp3-info {
    justify-content: center;
    flex-wrap: wrap;
  }

  .voice-select {
    flex-direction: column;
    align-items: center;
  }

  .voice-select select {
    width: 90%;
  }

  .transcribe-button {
    margin: 30px 0;
  }

  .transcribe-button button {
    transform: scale(1);
    font-size: 18px;
    padding: 14px 28px;
  }

  .demo-buttons {
    gap: 12px;
  }

  .demo-btn {
    font-size: 16px;
    padding: 12px 24px;
    min-width: 250px;
  }

  .download-section {
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .download-box {
    width: 80%;
    max-width: 300px;
  }

  footer {
    text-align: center;
    font-size: 13px;
    padding: 16px 20px;
  }

  .logo {
    font-size: 22px;
    transform: scale(1);
  }

  .logo img {
    width: 36px;
    height: 36px;
  }

  .progress-section, .error-section, .file-info {
    margin: 20px 10px;
    padding: 20px;
  }

  .options-row {
    margin: 15px 0 10px 0;
  }

  .processing-options.inline {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .options-label {
    font-size: 15px;
  }

  .checkbox-group {
    gap: 10px;
  }

  .checkbox-item {
    font-size: 15px;
  }

  .checkbox-group.horizontal {
    flex-direction: column;
    gap: 10px;
    justify-content: flex-start;
  }
}
