/* 基础变量设置 */
:root {
  --primary-color: #2196F3;
  --secondary-color: #4CAF50;
  --background: #f0f8ff;
  --card-bg: #ffffff;
  --text-color: #333;
  --shadow: none;
}

body {
  font-family: 'Segoe UI', system-ui;
  background: var(--background);
  color: var(--text-color);
  transition: all 0.3s ease;
  min-height: 100vh;
  margin: 0;
  padding: 20px;
  padding-bottom: 80px; /* 为底部导航栏留出空间 */
}

/* 导航栏样式 */
.navbar {
  background: var(--card-bg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border-radius: 8px 8px 0 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 1rem 0;
}

.nav-items {
  display: flex;
  gap: 1rem;
}

.nav-item {
  color: var(--primary-color);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-item.active {
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
}

/* 页面样式 */
.page {
  display: none;
}

.page.active {
  display: block;
}

/* 卡片样式 */
.card {
  background: var(--card-bg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* 按钮样式 */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-primary:hover {
  filter: brightness(0.9);
}

.btn-secondary {
  background: #f5f7fb;
  color: var(--text-color);
  border: 1px solid #e0e7ff;
}

.btn-secondary:hover {
  background: #e0e7ff;
}

/* 颜色选择器样式 */
.color-picker {
  display: flex;
  gap: 1rem;
}

.color-option {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.color-option:hover {
  transform: scale(1.1);
}

/* 开关样式 */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  -webkit-transition: .4s;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  -webkit-transition: .4s;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--primary-color);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--primary-color);
}

input:checked + .slider:before {
  -webkit-transform: translateX(26px);
  -ms-transform: translateX(26px);
  transform: translateX(26px);
}

/* 统计网格样式 */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.stat-item {
  text-align: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: bold;
}

.stat-label {
  color: #666;
}

/* 关于部分样式 */
.about-section {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
}

.about-logo {
  width: 4rem;
  height: 4rem;
}

.version-info {
  margin-left: 1rem;
  color: #666;
}

/* 智能聊天样式 */
.chat-container {
  margin-top: 20px;
}

.chat-messages {
  min-height: 200px;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 10px;
  margin-bottom: 10px;
  overflow-y: auto;
}

.chat-input {
  display: flex;
}

.chat-input input {
  flex: 1;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  margin-right: 10px;
}

.chat-input button {
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* 手机版适配 */
@media (max-width: 768px) {
  body {
      padding-bottom: 80px;
  }

  .navbar {
      position: fixed;
      bottom: 0;
      left: 0;
      right: 0;
      border-radius: 8px 8px 0 0;
  }
}    