:root {
  --primary: #2117ce;
  --card-bg: #f8f9ff;
  --btn-bg: #79bbf2;
  --btn-hover: #5aa0e8;
  --border: #e5e7eb;
  --text: #111827;
  --text-light: #6b7280;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html, body {
  min-height: 100vh;
  background: linear-gradient(120deg, #f5f7ff, #ffffff);
  color: var(--text);
  padding: 2rem 1rem;
  scroll-behavior: smooth;
}

/* 加载状态 */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 1rem;
  color: var(--text-light);
}
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 页头 */
.page-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--border);
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}
.page-title {
  font-size: 2.5rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.page-desc {
  color: var(--text-light);
  font-size: 1.1rem;
}

/* 搜索框 */
.search-bar {
  max-width: 1200px;
  margin: 0 auto 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(120deg, #f5f7ff, #ffffff);
  padding: 1rem 0;
}
.search-bar input {
  width: 100%;
  padding: 0.9rem 1.5rem;
  border: 2px solid var(--border);
  border-radius: 30px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background: #fff;
  color: var(--text);
}
.search-bar input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(33, 23, 206, 0.08);
}

/* 导航容器 */
.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* 模块卡片 */
.module-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.module-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(33, 23, 206, 0.08);
}
.module-title {
  font-size: 1.6rem;
  margin-bottom: 1.8rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--primary);
  border-bottom: 1px dashed var(--border);
  padding-bottom: 0.8rem;
}

/* 链接按钮 */
.link-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
.link-item {
  text-decoration: none;
  color: var(--text);
  background: var(--btn-bg);
  padding: 0.8rem 1.3rem;
  border-radius: 25px;
  white-space: nowrap;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.link-item:hover {
  background: var(--btn-hover);
  color: #fff;
  transform: scale(1.03);
  box-shadow: 0 4px 8px rgba(90, 160, 232, 0.2);
}
.link-item.hidden { display: none; }
.no-results {
  text-align: center;
  color: var(--text-light);
  padding: 3rem;
  font-size: 1.1rem;
}

/* 页脚 */
.page-footer {
  max-width: 1200px;
  margin: 4rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-light);
}
.footer-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
.footer-link:hover { text-decoration: underline; }
.admin-link {
  display: inline-block;
  margin-top: 0.8rem;
  padding: 0.4rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}
.admin-link:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* 移动端适配 */
@media (max-width: 768px) {
  html, body { padding: 1.5rem 0.8rem; }
  .page-title { font-size: 2rem; }
  .module-card { padding: 1.5rem; }
  .module-title { font-size: 1.4rem; margin-bottom: 1.5rem; }
  .link-item { padding: 0.7rem 1.1rem; font-size: 0.9rem; }
  .nav-container { gap: 1.5rem; }
  .search-bar { padding: 0.8rem 0; }
}
@media (max-width: 480px) {
  .page-title { font-size: 1.8rem; }
  .link-group { gap: 0.8rem; }
  .link-item { padding: 0.65rem 0.9rem; font-size: 0.85rem; }
  .module-card { padding: 1.2rem; }
}
