/* 渐变背景与毛玻璃风格，参考 AI文章排版 */
:root {
  --green: #a8e6cf;
  --lime: #dcedc1;
  --dark: #2e7d32;
  --text: #1b5e20;
  --muted: #558b2f;
  --white: #ffffff;
  --shadow: rgba(0, 0, 0, 0.08);
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, var(--green) 0%, var(--lime) 100%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.app-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
}

.app-header {
  text-align: center;
  margin: 8px 0 16px;
}

.app-header h1 {
  font-size: 22px;
  margin: 0;
  color: var(--dark);
}

.subtitle {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.card {
  width: 100%;
  max-width: 720px;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  box-shadow: 0 8px 24px var(--shadow);
  padding: 16px;
}

.label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

.textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
  outline: none;
}
.textarea:focus {
  border-color: rgba(46,125,50,0.35);
  box-shadow: 0 0 0 3px rgba(46,125,50,0.12);
}

.hint {
  margin: 10px 0 12px;
  font-size: 12px;
  color: var(--muted);
}
.chip {
  display: inline-block;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(46,125,50,0.2);
  color: var(--dark);
  border-radius: 999px;
  padding: 4px 10px;
  margin-right: 6px;
  cursor: pointer;
  user-select: none;
}
.chip:hover { filter: brightness(0.98); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
  cursor: pointer;
  background: rgba(46,125,50,0.15);
  color: var(--dark);
}
.button.primary {
  background: linear-gradient(135deg, #81c784, #aed581);
  color: #fff;
}
.button:disabled { opacity: 0.6; cursor: not-allowed; }

.loading {
  margin-top: 10px;
  font-size: 13px;
  color: var(--muted);
}
.error {
  margin-top: 8px;
  padding: 8px 10px;
  border-left: 3px solid #e53935;
  background: rgba(229,57,53,0.08);
  border-radius: 8px;
  color: #c62828;
  font-size: 13px;
}

.result-section { margin-top: 14px; }
.result-section h2 {
  font-size: 16px;
  margin: 0 0 8px;
  color: var(--dark);
}

.result-block {
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 10px;
}
.result-title {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}
.result-value {
  font-size: 18px;
  color: var(--text);
}
.actions { margin-top: 8px; }

.dialect-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
@media (min-width: 540px) {
  .dialect-list { grid-template-columns: 1fr 1fr; }
}

.dialect-item {
  border: 1px solid rgba(46,125,50,0.18);
  border-radius: 10px;
  padding: 8px;
  background: rgba(255,255,255,0.95);
}
.dialect-item .dialect-name {
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 4px;
}
.dialect-item .dialect-title { font-size: 15px; }
.dialect-item .dialect-roman { font-size: 12px; color: var(--muted); }
.dialect-item .dialect-notes { font-size: 12px; color: var(--muted); margin-top: 4px; }

.notes { font-size: 13px; color: var(--muted); }

.app-footer {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}