@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

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

body {
  font-family: 'Inter', sans-serif;
  background: #0a0a0f;
  color: #e0e0e8;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.container {
  width: 90vw;
  max-width: 560px;
  padding: 20px;
  min-width: 0;
}

.card {
  background: #14141f;
  border: 1px solid #2a2a3a;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

h1 {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.subtitle {
  color: #666;
  font-size: 14px;
  margin-bottom: 32px;
}

/* Drop zone */
.dropzone {
  border: 2px dashed #2a2a3a;
  border-radius: 12px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 20px;
}

.dropzone:hover, .dropzone.dragover {
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.05);
}

.dropzone.has-file {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.05);
}

.dropzone-icon { font-size: 36px; margin-bottom: 8px; }
.dropzone-text { color: #888; font-size: 14px; }
.dropzone-file { color: #22c55e; font-size: 14px; font-weight: 500; margin-top: 8px; }

/* Input */
.input-group { margin-bottom: 24px; }

.input-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #888;
  margin-bottom: 8px;
}

.input-group input {
  width: 100%;
  padding: 12px 16px;
  background: #1a1a2a;
  border: 1px solid #2a2a3a;
  border-radius: 8px;
  color: #e0e0e8;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}

.input-group input:focus {
  border-color: #6366f1;
}

.input-group input::placeholder { color: #444; }

/* Button */
.btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  font-family: 'Inter', sans-serif;
}

.btn-primary:hover { opacity: 0.9; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-secondary {
  width: 100%;
  padding: 12px;
  background: transparent;
  color: #888;
  border: 1px solid #2a2a3a;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  margin-top: 12px;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s;
}

.btn-secondary:hover { border-color: #6366f1; color: #e0e0e8; }

/* Progress */
.progress-section { margin: 24px 0; }

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background: #1a1a2a;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 20px;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #a855f7);
  border-radius: 4px;
  transition: width 0.5s ease;
  width: 0%;
}

.steps { list-style: none; }

.steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  color: #444;
}

.steps li.done { color: #22c55e; }
.steps li.active { color: #e0e0e8; }

.step-icon { width: 20px; text-align: center; font-size: 14px; }

.status-detail {
  font-size: 12px;
  color: #666;
  text-align: center;
  margin-top: 8px;
}

/* Result */
#result-section { text-align: center; }

#result-section video {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 16px 0;
  background: #000;
  display: block;
}

.result-title {
  font-size: 18px;
  font-weight: 600;
  color: #22c55e;
  margin-bottom: 4px;
}

/* Error */
#error-section { text-align: center; }

.error-title {
  font-size: 18px;
  font-weight: 600;
  color: #ef4444;
  margin-bottom: 8px;
}

.error-detail {
  color: #888;
  font-size: 14px;
  margin-bottom: 20px;
}

/* History */
#history-section {
  margin-top: 20px;
}

.history-title {
  font-size: 16px;
  font-weight: 600;
  color: #888;
  margin-bottom: 12px;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #14141f;
  border: 1px solid #2a2a3a;
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.2s;
  text-decoration: none;
  color: #e0e0e8;
}

.history-item:hover { border-color: #6366f1; }

.history-brand {
  font-size: 14px;
  font-weight: 500;
}

.history-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.history-status {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.history-status.completed { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.history-status.processing { background: rgba(99, 102, 241, 0.15); color: #6366f1; }
.history-status.pending { background: rgba(136, 136, 136, 0.15); color: #888; }
.history-status.failed { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.history-date { color: #555; }

/* Utility */
.hidden { display: none; }
.job-id { font-size: 11px; color: #333; text-align: center; margin-top: 16px; }
