body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e5e7eb;
}

.container {
  max-width: 640px;
  width: 90%;
  margin: 40px auto;
  padding: 32px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

h1 {
  margin-top: 0;
  font-size: 2rem;
  text-align: center;
  color: #fff;
}

p {
  color: #e5e7eb;
  text-align: center;
}

#upload-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.file-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.2);
  border: 2px dashed rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.api-key-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.api-key-label span {
  font-weight: 500;
  color: #fff;
}

#api-key-input {
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 14px;
  transition: all 0.3s ease;
}

#api-key-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

#api-key-input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.15);
}

.file-label:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
}

.file-label input {
  display: none;
}

#convert-btn {
  padding: 12px 24px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(to right, #4f46e5, #06b6d4);
  color: white;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  transition: transform 0.2s ease;
}

#convert-btn:hover {
  transform: translateY(-2px);
}

#convert-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.preview {
  margin-top: 24px;
  text-align: center;
}

#preview-img {
  max-width: 100%;
  max-height: 300px;
  display: none;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.progress-wrapper {
  margin-top: 24px;
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 999px;
  overflow: hidden;
  height: 10px;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(to right, #22c55e, #a3e635);
  transition: width 0.3s ease;
}

#status-text {
  margin-top: 12px;
  min-height: 24px;
  text-align: center;
  font-weight: 500;
}

#download-link {
  display: inline-block;
  margin-top: 24px;
  padding: 12px 24px;
  border-radius: 8px;
  background: #16a34a;
  color: white;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  text-align: center;
}

#download-link:hover {
  background: #15803d;
  transform: translateY(-2px);
}
