/* ========== 基础重置与全局样式 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background-color: #f5f6fa;
  color: #333;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ========== 头部样式 ========== */
.header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 15px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  cursor: pointer;
  flex-shrink: 0;
}

.logo-img {
  height: 40px;
  width: auto;
}

/* 搜索框 */
.search-box {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 25px;
  padding: 5px 15px;
  margin: 0 20px;
  flex: 1;
  max-width: 400px;
  transition: background 0.3s;
}

.search-box:focus-within {
  background: rgba(255, 255, 255, 0.35);
}

.search-box input {
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 14px;
  flex: 1;
  padding: 8px 0;
}

.search-box input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.search-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
  font-size: 16px;
  color: #fff;
}

/* 导航 */
.nav ul {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.nav ul li a {
  color: rgba(255, 255, 255, 0.85);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  transition: all 0.3s;
  white-space: nowrap;
}

.nav ul li a:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.nav ul li a.active {
  background: rgba(255, 255, 255, 0.3);
  color: #fff;
  font-weight: 600;
}

/* ========== 主要内容区 ========== */
.main-content {
  flex: 1;
  padding: 30px 40px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.app-section {
  margin-bottom: 40px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e0e0e0;
}

.section-header h2 {
  font-size: 22px;
  color: #333;
  position: relative;
  padding-left: 15px;
}

.section-header h2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 20px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-radius: 2px;
}

.view-more {
  color: #667eea;
  font-size: 14px;
  transition: color 0.3s;
}

.view-more:hover {
  color: #764ba2;
}

/* 应用网格 */
.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 20px;
}

.app-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 10px;
  background: #fff;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.app-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.app-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 10px;
  background: #f0f0f0;
}

.app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-name {
  font-size: 13px;
  color: #333;
  text-align: center;
  word-break: break-all;
  line-height: 1.3;
}

.app-type {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
  background: #f0f0f0;
  padding: 2px 8px;
  border-radius: 10px;
}

/* 无结果 */
.no-results {
  text-align: center;
  padding: 40px;
  color: #999;
  font-size: 15px;
}

/* ========== 页脚 ========== */
.footer {
  text-align: center;
  padding: 20px;
  background: #fff;
  border-top: 1px solid #e0e0e0;
  font-size: 13px;
  color: #999;
}

.footer a {
  color: #667eea;
}

.footer a:hover {
  text-decoration: underline;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .header {
    padding: 12px 15px;
    flex-direction: column;
    gap: 12px;
  }

  .search-box {
    max-width: 100%;
    margin: 0;
    width: 100%;
  }

  .nav ul {
    justify-content: center;
  }

  .nav ul li a {
    padding: 6px 12px;
    font-size: 12px;
  }

  .main-content {
    padding: 20px 15px;
  }

  .app-grid {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
  }

  .app-item {
    padding: 15px 8px;
  }

  .app-icon {
    width: 50px;
    height: 50px;
  }

  .app-name {
    font-size: 12px;
  }
}