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

:root {
  --primary-color: #065f46; /* Deep Emerald Green */
  --secondary-color: #10b981; /* Emerald Green */
  --accent-color: #991b1b; /* Red 800 */
  --bg-light: #f9fafb;
  --bg-white: #ffffff;
  --card-bg: #ffffff;
  --card-hover: #ecfdf5;
  --text-color: #064e3b;
  --text-muted: #6b7280;
  --border-color: #e5e7eb;
  --success-color: #059669;
  --warning-color: #d97706;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', 'Liberation Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  background: var(--bg-light);
  background-image: 
    radial-gradient(circle at 0% 0%, rgba(6, 95, 70, 0.03) 0%, transparent 30%),
    radial-gradient(circle at 100% 100%, rgba(16, 185, 129, 0.03) 0%, transparent 30%);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
}

/* 导航菜单 */
.main-nav {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  position: sticky;
  top: 20px;
  z-index: 100;
}

.nav-links {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  padding: 8px;
  border-radius: 50px;
  border: 1px solid var(--border-color);
  display: flex;
  gap: 5px;
  box-shadow: var(--shadow);
}

.nav-item {
  padding: 10px 25px;
  border-radius: 40px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95em;
  transition: all 0.3s;
}

.nav-item:hover {
  color: var(--primary-color);
  background: rgba(6, 95, 70, 0.05);
}

.nav-item.active {
  background: var(--primary-color);
  color: #fff;
  box-shadow: 0 4px 12px rgba(6, 95, 70, 0.2);
}

.view-section {
  animation: slideUpFade 0.5s ease-out;
}

@keyframes slideUpFade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 头部 */
header {
  text-align: center;
  padding: 80px 20px 60px;
}

header h1 {
  font-size: 3.5em;
  margin-bottom: 20px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -2px;
  position: relative;
  display: inline-block;
}

header h1::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 20%;
  right: 20%;
  height: 4px;
  background: var(--primary-color);
  border-radius: 2px;
}

.subtitle {
  font-size: 1.1em;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 2px;
  margin-top: 10px;
}

/* 输入区域 */
.input-section {
  background: var(--bg-white);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow);
  margin-bottom: 40px;
  border: 1px solid var(--border-color);
}

.input-container {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

textarea {
  width: 100%;
  padding: 20px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  font-size: 1.1em;
  font-family: inherit;
  resize: vertical;
  transition: all 0.3s;
  background: #f1f5f9;
  color: var(--text-color);
}

textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(6, 95, 70, 0.05);
}

/* 验证码区域 */
.captcha-container {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 5px;
}

.captcha-img-box {
  background: white;
  border-radius: 8px;
  height: 48px;
  cursor: pointer;
  overflow: hidden;
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
}

#captchaImg {
  height: 100%;
}

.captcha-input {
  width: 120px;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #f1f5f9;
  color: var(--text-color);
  font-size: 1em;
}

.primary-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 14px 40px;
  border-radius: 8px;
  font-size: 1.1em;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  align-self: flex-end;
}

.primary-btn:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(6, 95, 70, 0.15);
}

.primary-btn:disabled {
  background: var(--text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* 结果区域 */
.result-section {
  margin-top: 40px;
}

.result-card {
  background: var(--bg-white);
  border-radius: 24px;
  padding: 50px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  position: relative;
}

.result-title {
  font-size: 2.2em;
  color: #0f172a;
  margin-bottom: 40px;
  text-align: center;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border-color);
  font-weight: 900;
}

.section {
  margin-bottom: 40px;
}

.section h3 {
  font-size: 1.4em;
  margin-bottom: 20px;
  color: #0f172a;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 12px;
}

.info-grid {
  display: grid;
  gap: 20px;
}

.info-item {
  background: #f8fafc;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: all 0.3s;
}

.info-item:hover {
  border-color: var(--primary-color);
  background: #fff;
  box-shadow: var(--shadow);
}

.info-item strong {
  color: var(--primary-color);
  display: block;
  margin-bottom: 10px;
  font-weight: 700;
  font-size: 0.9em;
  text-transform: uppercase;
}

.status-badge {
  display: inline-block;
  background: rgba(6, 95, 70, 0.05);
  color: var(--primary-color);
  padding: 8px 20px;
  border-radius: 50px;
  font-weight: 700;
  margin-bottom: 25px;
  border: 1px solid rgba(6, 95, 70, 0.1);
}

.evaluation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 20px;
}

.eval-column {
  background: #f8fafc;
  padding: 30px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.eval-column h4 {
  margin-bottom: 20px;
  font-size: 1.2em;
  color: #0f172a;
  font-weight: 800;
}

.eval-item {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  margin-bottom: 15px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.disadvantages .eval-item {
  border-left: 4px solid var(--accent-color);
}

.advantages .eval-item {
  border-left: 4px solid var(--success-color);
}

.summary-text {
  background: #f1f5f9;
  padding: 30px;
  border-radius: 16px;
  font-size: 1.15em;
  line-height: 1.8;
  color: #334155;
  border: 1px solid var(--border-color);
}

.conclusion-section {
  background: linear-gradient(135deg, #064e3b 0%, #10b981 100%);
  padding: 50px;
  border-radius: 20px;
  color: white;
  text-align: center;
  box-shadow: 0 20px 40px rgba(6, 95, 70, 0.1);
}

.conclusion-section h3 {
  color: rgba(255, 255, 255, 0.9);
}

.conclusion-text {
  font-size: 1.8em;
  font-weight: 900;
  line-height: 1.4;
  margin-top: 20px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.action-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
}

.action-group {
  display: flex;
  gap: 15px;
}

.like-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f1f5f9;
  color: #1e293b;
  border: 1px solid var(--border-color);
  padding: 12px 25px;
  border-radius: 50px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
}

.like-btn:hover {
  background: #fff;
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
}

.secondary-btn {
  background: #fff;
  color: var(--text-color);
  border: 1px solid var(--border-color);
  padding: 12px 25px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
}

.secondary-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: #f8fafc;
}

/* 热门词云 */
.popular-section, .recent-section {
  background: var(--bg-white);
  border-radius: 24px;
  padding: 40px;
  box-shadow: var(--shadow);
  margin-bottom: 40px;
  border: 1px solid var(--border-color);
}

.popular-section h2, .recent-section h2 {
  color: #0f172a;
  margin-bottom: 40px;
  font-size: 1.8em;
  font-weight: 900;
  text-align: center;
}

.word-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: center;
  align-items: center;
  min-height: 300px;
  padding: 20px;
}

.word-item {
  display: inline-block;
  padding: 12px 28px;
  background: #f1f5f9;
  color: #334155;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid var(--border-color);
  max-width: 320px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  text-decoration: none; /* Remove underline */
}

.word-item:hover {
  border-color: var(--primary-color);
  color: white;
  background: var(--primary-color);
  transform: scale(1.1) translateY(-5px);
  box-shadow: 0 10px 20px rgba(6, 95, 70, 0.15);
  z-index: 10;
}

/* 最新列表 */
.recent-list {
  display: grid;
  gap: 20px;
}

.recent-item {
  display: block; /* Ensure <a> behaves as block */
  text-decoration: none; /* Remove underline */
  background: #f8fafc;
  padding: 30px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s;
  border: 1px solid var(--border-color);
}

.recent-item:hover {
  border-color: var(--primary-color);
  background: #fff;
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.recent-item-title {
  font-size: 1.3em;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 15px;
}

.recent-item-conclusion {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 15px;
}

/* 模态框 */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s;
}

.modal-content {
  background-color: var(--bg-white);
  margin: 5vh auto;
  padding: 0;
  border-radius: 30px;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
}

.close {
  position: absolute;
  top: 20px;
  right: 25px;
  color: var(--text-muted);
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
}

#modalBody {
  padding: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  header {
    padding: 40px 15px 30px;
  }

  header h1 {
    font-size: 2.2em;
    margin-bottom: 15px;
  }

  .subtitle {
    font-size: 0.95em;
    letter-spacing: 1px;
  }

  /* 输入区域 */
  .input-section {
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 16px;
  }

  .input-container {
    gap: 15px;
  }

  textarea {
    padding: 15px;
    font-size: 1em;
    border-radius: 8px;
  }

  .captcha-container {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .captcha-input {
    width: 100%;
    flex: 1;
  }

  .captcha-img-box {
    width: 100%;
    height: 45px;
  }

  .primary-btn {
    align-self: stretch;
    padding: 12px 20px;
    font-size: 1em;
  }

  /* 结果卡片 */
  .result-card {
    padding: 20px;
    border-radius: 16px;
  }

  .result-title {
    font-size: 1.6em;
    margin-bottom: 25px;
    padding-bottom: 20px;
  }

  .section {
    margin-bottom: 25px;
  }

  .section h3 {
    font-size: 1.15em;
    margin-bottom: 15px;
    gap: 8px;
  }

  .info-grid {
    gap: 12px;
  }

  .info-item {
    padding: 16px;
    border-radius: 10px;
  }

  .info-item strong {
    font-size: 0.85em;
    margin-bottom: 8px;
  }

  .evaluation-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 15px;
  }

  .eval-column {
    padding: 16px;
    border-radius: 12px;
  }

  .eval-column h4 {
    font-size: 1.05em;
    margin-bottom: 12px;
  }

  .eval-item {
    padding: 14px;
    margin-bottom: 10px;
    border-radius: 8px;
    font-size: 0.95em;
    line-height: 1.5;
  }

  .eval-item strong {
    font-size: 0.9em;
    margin-bottom: 6px;
  }

  /* 摘要和结论 */
  .summary-text {
    padding: 20px;
    border-radius: 12px;
    font-size: 1em;
    line-height: 1.7;
  }

  .conclusion-section {
    padding: 25px;
    border-radius: 16px;
    text-align: center;
  }

  .conclusion-section h3 {
    font-size: 1em;
    margin-bottom: 12px;
  }

  .conclusion-text {
    font-size: 1.2em;
    line-height: 1.5;
    margin-top: 15px;
  }

  .action-bar {
    flex-direction: column;
    gap: 12px;
    margin-top: 25px;
    padding-top: 20px;
  }

  .action-group {
    width: 100%;
    flex-direction: column;
    gap: 10px;
  }

  .like-btn, .secondary-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 15px;
    font-size: 0.95em;
  }

  /* 热门和列表区域 */
  .popular-section, .recent-section {
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 16px;
  }

  .popular-section h2, .recent-section h2 {
    font-size: 1.4em;
    margin-bottom: 20px;
  }

  .word-cloud {
    gap: 10px;
    padding: 15px;
    min-height: 200px;
  }

  .word-item {
    padding: 10px 18px;
    font-size: 0.9em;
    border-radius: 20px;
  }

  /* 最新列表 */
  .recent-list {
    gap: 15px;
  }

  .recent-item {
    padding: 18px;
    border-radius: 12px;
  }

  .recent-item-title {
    font-size: 1.1em;
    margin-bottom: 10px;
  }

  .recent-item-conclusion {
    font-size: 0.95em;
    line-height: 1.6;
    margin-bottom: 10px;
  }

  .recent-item-meta {
    font-size: 0.85em;
  }

  /* 模态框 */
  .modal-content {
    width: 95%;
    margin: 10vh auto;
    border-radius: 20px;
    max-height: 85vh;
  }

  #modalBody {
    padding: 16px;
  }

  /* 关闭按钮 */
  .close {
    top: 15px;
    right: 15px;
    font-size: 28px;
  }
}

/* 超小屏幕（< 480px） */
@media (max-width: 480px) {
  header {
    padding: 30px 12px 20px;
  }

  header h1 {
    font-size: 1.8em;
  }

  .subtitle {
    font-size: 0.85em;
  }

  .input-section {
    padding: 15px;
  }

  textarea {
    padding: 12px;
    font-size: 16px; /* 防止iOS缩放 */
    rows: 3;
  }

  .result-card {
    padding: 15px;
  }

  .result-title {
    font-size: 1.3em;
    margin-bottom: 20px;
    padding-bottom: 15px;
  }

  .section h3 {
    font-size: 1.05em;
  }

  .info-item {
    padding: 12px;
  }

  .eval-item {
    padding: 12px;
    font-size: 0.9em;
  }

  .summary-text {
    padding: 16px;
    font-size: 0.95em;
  }

  .conclusion-text {
    font-size: 1.1em;
  }

  .word-item {
    padding: 8px 14px;
    font-size: 0.85em;
  }

  .recent-item {
    padding: 14px;
  }

  .recent-item-title {
    font-size: 1em;
  }

  .recent-item-conclusion {
    font-size: 0.9em;
  }
}
