* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* 移除所有图片的默认边框和轮廓 */
img {
  border: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

:root {
  --primary-color: #6366f1;
  --primary-light: #818cf8;
  --bg-color: #f8fafc;
  --card-bg: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Noto Sans SC", sans-serif;
  background: var(--bg-color);
  min-height: 100vh;
  color: var(--text-primary);
  line-height: 1.6;
}

.app {
  max-width: 100%;
  margin: 0 auto;
  background: var(--bg-color);
}



/* 桌面端样式 */
@media (min-width: 768px) {
  body {
    background: #f1f5f9;
  }

  .app {
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    margin: 20px auto;
  }

  .header {
    border-radius: 8px;
  }

  .footer {
    border-radius: 8px;
  }

  .main {
    padding: 0 10px 8px 10px;
  }

  .card-content {
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    padding: 8px;
  }

  .nav-item {
    padding: 8px 4px;
  }

  .nav-text {
    font-size: 13px;
  }
}

/* 顶部标题 */
.header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 8px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  margin: 8px 0;
}

.header h1 {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 1px;
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header h1::before {
  content: '';
  display: inline-block;
  width: 36px;
  height: 36px;
  background: url('../img/logo.png') center/contain no-repeat;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .header h1 {
    font-size: 28px;
  }

  .header h1::before {
    width: 40px;
    height: 40px;
  }
}

.subtitle {
  font-size: 12px;
  opacity: 0.8;
  position: relative;
  padding: 4px 12px;
  background: rgba(255,255,255,0.1);
  border-radius: 15px;
  display: inline-block;
}

#nav-module {
  min-height: 300px;
}

@media (max-width: 480px) {
  #nav-module {
    min-height: auto;
  }
}

.main {
  padding: 0 10px 8px 10px;
}

/* 卡片 */
.card {
  background: var(--card-bg);
  border-radius: 8px;
  margin-bottom: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px;
  background: #ffffff;
  cursor: default;
  user-select: none;
}

.card-icon {
  font-size: 20px;
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.card-content {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  padding: 8px;
}

/* 导航项 */
.nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 4px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
  background: var(--bg-color);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.nav-item-static {
  cursor: default;
  background: rgba(99, 102, 241, 0.08) !important;
  font-weight: 600;
  box-shadow: none !important;
  color: var(--primary-color);
}

.nav-item:not(.nav-item-static):hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.nav-text {
  font-size: 13px;
  color: var(--text-primary);
  text-align: center;
  transition: all 0.3s ease;
  word-break: break-all;
}

/* 页脚 */
.footer {
  background: var(--card-bg);
  padding: 8px;
  text-align: center;
  border-top: 1px solid var(--border-color);
  margin: 8px 0;
  border-radius: 8px;
}

.footer-link {
  display: inline-block;
  padding: 8px 24px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

.footer-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.footer-text {
  margin-top: 8px;
  color: #475569;
  font-size: 14px;
}

/* 响应式 */
@media (max-width: 480px) {
  .card {
    transform: none !important;
  }

  .header {
    margin: 8px 5px;
    border-radius: 5px;
  }

  .footer {
    margin: 8px 5px;
    border-radius: 5px;
  }

  .card {
    border-radius: 5px;
  }

  .nav-item {
    border-radius: 5px;
  }

  .main {
    padding: 0 5px 8px 5px;
  }

  .card-content {
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    padding: 8px 5px;
  }

  .nav-item {
    padding: 8px 4px;
    transform: none !important;
    box-shadow: none !important;
  }

  .nav-item:active {
    transform: none !important;
  }

  .nav-text {
    font-size: 11px;
    color: #334155;
    font-weight: 500;
    word-break: normal;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

.footer-link {
    padding: 8px 24px;
    font-size: 14px;
  }

  .footer-text {
    font-size: 13px;
    color: #64748b;
  }
}

@media (max-width: 360px) {
  .nav-text {
    font-size: 10px;
  }
}

/* 触摸反馈 */
@media (hover: none) {
  .nav-item:active {
    transform: scale(0.95);
  }

  .search-button:active {
    transform: scale(0.9);
  }
}
