/* 主页样式 */

/* 头部样式增强 */
header {
  text-align: center;
  padding: 30px 0;
  background-color: var(--primary-color);
  color: white;
  border-radius: 8px;
  margin-bottom: 30px;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-bottom: 10px;
}

.logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 5px;
}

header h1 {
  margin: 0;
  font-size: 1.8rem;
}

header p {
  opacity: 0.8;
}

/* 模块卡片网格 */
.modules-container {
  margin-bottom: 40px;
}

.modules-container h2 {
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.modules-container h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background-color: var(--primary-color);
}

.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.module-card {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.module-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.module-icon {
  width: 50px;
  height: 50px;
  background-color: transparent;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: normal;
  margin-bottom: 15px;
  box-shadow: 
  0 8px 16px rgba(74, 144, 226, 0.3),
  0 4px 8px rgba(74, 144, 226, 0.2),
  inset 0 1px 0 rgba(255, 255, 255, 0.3);
transition: all 0.3s ease;
}


.module-card h3 {
  margin-bottom: 10px;
}

.module-card p {
  margin-bottom: 15px;
  color: #666;
  flex-grow: 1;
}

.module-card .button {
  align-self: flex-start;
}

/* 系统信息区域 */
.system-info {
  background-color: #f5f5f5;
  border-radius: 8px;
  padding: 20px;
}

.system-info h2 {
  margin-bottom: 15px;
}

.status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: bold;
  background-color: #f0f0f0;
  color: #666;
}

.status-badge.online {
  background-color: #28a745;
  color: white;
}

.status-badge.offline {
  background-color: #dc3545;
  color: white;
}

.status-badge.warning {
  background-color: #ffc107;
  color: #212529;
}

/* 响应式调整 */
@media (max-width: 768px) {
  .modules-grid {
    grid-template-columns: 1fr;
  }
  
  /* 头部区域优化 */
  .header-content {
    flex-direction: column;
    gap: 10px;
  }
  
  .logo {
    width: 40px;
    height: 40px;
  }
  
  header h1 {
    font-size: 1.3rem;
    line-height: 1.4;
    text-align: center;
    /* 强制在合适位置换行 */
    display: block;
  }
  
  header {
    padding: 20px 15px;
  }
}

/* 超小屏幕标题进一步优化 */
@media (max-width: 480px) {
  header h1 {
    font-size: 1.1rem;
    line-height: 1.3;
    /* 可以考虑缩写版本 */
  }
  
  /* 如果标题太长，可以用CSS隐藏部分内容 */
  header h1::after {
    content: '';
  }
}

/* 可选：为极小屏幕提供简化标题 */
@media (max-width: 375px) {
  header h1 {
    font-size: 1rem;
  }
}

/* AI服务卡片简洁样式 */
.ai-service-card {
  cursor: pointer;
  transition: all 0.3s ease;
}

/* 水土保持AI - 绿色 */
.soil-ai-card {
  background-color: #e8f5e8;
  border-left: 5px solid #27ae60;
}

.soil-ai-card:hover {
  background-color: #d5f2d5;
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(39, 174, 96, 0.2);
}

/* 水资源AI - 蓝色 */
.water-ai-card {
  background-color: #e3f2fd;
  border-left: 5px solid #3498db;
}

.water-ai-card:hover {
  background-color: #cce7ff;
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(52, 152, 219, 0.2);
}

/* 隐藏原按钮样式，让文字看起来像标签 */
.ai-service-card .card-button {
  background: none;
  border: none;
  color: #666;
  font-size: 12px;
  pointer-events: none;
}
