
:root {
  --primary: #4361ee;
  --primary-dark: #3a56d4;
  --secondary: #7209b7;
  --accent: #f72585;
  --light: #f8f9fa;
  --dark: #212529;
  --gray: #6c757d;
  --light-gray: #e9ecef;
  --border-radius: 12px;
  --box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  --transition: all 0.3s ease;
}

/* Audio Converter Specific Styles */
.hero {
  padding: 60px 0 40px;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  font-weight: 700;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.2;
}

.hero p {
  font-size: 1.2rem;
  color: var(--gray);
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.card {
  background: var(--light);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  padding: 30px;
  margin-bottom: 30px;
  transition: var(--transition);
}

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

h2 {
  font-size: 1.8rem;
  margin-bottom: 25px;
  color: var(--dark);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}

h2 i {
  color: var(--primary);
}

h3 {
  font-size: 1.4rem;
  margin: 20px 0 15px;
  color: var(--dark);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}

.tabs {
  display: flex;
  justify-content: center;
  margin: 0 0 30px;
  gap: 10px;
  flex-wrap: wrap;
}

.tab {
  padding: 12px 25px;
  cursor: pointer;
  background: var(--light-gray);
  border-radius: 50px;
  font-weight: 500;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
}

.tab.active {
  background: var(--primary);
  color: white;
}

.tab:hover:not(.active) {
  background: #dbe4ff;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.4s ease;
}

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

input, select, button, textarea {
  margin: 0.5em auto;
  padding: 15px;
  width: 100%;
  font-size: 1rem;
  border-radius: 10px;
  border: 1px solid var(--light-gray);
  background: var(--light);
  display: block;
  transition: var(--transition);
  font-family: 'Poppins', sans-serif;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

button {
  background: var(--primary);
  color: white;
  border: none;
  cursor: pointer;
  font-weight: 600;
  padding: 15px 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

button:hover, button:focus {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

button:disabled {
  background: #9ec5e6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.loading {
  display: none;
  text-align: center;
  padding: 30px;
}

.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: var(--primary);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error {
  color: #e74c3c;
  padding: 15px;
  background: rgba(231, 76, 60, 0.1);
  border-radius: var(--border-radius);
  margin: 20px 0;
  display: none;
  border-left: 4px solid #e74c3c;
}

.success {
  color: #27ae60;
  padding: 15px;
  background: rgba(39, 174, 96, 0.1);
  border-radius: var(--border-radius);
  margin: 20px 0;
  display: none;
  border-left: 4px solid #27ae60;
}

.drag-drop-area {
  width: 100%;
  max-width: 500px;
  margin: 2em auto;
  padding: 2em;
  border: 2px dashed var(--light-gray);
  border-radius: var(--border-radius);
  background: white;
  color: var(--gray);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  font-size: 1rem;
}

.drag-drop-area.drag-over {
  background: #e6f0fa;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.drag-drop-area p {
  margin: 0.5em 0;
}

.file-info {
  width: 100%;
  max-width: 500px;
  margin: 1em auto;
  padding: 15px;
  background: var(--light);
  border-radius: var(--border-radius);
  text-align: left;
}

.file-detail {
  display: flex;
  justify-content: space-between;
  margin: 0.3rem 0;
  font-size: 0.9rem;
}

.settings-grid {
  width: 100%;
  max-width: 500px;
  margin: 1em auto;
}

.setting-group {
  margin-bottom: 1.5rem;
}

.description {
  font-size: 0.9em;
  color: var(--gray);
  margin-bottom: 0.5em;
}

.toggle-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0.5em 0;
}

.toggle-switch {
  position: relative;
  width: 50px;
  height: 24px;
}

.toggle-switch input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
}

.slider {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--gray);
  transition: background-color 0.3s ease;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: transform 0.3s ease;
  border-radius: 50%;
}

.toggle-switch input:checked + .slider {
  background-color: var(--primary);
}

.toggle-switch input:checked + .slider:before {
  transform: translateX(26px);
}

.toggle-switch input:focus + .slider {
  box-shadow: 0 0 0 2px var(--primary-dark);
}

.toggle-switch input:disabled + .slider {
  background-color: var(--light-gray);
  opacity: 0.5;
  cursor: not-allowed;
}

.toggle-switch input:disabled + .slider:before {
  background-color: #ddd;
}

.progress-container {
  width: 100%;
  max-width: 500px;
  margin: 1.5em auto;
  padding: 15px;
  background: var(--light);
  border-radius: var(--border-radius);
  display: none;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.progress-bar {
  height: 10px;
  background: var(--light-gray);
  border-radius: 5px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 5px;
  transition: width 0.4s ease;
}

.result-container {
  width: 100%;
  max-width: 500px;
  margin: 1.5em auto;
  padding: 1.2rem;
  background: rgba(39, 174, 96, 0.08);
  border: 1px dashed #27ae60;
  border-radius: var(--border-radius);
  display: none;
}

.download-btn {
  background: #27ae60;
  color: white;
  padding: 15px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
}

.download-btn:hover, .download-btn:focus {
  background: #219653;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
  outline: 2px solid #27ae60;
  outline-offset: 2px;
}

/* Trimming specific styles */
.trim-container {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--light-gray);
  border-radius: var(--border-radius);
}

.trim-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.trim-control {
  flex: 1;
  min-width: 120px;
}

.trim-control label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--dark);
}

.trim-control input {
  margin: 0;
  padding: 0.5rem;
  width: 100%;
}

.trim-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  cursor: pointer;
}

.trim-toggle h4 {
  margin: 0;
  font-size: 1rem;
  color: var(--dark);
}

/* Responsive Design for Audio Converter */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }
  
  .tab {
    padding: 10px 15px;
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .hero {
    padding: 40px 0 20px;
  }
  
  .card {
    padding: 20px;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.2rem;
  }
  
  .trim-controls {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .trim-control {
    width: 100%;
  }
}
