:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --secondary-gradient: linear-gradient(135deg, #4ecdc4, #45b7d1);
  --accent-gradient: linear-gradient(135deg, #ff6b6b, #ee5a6f);
  --success-gradient: linear-gradient(135deg, #4ecdc4, #44a08d);

  /* Light Theme */
  --bg-primary: rgba(255, 255, 255, 0.95);
  --bg-secondary: #f8f9fa;
  --text-primary: #333;
  --text-secondary: #666;
  --border-color: #ddd;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.95);
}

[data-theme="dark"] {
  /* Dark Theme */
  --bg-primary: rgba(30, 30, 35, 0.95);
  --bg-secondary: #2a2a2f;
  --text-primary: #e0e0e0;
  --text-secondary: #a0a0a0;
  --border-color: #444;
  --shadow-color: rgba(0, 0, 0, 0.3);
  --glass-bg: rgba(30, 30, 35, 0.95);
}

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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: var(--primary-gradient);
  min-height: 100vh;
  color: var(--text-primary);
  overflow-x: hidden;
  transition: all 0.3s ease;
}

.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
}

.theme-btn {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-primary);
  font-size: 1.2rem;
}

.theme-btn:hover {
  transform: scale(1.1) rotate(180deg);
  box-shadow: 0 10px 20px var(--shadow-color);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.header {
  text-align: center;
  margin-bottom: 40px;
  animation: fadeInDown 1s ease-out;
}

.logo {
  font-size: 3rem;
  font-weight: bold;
  background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s ease-in-out infinite;
  margin-bottom: 10px;
}

.subtitle {
  color: white;
  font-size: 1.2rem;
  opacity: 0.9;
}

.main-card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 40px var(--shadow-color);
  animation: slideUp 0.8s ease-out 0.3s both;
  margin-bottom: 30px;
  border: 1px solid var(--border-color);
}

.upload-zone {
  border: 3px dashed var(--border-color);
  border-radius: 15px;
  padding: 60px 20px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  margin-bottom: 30px;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: #4ecdc4;
  background: linear-gradient(
    135deg,
    rgba(78, 205, 196, 0.1),
    rgba(69, 183, 209, 0.1)
  );
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(78, 205, 196, 0.2);
}

.upload-icon {
  font-size: 4rem;
  color: #4ecdc4;
  margin-bottom: 20px;
  animation: bounce 2s infinite;
}

.upload-text {
  font-size: 1.3rem;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--text-primary);
}

.upload-subtext {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.format-selector {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin: 30px 0;
  flex-wrap: wrap;
}

.format-option {
  background: var(--primary-gradient);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.format-option:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.format-option.active {
  background: var(--secondary-gradient);
  transform: scale(1.1);
}

.quality-slider {
  margin: 20px 0;
  text-align: center;
}

.quality-slider label {
  color: var(--text-primary);
  font-weight: 600;
}

.slider-container {
  display: inline-block;
  width: 300px;
  margin: 10px 0;
}

.slider {
  width: 100%;
  height: 8px;
  border-radius: 5px;
  background: var(--border-color);
  outline: none;
  -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--secondary-gradient);
  cursor: pointer;
}

.slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--secondary-gradient);
  cursor: pointer;
  border: none;
}

.file-list {
  margin-top: 30px;
}

.file-item {
  background: var(--bg-secondary);
  border-radius: 10px;
  padding: 15px;
  margin: 10px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: slideInLeft 0.5s ease-out;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.file-item:hover {
  transform: translateX(10px);
  box-shadow: 0 5px 15px var(--shadow-color);
}

.file-info {
  flex: 1;
}

.file-name {
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--text-primary);
}

.file-size {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.file-status {
  padding: 5px 15px;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 5px;
}

.status-pending {
  background: #fff3cd;
  color: #856404;
}

.status-processing {
  background: #d1ecf1;
  color: #0c5460;
  animation: pulse 1s infinite;
}

.status-completed {
  background: #d4edda;
  color: #155724;
}

.status-error {
  background: #f8d7da;
  color: #721c24;
}

[data-theme="dark"] .status-pending {
  background: #4a4016;
  color: #ffc107;
}

[data-theme="dark"] .status-processing {
  background: #0c3d44;
  color: #17a2b8;
}

[data-theme="dark"] .status-completed {
  background: #1e4b23;
  color: #28a745;
}

[data-theme="dark"] .status-error {
  background: #4b1113;
  color: #dc3545;
}

.convert-button {
  background: var(--accent-gradient);
  color: white;
  border: none;
  padding: 15px 40px;
  border-radius: 30px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 20px auto;
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.convert-button:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 30px rgba(255, 107, 107, 0.4);
}

.convert-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border-color);
  border-radius: 4px;
  margin: 20px 0;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--secondary-gradient);
  width: 0%;
  transition: width 0.3s ease;
  animation: shimmer 1s infinite;
}

.statistics {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 30px;
  margin-top: 30px;
  animation: fadeIn 0.8s ease-out 0.8s both;
  border: 1px solid var(--border-color);
}

.statistics h3 {
  text-align: center;
  margin-bottom: 20px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.stat-item {
  text-align: center;
  padding: 20px;
  background: linear-gradient(
    135deg,
    rgba(102, 126, 234, 0.1),
    rgba(118, 75, 162, 0.1)
  );
  border-radius: 15px;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.stat-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px var(--shadow-color);
}

.stat-icon {
  font-size: 2rem;
  color: #667eea;
  margin-bottom: 10px;
}

.stat-value {
  font-size: 2rem;
  font-weight: bold;
  color: #667eea;
  margin-bottom: 5px;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.download-section {
  text-align: center;
  margin-top: 30px;
}

.download-button {
  background: var(--secondary-gradient);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.download-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(78, 205, 196, 0.3);
}

.hidden {
  display: none;
}

/* Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: calc(200px + 100%) 0;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-30px) rotate(120deg);
  }
  66% {
    transform: translateY(30px) rotate(240deg);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }

  .main-card {
    padding: 20px;
  }

  .logo {
    font-size: 2rem;
  }

  .upload-zone {
    padding: 40px 20px;
  }

  .format-selector {
    gap: 10px;
  }

  .format-option {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .slider-container {
    width: 250px;
  }

  .theme-toggle {
    top: 10px;
    right: 10px;
  }

  .theme-btn {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}
