* {
  margin: 0;
  padding: 0;
}

body {
  background: #f1f2f3;
}

.container {
  box-sizing: border-box;
  width: 100%;
  max-width: 1560px;
  min-width: 1240px;
  margin: 25px auto;
  color: #333;
}

.container * {
  box-sizing: border-box;
}

header {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

header h1 {
  font-size: 30px;
  font-weight: 700;
  margin-bottom: 10px;
}

header p {
  font-size: 16px;
  color: #7f8c8d;
  max-width: 95%;
  margin: 0 auto;
}


.main-content {
  background-color: white;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 20px;
  margin-bottom: 25px;
}

textarea {
  width: 100%;
  height: 240px;
  padding: 20px;
  font-size: 15px;
  line-height: 1.5;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  resize: vertical;
  transition: all 0.3s ease;
  margin-top: 15px;
}

textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.controls-section {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 15px;
}

.control-group {
  background-color: #f8f9fa;
  border-radius: 10px;
  padding: 20px;
}

.control-group h3 {
  font-size: 1.2rem;
  color: #2c3e50;
  display: flex;
  align-items: center;
}

.control-group h3 span {
  margin-right: 10px;
  font-size: 1.4rem;
}

.param-control {
  margin-top: 15px;
}

.param-control label {
  display: block;
  margin-bottom: 8px;
  color: #34495e;
  font-weight: 500;
}

.param-control select {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background-color: white;
  font-size: 1rem;
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.slider-container input[type="range"] {
  flex: 1;
  height: 8px;
  -webkit-appearance: none;
  background: #e0e7ff;
  border-radius: 5px;
  outline: none;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #3498db;
  cursor: pointer;
}

.slider-value {
  min-width: 40px;
  text-align: center;
  background: #79c3f5;
  color: white;
  padding: 2px 8px;
  line-height: 1;
  border-radius: 4px;
  font-size: 0.8rem;
}

.button-section {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
  flex-wrap: wrap;
  /* 允许按钮换行 */
}

.btn {
  padding: 14px 30px;
  font-size: 1.1rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 140px;
  text-align: center;
}

.btn span {
  margin-right: 8px;
  font-size: 1.3rem;
}

.generate-btn {
  background-color: #3498db;
  color: white;
}

.generate-btn:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
}

.download-btn {
  background-color: #2ecc71;
  color: white;
}

.download-btn:hover {
  background-color: #27ae60;
  transform: translateY(-2px);
}

.clear-btn {
  background-color: #e74c3c;
  color: white;
}

.clear-btn:hover {
  background-color: #c0392b;
  transform: translateY(-2px);
}

.play-btn {
  background-color: #9b59b6;
  color: white;
}

.play-btn:hover {
  background-color: #8e44ad;
  transform: translateY(-2px);
}

.preview-section {
  background-color: #f8f9fa;
  border-radius: 10px;
  padding: 25px;
  margin-top: 30px;
}

.preview-section h3 {
  font-size: 1.2rem;
  color: #2c3e50;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
}

.preview-section h3 span {
  margin-right: 10px;
  font-size: 1.4rem;
}

.voice-preview {
  display: flex;
  align-items: center;
  gap: 15px;
}

.voice-info {
  display: flex;
  flex: 1;
  background-color: white;
  padding: 15px;
  border-radius: 8px;
  border-left: 4px solid #3498db;
}

.voice-info p {
   flex: 1;
  margin: 5px 0;
  color: #34495e;
}

.voice-info strong {
  color: #2c3e50;
}

footer {
  text-align: center;
  padding: 25px 0;
  color: #7f8c8d;
  font-size: 14px;
  line-height: 1.75;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;

}

.feature-card {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease;
}

.feature-card span {
  font-size: 2.5rem;
  margin-bottom: 15px;
  display: block;
}

.feature-card h3 {
  font-size: 1.2rem;
  color: #2c3e50;
  margin-bottom: 10px;
}

.feature-card p {
  color: #7f8c8d;
  line-height: 1.6;
}

.status {
  text-align: center;
  padding: 15px;
  margin-top: 15px;
  border-radius: 8px;
  font-size: 1.1rem;
}

.status.success {
  background-color: rgba(46, 204, 113, 0.2);
  color: #27ae60;
}

.status.error {
  background-color: rgba(231, 76, 60, 0.2);
  color: #c0392b;
}

.status.info {
  background-color: rgba(52, 152, 219, 0.2);
  color: #2980b9;
}
