/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Arial Rounded MT Bold', 'Helvetica Rounded', Arial, sans-serif;
}

/* 页面背景和整体布局 */
body {
  background-color: #f0f8ff;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}

/* 标题样式 */
.title {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: #2c3e50;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
  animation: fadeIn 1s ease-in-out;
}

.subtitle {
  font-size: 1.2rem;
  color: #7f8c8d;
  margin-bottom: 2rem;
  font-weight: normal;
}

.main-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 2rem 0;
  width: 100%;
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.05), rgba(46, 204, 113, 0.05));
  border-radius: 12px;
}

/* 导航链接容器 */
.nav-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  width: 100%;
  max-width: 800px;
}

/* 统一按钮样式 */
.btn {
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: bold;
  padding: 0.9rem 1.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

/* 主按钮样式 */
.btn-primary {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(52, 152, 219, 0.2);
  background: linear-gradient(135deg, #4da6ff, #3498db);
}

.btn-primary:active {
  transform: translateY(-1px);
}

/* 成功按钮样式 */
.btn-success {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: white;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.btn-success:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(46, 204, 113, 0.2);
  background: linear-gradient(135deg, #58d68d, #2ecc71);
}

.btn-success:active {
  transform: translateY(-1px);
}

/* 导航链接样式 */
.nav-link {
  border: none;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: bold;
  padding: 1.2rem 2.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  flex: 1;
  min-width: 200px;
  max-width: 300px;
}

.nav-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(52, 152, 219, 0.2);
  background: linear-gradient(135deg, #4da6ff, #3498db);
}

.nav-link:active {
  transform: translateY(-1px);
}

/* 模态框样式 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background-color: white;
  padding: 2rem;
  border-radius: 12px;
  width: 100%;
  max-width: 500px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.15);
  position: relative;
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
}

/* 表单样式 */
.form-group {
  margin-bottom: 1.5rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
  color: #2c3e50;
}

input, select, textarea {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid #ecf0f1;
  border-radius: 8px;
  font-size: 1rem;
}

textarea {
  min-height: 100px;
  resize: vertical;
}

.submit-btn {
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: bold;
  padding: 0.9rem 1.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: white;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  width: 100%;
  margin-top: 1rem;
}

.submit-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(46, 204, 113, 0.2);
  background: linear-gradient(135deg, #58d68d, #2ecc71);
}

.submit-btn:active {
  transform: translateY(-1px);
}

/* 列表项通用样式 */
.list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem 1.5rem;
  margin-bottom: 1rem;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}

.list-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 列表内容区域 */
.list-content {
  flex: 1;
  text-align: left;
}

/* 列表操作按钮区域 */
.list-actions {
  display: flex;
  gap: 0.5rem;
  white-space: nowrap;
}

/* 统计区域样式 */
.score-summary {
  display: flex;
  justify-content: space-around;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.summary-item {
  background-color: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  flex: 1;
  min-width: 200px;
  text-align: center;
}

.summary-item h3 {
  color: #7f8c8d;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.summary-item p {
  font-size: 2rem;
  font-weight: bold;
  color: #2c3e50;
}

.archive-controls {
  text-align: center;
  margin-bottom: 2rem;
}

/* 错误点击样式 */
.grid-item.incorrect {
  background-color: #ff4444;
  animation: shake 0.5s;
}

.jade-stone { display: flex; width: 100%; height: 60px; margin-bottom: 10px; }
.jade-half { flex: 1; padding: 10px; border: 1px solid #ddd; }
.jade-half.match-1 { background-color: #ffcccc !important; } /* 浅红色 */
.jade-half.match-2 { background-color: #cce5ff !important; } /* 浅蓝色 */

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
}

/* 动画效果 */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .title {
    font-size: 2rem;
  }

  .nav-link {
    padding: 1rem 2rem;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
  }

  .nav-container {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-link {
    width: 100%;
    max-width: none;
  }
}