* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background: #1a1a1a;
  color: #ffffff;
  font-family: "Arial", sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  background: #2d2d2d;
  padding: 2rem;
  border-radius: 10px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

h1 {
  text-align: center;
  margin-bottom: 2rem;
  color: #00cc99;
}

.upload-section {
  margin-bottom: 1.5rem;
  text-align: center;
}

input[type="file"] {
  display: block;
  margin: 0 auto 1rem;
  padding: 0.5rem;
  background: #3d3d3d;
  border: none;
  border-radius: 5px;
  color: #fff;
  cursor: pointer;
}

#fileName {
  font-size: 0.9rem;
  color: #cccccc;
}

.options-section {
  margin-bottom: 1.5rem;
}

.option-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  color: #00cc99;
}

select,
input[type="text"] {
  width: 100%;
  padding: 0.5rem;
  background: #3d3d3d;
  border: none;
  border-radius: 5px;
  color: #fff;
}

select {
  cursor: pointer;
}

input[type="text"]::placeholder {
  color: #999;
}

.speech-rate-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.speech-rate-btn {
  flex: 1;
  padding: 0.5rem;
  background: #3d3d3d;
  border: none;
  border-radius: 5px;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s;
  font-size: 0.9rem;
}

.speech-rate-btn[data-selected="true"] {
  background: #00cc99;
}

.speech-rate-btn:hover {
  background: #00b386;
}

.control-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 0.5rem;
  margin-bottom: 1rem;
}

button {
  padding: 0.75rem;
  background: #00cc99;
  border: none;
  border-radius: 5px;
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
}

button:disabled {
  background: #666;
  cursor: not-allowed;
}

button:hover:not(:disabled) {
  background: #00b386;
}

.status {
  margin-top: 1rem;
  text-align: center;
  min-height: 1.5rem;
}

.timer {
  margin-top: 0.5rem;
  text-align: center;
  color: #00cc99;
}

.hidden {
  display: none;
}

.download-section {
  margin-top: 1.5rem;
  text-align: center;
}

#downloadLink {
  color: #00cc99;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid #00cc99;
  border-radius: 5px;
  transition: all 0.3s;
}

#downloadLink:hover {
  background: #00cc99;
  color: #fff;
}

@media (max-width: 480px) {
  .container {
    padding: 1rem;
  }

  h1 {
    font-size: 1.5rem;
  }

  .speech-rate-options {
    flex-direction: column;
  }
}
