/* 基础样式重置 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
  background-color: #f8f8f8;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* 标题样式 */
h1 {
  font-size: 28px;
  font-weight: 600;
  color: #333;
  margin-bottom: 24px;
  text-align: center;
  padding: 16px 0;
  background: linear-gradient(135deg, #ff6b6b, #f9d423);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h2 {
  font-size: 20px;
  font-weight: 500;
  color: #333;
  margin: 20px 0 16px;
  border-left: 4px solid #ff6b6b;
  padding-left: 12px;
}

/* 表单样式 */
.form-container {
  background-color: #fff;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.form-group {
  margin-bottom: 16px;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  margin-bottom: 8px;
}

input[type="number"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
}

input[type="number"]:focus {
  outline: none;
  border-color: #ff6b6b;
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

button {
  background: linear-gradient(135deg, #ff6b6b, #f9d423);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

button:active {
  transform: translateY(0);
}

/* 表格样式 */
table {
  width: 100%;
  border-collapse: collapse;
  background-color: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

th, td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid #f0f0f0;
}

th {
  background-color: #f9f9f9;
  font-weight: 500;
  color: #666;
  font-size: 14px;
}

tr:hover {
  background-color: #f9f9f9;
}

tr:last-child td {
  border-bottom: none;
}

/* 结果容器 */
.result-container {
  margin-top: 20px;
  min-height: 200px;
}

#resultContent {
  margin-top: 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding: 12px;
  }
  
  h1 {
    font-size: 24px;
  }
  
  h2 {
    font-size: 18px;
  }
  
  .form-container {
    padding: 16px;
  }
  
  table {
    font-size: 14px;
  }
  
  th, td {
    padding: 10px;
  }
  
  /* 手机屏幕下表格横向滚动 */
  .result-container {
    overflow-x: auto;
  }
  
  table {
    min-width: 600px;
  }
}

/* 导航样式 */
nav {
  margin-top: 20px;
  text-align: center;
}

nav a {
  display: inline-block;
  padding: 10px 20px;
  background-color: #fff;
  color: #ff6b6b;
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

nav a:hover {
  background-color: #ff6b6b;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

/* 创意名称链接样式 */
a {
  color: #ff6b6b;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #ff4757;
  text-decoration: underline;
}

/* 图表容器 */
#chartContainer {
  background-color: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* 加载状态 */
.loading {
  text-align: center;
  padding: 40px;
  color: #666;
}

/* 错误信息 */
.error {
  color: #ff4757;
  background-color: #ffe6e6;
  padding: 12px;
  border-radius: 8px;
  margin-top: 16px;
}

/* 成功信息 */
.success {
  color: #2ed573;
  background-color: #e6ffe6;
  padding: 12px;
  border-radius: 8px;
  margin-top: 16px;
}