/* 只要有人 MUJI-inspired Design System */

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

body {
  font-family: "Geist", Arial, Helvetica, sans-serif;
  background-color: #fafaf8;
  color: #1a1a1a;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background-color: #ffffff;
  border-bottom: 1px solid #e8e8e5;
}

.header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #1a1a1a;
}

.header-label {
  font-size: 13px;
  color: #6b6b6b;
}

/* Page layout */
.page {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 16px 80px;
  display: grid;
  gap: 24px;
}

/* Hero */
.hero {
  display: grid;
  gap: 8px;
}

h1 {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -0.01em;
}

.subtitle {
  font-size: 14px;
  color: #6b6b6b;
  line-height: 1.6;
}

/* Card */
.card {
  background-color: #ffffff;
  border: 1px solid #e8e8e5;
  border-radius: 12px;
  padding: 20px;
  display: grid;
  gap: 14px;
}

/* Results header */
.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.results-header h2 {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
}

/* Label */
.label {
  font-size: 14px;
  font-weight: 500;
  color: #6b6b6b;
}

/* Textarea */
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #e8e8e5;
  border-radius: 8px;
  background-color: #ffffff;
  color: #1a1a1a;
  font-family: "Geist", Arial, Helvetica, sans-serif;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
  min-height: 160px;
  transition: border-color 0.15s;
}

textarea::placeholder {
  color: #c0c0c0;
}

textarea:focus {
  outline: none;
  border-color: #2d2d2d;
  box-shadow: 0 0 0 2px rgba(45, 45, 45, 0.1);
}

/* Actions */
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Buttons */
button {
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  font-family: "Geist", Arial, Helvetica, sans-serif;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

button:active {
  transform: scale(0.98);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.btn-primary {
  background-color: #1a1a1a;
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  opacity: 0.85;
}

.btn-secondary {
  background-color: #f5f5f3;
  color: #1a1a1a;
}

.btn-secondary:hover:not(:disabled) {
  background-color: #ededeb;
}

/* Caption */
.caption {
  font-size: 12px;
  color: #6b6b6b;
}

/* Progress */
.progress-wrap {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid #e8e8e5;
  border-radius: 8px;
  background-color: #fafaf8;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #6b6b6b;
}

.progress-track {
  height: 6px;
  background-color: #f0eeeb;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background-color: #2d2d2d;
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* Results */
.results {
  display: grid;
  gap: 10px;
}

.result {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid #e8e8e5;
  border-radius: 8px;
  background-color: #fafaf8;
}

.result-success {
  border-left: 3px solid #7a9e7e;
}

.result-error {
  border-left: 3px solid #c75c5c;
}

.result-status {
  font-size: 13px;
  font-weight: 600;
}

.result-success .result-status {
  color: #2d5a2d;
}

.result-error .result-status {
  color: #c75c5c;
}

.result-url {
  font-size: 12px;
  color: #6b6b6b;
  word-break: break-all;
}

.result-link {
  font-size: 13px;
  font-weight: 500;
  color: #1a1a1a;
  text-decoration: none;
  transition: opacity 0.15s;
}

.result-link:hover {
  opacity: 0.6;
}

.result-error-msg {
  font-size: 12px;
  color: #c75c5c;
}

.result-fallback {
  font-size: 12px;
  color: #9a8c5e;
}

/* ZIP download */
.zip-download a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 500;
  color: #1a1a1a;
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid #e8e8e5;
  border-radius: 8px;
  background-color: #fafaf8;
  transition: background-color 0.15s;
}

.zip-download a:hover {
  background-color: #f0eeeb;
}

/* Responsive */
@media (max-width: 640px) {
  .page {
    padding: 24px 16px 60px;
  }

  .actions {
    flex-direction: column;
  }

  .actions button {
    width: 100%;
  }
}
