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

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
}

.container {
  max-width: 750px;
  width: 100%;
  max-height: 95vh;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  overflow: hidden;
  border: 1px solid #e0e0e0;
}

.header {
  background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
  color: white;
  padding: 25px 30px;
  text-align: center;
  border-bottom: 3px solid #f5f5f5;
}

.header h1 {
  font-size: 1.8em;
  margin-bottom: 8px;
  font-weight: 700;
}

.header p {
  opacity: 0.85;
  font-size: 0.9em;
  color: #cccccc;
}

.tabs {
  display: flex;
  background: #f8f8f8;
  border-bottom: 2px solid #e0e0e0;
}

.tab {
  flex: 1;
  padding: 15px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 600;
  color: #666666;
  border: none;
  background: none;
  font-size: 0.95em;
  position: relative;
}

.tab::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 3px;
  background: #1a1a1a;
  transition: all 0.3s;
  transform: translateX(-50%);
}

.tab:hover {
  background: #eeeeee;
  color: #1a1a1a;
}

.tab.active {
  background: #ffffff;
  color: #1a1a1a;
}

.tab.active::after {
  width: 70%;
}

.content {
  padding: 25px;
  background: #ffffff;
  max-height: calc(95vh - 180px);
  overflow-y: auto;
}

.content::-webkit-scrollbar {
  width: 8px;
}

.content::-webkit-scrollbar-track {
  background: #f5f5f5;
}

.content::-webkit-scrollbar-thumb {
  background: #cccccc;
  border-radius: 4px;
}

.content::-webkit-scrollbar-thumb:hover {
  background: #999999;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

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

.upload-zone {
  border: 2px dashed #cccccc;
  border-radius: 12px;
  padding: 35px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  margin-bottom: 20px;
  background: #fafafa;
}

.upload-zone:hover {
  background: #f5f5f5;
  border-color: #1a1a1a;
  transform: translateY(-2px);
}

.upload-zone.dragover {
  background: #eeeeee;
  border-color: #1a1a1a;
  border-style: solid;
  transform: scale(1.02);
}

.upload-icon {
  font-size: 2.5em;
  margin-bottom: 10px;
}

.upload-text {
  font-size: 1em;
  color: #1a1a1a;
  font-weight: 600;
  margin-bottom: 5px;
}

.upload-subtext {
  color: #999999;
  font-size: 0.85em;
}

input[type="file"] {
  display: none;
}

.format-selector {
  margin: 18px 0;
}

.format-selector label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #1a1a1a;
  font-size: 0.95em;
}

.format-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.format-btn {
  padding: 8px 18px;
  border: 2px solid #e0e0e0;
  background: #ffffff;
  color: #666666;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 600;
  font-size: 0.85em;
}

.format-btn:hover {
  background: #1a1a1a;
  color: white;
  border-color: #1a1a1a;
  transform: translateY(-2px);
}

.format-btn.selected {
  background: #2c2c2c;
  color: white;
  border-color: #2c2c2c;
}

.convert-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1em;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  margin-top: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.convert-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.convert-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.preview {
  margin: 18px 0;
  padding: 18px;
  background: #f5f5f5;
  border-radius: 10px;
  display: none;
  border: 1px solid #e0e0e0;
}

.preview.active {
  display: block;
}

.preview h3 {
  color: #1a1a1a;
  margin-bottom: 12px;
  font-size: 1em;
}

.preview img,
.preview video,
.preview audio {
  max-width: 100%;
  border-radius: 8px;
  margin-top: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.file-info {
  background: #ffffff;
  padding: 15px;
  border-radius: 8px;
  margin-top: 12px;
  border: 1px solid #e0e0e0;
}

.file-info p {
  margin: 6px 0;
  color: #666666;
  font-size: 0.9em;
}

.file-info strong {
  color: #1a1a1a;
}

.progress {
  width: 100%;
  height: 8px;
  background: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  margin: 18px 0;
  display: none;
}

.progress.active {
  display: block;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #2c2c2c 0%, #1a1a1a 50%, #2c2c2c 100%);
  background-size: 200% 100%;
  width: 0%;
  transition: width 0.3s;
  animation: shimmer 2s infinite linear;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.quality-selector {
  margin: 18px 0;
}

.quality-selector label {
  color: #1a1a1a;
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
  font-size: 0.95em;
}

.quality-slider {
  width: 100%;
  margin: 12px 0;
  height: 6px;
  border-radius: 5px;
  background: #e0e0e0;
  outline: none;
  -webkit-appearance: none;
}

.quality-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2c2c2c;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.quality-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2c2c2c;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  border: none;
}

.quality-value {
  text-align: center;
  color: #1a1a1a;
  font-weight: 700;
  font-size: 1.1em;
}
