:root {
  --primary: #6366f1;
  --secondary: #8b5cf6;
  --dark: #1e293b;
  --light: #f8fafc;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-800: #1f2937;
  --gray-900: #111827;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
  color: var(--dark);
  transition: all 0.3s ease;
}

body.dark-mode {
  background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
  color: var(--light);
}

.gradient-bg {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card {
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  background: white;
  border-radius: 0.5rem;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.dark-mode .card {
  background: var(--gray-800);
}

#particles-js {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.content-wrapper {
  position: relative;
  z-index: 1;
}

.tts-audio-player {
  position: relative;
  background: rgba(243, 244, 246, 0.8);
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.dark-mode .tts-audio-player {
  background: rgba(31, 41, 55, 0.8);
}

.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.player-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--dark);
  transition: all 0.3s ease;
  padding: 0.5rem;
  border-radius: 50%;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-btn:hover {
  color: var(--primary);
  transform: scale(1.1);
  background: rgba(99, 102, 241, 0.1);
}

.dark-mode .player-btn {
  color: var(--light);
}

.dark-mode .player-btn:hover {
  background: rgba(99, 102, 241, 0.2);
}

.progress-container {
  width: 100%;
  height: 6px;
  background: var(--gray-200);
  border-radius: 3px;
  overflow: hidden;
  margin: 1rem 0;
  position: relative;
}

.progress-container::after {
  content: attr(data-progress);
  position: absolute;
  right: 0;
  top: -1.5rem;
  font-size: 0.75rem;
  color: var(--primary);
}

.dark-mode .progress-container {
  background: var(--gray-700);
}

.progress-bar {
  height: 100%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  width: 0%;
  transition: width 0.3s ease;
}

.time-display {
  text-align: center;
  color: var(--dark);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.dark-mode .time-display {
  color: var(--light);
}

.close-btn {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  color: var(--dark);
}

.dark-mode .close-btn {
  color: var(--light);
}

.close-btn:hover {
  color: var(--primary);
}

.dark-mode .close-btn:hover {
  color: var(--secondary);
}

.recent-conversions {
  width: 100%;
  border-collapse: collapse;
}

.recent-conversions th {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gray-200);
  font-weight: 600;
}

.dark-mode .recent-conversions th {
  border-bottom-color: var(--gray-700);
}

.recent-conversions td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: middle;
}

.dark-mode .recent-conversions td {
  border-bottom-color: var(--gray-700);
}

.recent-item-actions {
  display: flex;
  gap: 0.75rem;
}

.recent-item-btn {
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
}

.recent-item-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.play-btn {
  background-color: rgba(99, 102, 241, 0.1);
  color: var(--primary);
}

.play-btn:hover {
  background-color: rgba(99, 102, 241, 0.2);
}

.download-btn {
  background-color: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.download-btn:hover {
  background-color: rgba(16, 185, 129, 0.2);
}

.delete-btn {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.delete-btn:hover {
  background-color: rgba(239, 68, 68, 0.2);
}

/* 新增页脚样式 */
footer {
  background-color: var(--gray-800);
  color: white;
  padding: 2rem 0;
  text-align: center;
}

footer p {
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

/* 新增导航按钮样式 */
nav ul {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

nav button {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
}

nav button:hover {
  background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
  .responsive-flex {
    flex-direction: column;
  }
  
  .voice-panel {
    width: 100%;
    margin-bottom: 1.5rem;
  }
  
  .controls {
    gap: 1rem;
  }
  
  .player-btn {
    font-size: 1.25rem;
  }

  .recent-item-actions {
    gap: 0.5rem;
  }

  .recent-item-btn {
    padding: 0.25rem;
    font-size: 0.875rem;
    width: 1.75rem;
    height: 1.75rem;
  }

  nav ul {
    gap: 0.75rem;
  }

  nav button {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fadeIn {
  animation: fadeIn 0.5s ease forwards;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.animate-pulse {
  animation: pulse 1.5s infinite;
}
