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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #1a1a2e;
  color: #eee;
  min-height: 100vh;
}

.container {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

header {
  text-align: center;
  margin-bottom: 32px;
}

header h1 {
  font-size: 28px;
  font-weight: 700;
  color: #e94560;
}

.subtitle {
  margin-top: 6px;
  color: #888;
  font-size: 14px;
}

.panel {
  background: #16213e;
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 16px;
}

.drop-zone {
  border: 2px dashed #444;
  border-radius: 10px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.drop-zone:hover, .drop-zone.drag-over {
  border-color: #e94560;
  background: rgba(233, 69, 96, .06);
}

.drop-content svg { margin-bottom: 12px; }

.drop-content p { color: #999; font-size: 14px; }

.link { color: #e94560; cursor: pointer; }

.hint { font-size: 12px !important; color: #666 !important; margin-top: 6px; }

.preview-img {
  max-width: 100%;
  max-height: 360px;
  border-radius: 6px;
  display: none;
}

.drop-zone.has-file { border-style: solid; border-color: #0f3460; padding: 12px; }

.drop-zone.has-file .drop-content { display: none; }
.drop-zone.has-file .preview-img { display: block; }

.param-group {
  margin-bottom: 18px;
}

.param-group:last-child { margin-bottom: 0; }

.param-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #ccc;
}

.param-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #333;
  border-radius: 6px;
  background: #0f3460;
  color: #eee;
  font-size: 14px;
  cursor: pointer;
  outline: none;
  appearance: auto;
}

.param-group select:focus { border-color: #e94560; }

.param-hint {
  display: block;
  font-size: 11px;
  color: #666;
  margin-top: 4px;
}

.action-panel { text-align: center; }

#processBtn {
  background: #e94560;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 14px 48px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .2s;
}

#processBtn:hover:not(:disabled) { opacity: .85; }
#processBtn:disabled { opacity: .4; cursor: not-allowed; }

.progress-wrap { margin-top: 16px; }

.progress-bar {
  height: 8px;
  background: #0f3460;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #e94560, #f77f00);
  border-radius: 4px;
  transition: width .3s;
}

.progress-text {
  display: block;
  color: #888;
  font-size: 12px;
  margin-top: 6px;
}

.result-panel { text-align: center; }

.result-info {
  font-size: 13px;
  color: #aaa;
  margin-bottom: 14px;
  line-height: 1.8;
}

.result-img {
  max-width: 100%;
  max-height: 480px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.download-btn {
  display: inline-block;
  background: #0f3460;
  color: #eee;
  text-decoration: none;
  border-radius: 8px;
  padding: 12px 32px;
  font-size: 14px;
  font-weight: 600;
  transition: background .2s;
}

.download-btn:hover { background: #1a4a8a; }

.error-panel { background: #3e1616; }

.error-text { color: #f87171; font-size: 14px; }

@media (max-width: 500px) {
  .container { padding: 20px 12px 40px; }
  .panel { padding: 16px; }
}
