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

:root {
  --bg: #0f1117;
  --bg-card: #1a1d27;
  --bg-section: #1f2235;
  --border: #2e3347;
  --border-hover: #4a4f6a;
  --accent: #ff6d5a;
  --accent-dark: #e05040;
  --accent-glow: rgba(255, 109, 90, 0.15);
  --text: #e8eaf0;
  --text-muted: #8890aa;
  --text-dim: #5a607a;
  --success: #22c55e;
  --error: #ef4444;
  --radius: 12px;
  --radius-sm: 8px;
}

html, body {
  height: 100%;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.header-inner {
  max-width: 800px;
  margin: 0 auto;
  padding: 16px 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-icon {
  font-size: 28px;
  line-height: 1;
}
.logo-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}
.logo-sub {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* Main */
.main {
  flex: 1;
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px;
}

/* Card */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-header {
  padding: 28px 32px 24px;
  border-bottom: 1px solid var(--border);
}
.card-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}
.card-header p {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 560px;
}

/* Sections */
.section {
  padding: 24px 32px;
  border-bottom: 1px solid var(--border);
}
.section-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}
.section-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.section-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Dropzone */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--bg-section);
  position: relative;
}
.dropzone:hover,
.dropzone.drag-over {
  border-color: var(--accent);
  background: var(--accent-glow);
}
.dropzone-icon {
  font-size: 32px;
  margin-bottom: 10px;
  line-height: 1;
}
.dropzone-text {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 6px;
}
.dropzone-hint {
  font-size: 11px;
  color: var(--text-dim);
}
.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  font-size: inherit;
  font-family: inherit;
  text-decoration: underline;
  padding: 0;
}
.link-btn:hover {
  color: var(--accent-dark);
}

/* Preview grid */
.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.preview-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--bg-section);
  border: 1px solid var(--border);
}
.preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.preview-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,0.7);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  line-height: 1;
}
.preview-remove:hover {
  background: var(--error);
}

/* Submit area */
.submit-area {
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.counters {
  font-size: 13px;
  color: var(--text-muted);
}
.counters span {
  color: var(--accent);
  font-weight: 600;
}
.btn-submit {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s, opacity 0.2s;
  white-space: nowrap;
}
.btn-submit:hover:not(:disabled) {
  background: var(--accent-dark);
  transform: translateY(-1px);
}
.btn-submit:active:not(:disabled) {
  transform: translateY(0);
}
.btn-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.btn-icon {
  font-size: 16px;
}

/* Progress */
.progress-area {
  padding: 0 32px 24px;
}
.progress-bar-track {
  height: 6px;
  background: var(--bg-section);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #ff9a8b);
  border-radius: 3px;
  transition: width 0.4s ease;
  width: 0%;
}
.progress-text {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

/* Result */
.result {
  margin: 0 32px 24px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}
.result.success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: var(--success);
}
.result.error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--error);
}

/* Footer */
.footer {
  text-align: center;
  padding: 16px;
  font-size: 11px;
  color: var(--text-dim);
}

/* Responsive */
@media (max-width: 600px) {
  .main { padding: 16px; }
  .card-header, .section, .submit-area { padding-left: 20px; padding-right: 20px; }
  .submit-area { flex-direction: column; align-items: stretch; }
  .btn-submit { justify-content: center; }
  .result { margin-left: 20px; margin-right: 20px; }
  .progress-area { padding-left: 20px; padding-right: 20px; }
}
