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

:root {
  --primary: #e65c41;
  --primary-light: #f0856b;
  --bg: #faf9f7;
  --card: #ffffff;
  --text: #2d2d2d;
  --text-light: #888888;
  --border: #eeeeee;
  --warn-bg: #fff3e0;
  --shadow: 0 2px 20px rgba(0,0,0,0.06);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
}

/* Header */
.header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary);
}
.logo span {
  color: var(--text);
  font-weight: 400;
  font-size: 14px;
  margin-left: 6px;
}
.free-badge {
  background: var(--warn-bg);
  color: var(--primary);
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 500;
}
.free-badge .count { font-weight: 700; }

/* Main Tool */
.main-tool {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px;
}
.tool-header {
  text-align: center;
  margin-bottom: 24px;
}
.tool-header h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.tool-header p {
  color: var(--text-light);
  font-size: 15px;
}

/* Input Area */
.input-area {
  background: var(--card);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.input-area textarea {
  width: 100%;
  min-height: 180px;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  font-size: 15px;
  line-height: 1.7;
  resize: vertical;
  font-family: inherit;
  transition: border-color 0.2s;
  background: var(--card);
  color: var(--text);
}
.input-area textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.input-area textarea::placeholder { color: #ccc; }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  gap: 12px;
  flex-wrap: wrap;
}
.style-select {
  padding: 10px 16px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  background: var(--card);
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
}
.style-select:focus {
  outline: none;
  border-color: var(--primary);
}
.char-count {
  font-size: 13px;
  color: #aaa;
  flex-shrink: 0;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border: none;
  padding: 12px 32px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  font-family: inherit;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(230,92,65,0.3);
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Examples */
.examples-section { margin-bottom: 20px; }
.examples-section h3 {
  font-size: 14px;
  color: #999;
  margin-bottom: 10px;
  font-weight: 500;
}
.example-cards {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.example-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  font-size: 13px;
  color: #666;
  transition: all 0.2s;
  flex: 1;
  min-width: 180px;
  line-height: 1.5;
}
.example-card:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.example-card .tag {
  display: inline-block;
  background: var(--warn-bg);
  color: var(--primary);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
  font-weight: 500;
}

/* Result Area */
.result-area {
  display: none;
  background: var(--card);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.result-area.active { display: block; }
.result-header {
  padding: 16px 24px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.result-header h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary);
}
.result-actions { display: flex; gap: 8px; }
.btn-sm {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all 0.15s;
}
.btn-copy { background: #f5f5f5; color: #555; }
.btn-copy:hover { background: #eee; }
.btn-share { background: var(--primary); color: #fff; }
.btn-share:hover { background: #d44d33; }

.compare-view {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.compare-panel {
  padding: 24px;
  min-height: 200px;
}
.compare-panel.before {
  background: #fafafa;
  border-right: 1px solid #f0f0f0;
}
.compare-panel .panel-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
  font-weight: 600;
}
.compare-panel.before .panel-title { color: #888; }
.compare-panel.after .panel-title { color: var(--primary); }
.compare-panel .content {
  font-size: 15px;
  line-height: 1.8;
  white-space: pre-wrap;
  color: var(--text);
}
.compare-panel.after .content { color: #1a1a1a; }

/* Hints */
.upgrade-hint {
  display: none;
  background: linear-gradient(135deg, var(--warn-bg), #ffe0c0);
  border-radius: 0 0 16px 16px;
  padding: 16px 20px;
  text-align: center;
  font-size: 14px;
  color: var(--primary);
}
.upgrade-hint.active { display: block; }

.error-hint {
  display: none;
  background: #fff0f0;
  border-radius: 0 0 16px 16px;
  padding: 16px 20px;
  text-align: center;
  font-size: 14px;
  color: #d44d33;
}
.error-hint.active { display: block; }

/* Loading */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.9);
  z-index: 200;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}
.loading-overlay.active { display: flex; }
.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid #eee;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 15px; color: var(--text-light); }

/* Share Modal */
.share-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  justify-content: center;
  align-items: center;
}
.share-modal.active { display: flex; }
.share-card {
  background: var(--card);
  border-radius: 20px;
  padding: 32px;
  max-width: 420px;
  width: 90%;
  text-align: center;
}
.share-card h3 { font-size: 18px; margin-bottom: 8px; }
.share-card > p { color: var(--text-light); font-size: 14px; margin-bottom: 20px; }
.share-preview {
  background: #fafafa;
  border-radius: 12px;
  padding: 16px;
  text-align: left;
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 16px;
}
.share-before-label { color: #888; margin-bottom: 4px; font-size: 12px; font-weight: 600; }
.share-after-label { color: var(--primary); margin-bottom: 4px; margin-top: 12px; font-size: 12px; font-weight: 600; }
#shareBefore { color: #999; margin-bottom: 4px; }
#shareAfter { color: #1a1a1a; }
.share-watermark {
  font-size: 11px;
  color: #ccc;
  margin-bottom: 16px;
}
.btn-close {
  padding: 10px 24px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
}

/* Features */
.features {
  max-width: 960px;
  margin: 60px auto;
  padding: 0 20px;
}
.features h2 {
  text-align: center;
  font-size: 24px;
  margin-bottom: 40px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--card);
  border-radius: 16px;
  padding: 28px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  text-align: center;
}
.feature-icon { font-size: 36px; margin-bottom: 12px; }
.feature-card h3 { font-size: 17px; margin-bottom: 8px; }
.feature-card p { color: var(--text-light); font-size: 14px; line-height: 1.6; }

/* FAQ */
.faq {
  max-width: 960px;
  margin: 60px auto;
  padding: 0 20px;
}
.faq h2 {
  text-align: center;
  font-size: 24px;
  margin-bottom: 40px;
}
.faq-item {
  background: var(--card);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 12px;
  box-shadow: 0 1px 8px rgba(0,0,0,0.03);
}
.faq-item h4 { font-size: 15px; margin-bottom: 6px; }
.faq-item p { color: var(--text-light); font-size: 14px; line-height: 1.6; }

/* Footer */
.footer {
  text-align: center;
  padding: 40px;
  color: #ccc;
  font-size: 13px;
}

/* Responsive */
@media (max-width: 768px) {
  .compare-view { grid-template-columns: 1fr; }
  .compare-panel.before {
    border-right: none;
    border-bottom: 1px solid #f0f0f0;
  }
  .feature-grid { grid-template-columns: 1fr; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .btn-primary {
    width: 100%;
    text-align: center;
  }
  .example-cards { flex-direction: column; }
  .tool-header h1 { font-size: 22px; }
  .header { padding: 10px 16px; }
  .logo { font-size: 17px; }
}
