* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #333;
  line-height: 1.5;
  min-height: 100vh;
  padding: 20px;
}

.container {
  width: 100%;
  margin: 0 auto;
}

.content {
  width: 100%;
}

header {
  text-align: center;
  margin-bottom: 12px;
  padding: 20px;
}

.page-title {
  font-size: 2.5rem;
  color: white;
  margin-bottom: 10px;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.page-subtitle {
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  margin-top: 8px;
  margin-bottom: 0;
  font-weight: normal;
}

/* ========== 公告图标（透明背景，悬浮在分类右上角） ========== */
#nav-container {
  position: relative;
}

.global-announce-icon {
  position: absolute;
  right: 8px;
  top: -38px;
  font-size: 1.4rem;
  cursor: pointer;
  opacity: 0.9;
  transition: all 0.2s;
  user-select: none;
  z-index: 10;
  /* 无背景，仅文字阴影增加可见度 */
  text-shadow: 0 0 6px rgba(255,255,255,0.5);
}

.global-announce-icon:hover {
  opacity: 1;
  transform: scale(1.15);
  text-shadow: 0 0 10px rgba(255,255,255,0.8);
}

/* ========== 分类容器 ========== */
.categories-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  width: 100%;
  padding: 0;
}

.category-section {
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  width: 100%;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.category-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.category-title {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
}

.category-title-main {
  font-size: inherit;
  font-weight: inherit;
}

.category-subtitle {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
  white-space: nowrap;
}

.site-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 15px;
  padding: 20px;
}

.site-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px 10px;
  border-radius: 12px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  color: #333;
  height: 100%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.site-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.98);
}

.site-card.external {
  background: rgba(255, 255, 255, 0.85);
}
.site-card.external:hover {
  background: rgba(255, 255, 255, 0.98);
}

/* 七种淡色背景 */
.site-card.vip-red {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}
.site-card.vip-red:hover {
  background: linear-gradient(135deg, #fff5f5 0%, #fee2e2 100%);
}
.site-card.vip-orange {
  background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
}
.site-card.vip-orange:hover {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
}
.site-card.vip-yellow {
  background: linear-gradient(135deg, #fef9c3 0%, #fde047 100%);
}
.site-card.vip-yellow:hover {
  background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
}
.site-card.vip-green {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
}
.site-card.vip-green:hover {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}
.site-card.vip-blue {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}
.site-card.vip-blue:hover {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}
.site-card.vip-purple {
  background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
}
.site-card.vip-purple:hover {
  background: linear-gradient(135deg, #faf5ff 0%, #f3e8ff 100%);
}
.site-card.vip-gray {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}
.site-card.vip-gray:hover {
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

.site-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  margin-bottom: 10px;
  object-fit: cover;
  background-color: #f0f0f0;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
  color: #555;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.site-name {
  font-weight: 600;
  text-align: center;
  margin-bottom: 4px;
  font-size: 0.9rem;
  line-height: 1.2;
  color: #222;
}

.site-desc {
  font-size: 0.75rem;
  color: #666;
  text-align: center;
  word-break: break-all;
  line-height: 1.2;
}

.loading {
  text-align: center;
  color: white;
  font-size: 1.1rem;
  padding: 50px;
}

#tsparticles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.page-footer {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  margin-top: 24px;
  margin-bottom: 24px;
  line-height: 1.6;
}

/* ========== 移动端 ========== */
@media (max-width: 768px) {
  body { padding: 10px; }
  .page-title { font-size: 1.8rem; }

  .global-announce-icon {
    right: 6px;
    top: -32px;
    font-size: 1.2rem;
  }

  .site-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    padding: 15px;
  }
  .category-section { width: 100%; }
  .site-icon { width: 40px; height: 40px; }
  .category-title { padding: 6px 12px; }
}

/* ========== PC端 ========== */
@media (min-width: 769px) {
  .container { width: 90% !important; max-width: 1400px; margin: 0 auto; }
  .category-section { width: calc(50% - 10px); }
}

@media (min-width: 1200px) {
  .site-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
}