:root {
  color-scheme: light;
  --primary: #60A5FA;
  --primary-dark: #3B82F6;
  --secondary: #A78BFA;
  --background: #FFFFFF;
  --foreground: #1E293B;
  --muted: #F8FAFC;
  --muted-foreground: #64748B;
  --border: #E2E8F0;
  --card: #FFFFFF;
}

html.dark {
  color-scheme: dark;
  --primary: #60A5FA;
  --primary-dark: #3B82F6;
  --secondary: #A78BFA;
  --background: #0F172A;
  --foreground: #F8FAFC;
  --muted: #1E293B;
  --muted-foreground: #94A3B8;
  --border: #334155;
  --card: #1E293B;
}

body {
  font-family: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  line-height: 1.6;
  background: var(--background);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  padding: 0.6rem 1rem;
  font-weight: 600;
  background: var(--primary);
  color: white;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  padding: 0.55rem 0.95rem;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--foreground);
  background: var(--card);
  transition: all 0.2s ease;
}

.btn-ghost:hover {
  background: var(--muted);
  border-color: var(--primary);
}

.btn-ghost:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.card {
  display: block;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 1.25rem;
  transition: all 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-dark);
  background: rgba(96, 165, 250, 0.1);
  white-space: nowrap;
}

html.dark .badge {
  color: var(--primary);
  background: rgba(96, 165, 250, 0.2);
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--muted);
  color: var(--foreground);
}

.pill-link {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--card);
  color: var(--foreground);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.pill-link:hover {
  background: var(--muted);
  border-color: var(--primary);
}

.link {
  color: var(--primary);
  transition: color 0.2s ease;
  text-decoration: none;
}

.link:hover {
  color: var(--primary-dark);
}

.textarea {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 0.75rem;
  font-size: 0.95rem;
  line-height: 1.5;
  outline: none;
  font-family: inherit;
}

.textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15);
}

.result {
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: var(--muted);
  padding: 0.75rem;
  min-height: 8rem;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--foreground);
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}



.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

header {
  backdrop-filter: blur(10px);
}
