* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-bg-hover: rgba(255, 255, 255, 0.8);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --text: #1e293b;
  --text-secondary: #64748b;
  --primary: #2563eb;
  --radius: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  background: #e8e8e8;
}

/* 背景图层 */
body.has-bg {
  background: none;
}

#bg-layer {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: -1;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

#bg-layer::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.15);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 主体 */
.main {
  padding: 40px 0;
  min-height: 100vh;
}

.loading {
  text-align: center;
  color: var(--text-secondary);
  font-size: 15px;
  padding: 80px 20px;
}

.loading i {
  margin-right: 8px;
}

/* 分类区块 */
.category-section {
  margin-bottom: 32px;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding: 12px 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--glass-shadow);
}

.category-header i {
  color: var(--primary);
  font-size: 16px;
}

.category-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.category-count {
  font-size: 12px;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.5);
  padding: 2px 10px;
  border-radius: 12px;
  margin-left: auto;
}

/* 导航网格 */
.nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.nav-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: all 0.3s ease;
  cursor: pointer;
}

.nav-card:hover {
  background: var(--glass-bg-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.nav-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.nav-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

.nav-card-icon img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.nav-card-icon i {
  font-size: 20px;
  color: var(--primary);
}

.nav-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-card-desc {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 14px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
}

/* 域名入口 */
.nav-urls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.url-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  background: rgba(255,255,255,0.5);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  transition: all 0.2s;
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
}

.url-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.url-btn i {
  font-size: 11px;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 100px 20px;
  color: var(--text-secondary);
}

.empty-state i {
  font-size: 56px;
  margin-bottom: 20px;
  opacity: 0.4;
}

/* 底部 */
.footer {
  color: var(--text-secondary);
  text-align: center;
  padding: 24px;
  font-size: 13px;
}

/* 响应式 */
@media (max-width: 768px) {
  .nav-grid {
    grid-template-columns: 1fr;
  }
  .main {
    padding: 20px 0;
  }
}
