/* General */
body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  background: linear-gradient(135deg, #667eea, #764ba2);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding-top: 50px;
  color: #333;
  overflow-x: hidden;
}

.container {
  background: #fff;
  border-radius: 20px;
  width: 90%;
  max-width: 700px;
  padding: 2rem;
  box-shadow: 0 15px 40px rgba(0,0,0,0.2);
  animation: slideUp 0.8s ease-out;
}

/* Animations */
@keyframes slideUp {
  0% { opacity: 0; transform: translateY(50px);}
  100% { opacity: 1; transform: translateY(0);}
}

.fade-in {
  opacity: 0;
  animation: fadeIn 1s forwards;
}

.fade-in:nth-child(1) { animation-delay: 0.2s; }
.fade-in:nth-child(2) { animation-delay: 0.4s; }
.fade-in:nth-child(3) { animation-delay: 0.6s; }
.fade-in:nth-child(4) { animation-delay: 0.8s; }

@keyframes fadeIn {
  to { opacity: 1; }
}

/* Headings */
h1 {
  text-align: center;
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

h2 {
  margin-bottom: 15px;
  font-weight: 600;
}

/* Guide */
.guide {
  text-align: center;
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 20px;
}

/* Textarea */
textarea {
  width: 100%;
  height: 100px;
  border-radius: 12px;
  border: 1px solid #ccc;
  padding: 10px;
  font-size: 1rem;
  resize: none;
  transition: border 0.3s ease;
}

textarea:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 10px rgba(79,70,229,0.3);
}

/* Character count */
#char-count {
  text-align: right;
  font-size: 0.8rem;
  color: #888;
  margin-top: 5px;
}

/* Voice Cards */
.voice-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
}

.voice-card {
  background: #f7f7f7;
  border-radius: 12px;
  padding: 15px;
  width: 180px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.voice-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.voice-card h3 {
  margin: 0;
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.voice-card p {
  font-size: 0.85rem;
  color: #555;
  margin-bottom: 10px;
}

.voice-card button {
  padding: 5px 12px;
  border: none;
  border-radius: 8px;
  background-color: #4f46e5;
  color: white;
  cursor: pointer;
  transition: background 0.3s ease;
}

.voice-card button:hover {
  background-color: #3730a3;
}

/* Controls */
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.controls button {
  flex: 1;
  min-width: 150px;
  padding: 12px 20px;
  font-size: 1rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.controls button:active {
  transform: scale(0.97);
}

#speak-btn {
  background-color: #10b981;
  color: white;
}

#speak-btn:hover {
  background-color: #059669;
}

#download-btn {
  background-color: #f59e0b;
  color: white;
}

#download-btn:hover {
  background-color: #d97706;
}

/* Audio Player */
audio {
  width: 100%;
  margin-top: 20px;
  border-radius: 10px;
}

/* Responsive */
@media (max-width: 600px) {
  .voice-cards {
    flex-direction: column;
    align-items: center;
  }
}
