/* 站长导航 - 经典导航风格 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f7fa;
  color: #333;
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* 头部 */
.site-header {
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  position: sticky; top: 0; z-index: 100;
}
.header-inner { display: flex; align-items: center; gap: 20px; height: 64px; }
.logo { display: flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 700; color: #2c5cff; }
.logo-icon { font-size: 26px; }
.search-box { flex: 1; max-width: 460px; display: flex; background: #f1f3f7; border-radius: 24px; overflow: hidden; }
.search-box input { flex: 1; border: 0; background: transparent; padding: 10px 18px; outline: none; font-size: 14px; }
.search-box button { border: 0; background: #2c5cff; color: #fff; padding: 0 24px; cursor: pointer; font-size: 14px; }
.search-box button:hover { background: #1e47d6; }
.top-nav { display: flex; gap: 18px; font-size: 15px; }
.top-nav a { color: #555; transition: color .2s; }
.top-nav a:hover { color: #2c5cff; }

.main-content { padding: 24px 0 60px; }

/* 分类标签 */
.cat-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; background: #fff; padding: 14px; border-radius: 12px; }
.cat-tab { padding: 6px 16px; border-radius: 20px; background: #f1f3f7; font-size: 14px; color: #555; transition: all .2s; }
.cat-tab:hover { background: #e4e8f0; }
.cat-tab.active { background: #2c5cff; color: #fff; }

/* 分类区块 */
.cat-section { margin-bottom: 32px; }
.cat-title { font-size: 18px; font-weight: 600; margin-bottom: 14px; padding-left: 4px; color: #222; }

/* 网站网格 */
.site-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.site-card {
  background: #fff; border-radius: 10px; padding: 14px;
  display: flex; align-items: center; gap: 12px;
  transition: all .2s; border: 1px solid #eef0f4;
  position: relative;
}
.site-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(44,92,255,0.1); border-color: #c9d5ff; }
.card-link { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.card-logo {
  width: 44px; height: 44px; border-radius: 8px; overflow: hidden;
  background: #f1f3f7; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.card-logo img { width: 100%; height: 100%; object-fit: cover; }
.logo-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #2c5cff, #6a8cff);
  color: #fff; font-size: 18px; font-weight: 700;
}
.card-info { flex: 1; min-width: 0; }
.card-name { font-size: 15px; font-weight: 600; color: #222; margin-bottom: 2px; display: flex; align-items: center; gap: 4px; }
.card-desc { font-size: 12px; color: #888; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { font-size: 10px; padding: 1px 5px; border-radius: 3px; font-weight: normal; }
.badge-top { background: #ff4d4f; color: #fff; }
.badge-rec { background: #faad14; color: #fff; }

/* 友链 */
.friend-links { background: #fff; border-radius: 12px; padding: 20px; margin-top: 30px; }
.link-list { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.link-list a { font-size: 14px; color: #555; padding: 4px 0; }
.link-list a:hover { color: #2c5cff; text-decoration: underline; }

/* 表单页 */
.form-page { max-width: 640px; margin: 0 auto; background: #fff; border-radius: 12px; padding: 32px; }
.form-title { font-size: 22px; margin-bottom: 20px; color: #222; }
.notice { background: #fff8e6; border-left: 3px solid #faad14; padding: 12px 16px; border-radius: 6px; font-size: 13px; color: #7a5a00; margin-bottom: 20px; }
.site-form .form-row { margin-bottom: 18px; }
.site-form label { display: block; font-size: 14px; color: #444; margin-bottom: 6px; font-weight: 500; }
.site-form input, .site-form select, .site-form textarea {
  width: 100%; padding: 10px 14px; border: 1px solid #d9dde5; border-radius: 8px;
  font-size: 14px; outline: none; transition: border-color .2s; font-family: inherit;
}
.site-form input:focus, .site-form select:focus, .site-form textarea:focus { border-color: #2c5cff; }
.btn-primary {
  background: #2c5cff; color: #fff; border: 0; padding: 12px 32px;
  border-radius: 8px; font-size: 15px; cursor: pointer; transition: background .2s;
}
.btn-primary:hover { background: #1e47d6; }
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; font-size: 14px; }
.alert-ok { background: #f0f9f0; color: #0a7c0a; border: 1px solid #c8e6c8; }
.alert-err { background: #fef0f0; color: #c00; border: 1px solid #f5c8c8; }

/* 详情页 */
.detail-page { background: #fff; border-radius: 12px; padding: 32px; }
.detail-head { display: flex; align-items: center; gap: 20px; padding-bottom: 24px; border-bottom: 1px solid #eef0f4; }
.detail-logo { width: 72px; height: 72px; border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #f1f3f7; }
.detail-logo img { width: 100%; height: 100%; object-fit: cover; }
.detail-logo .logo-fallback { font-size: 28px; }
.detail-meta { flex: 1; }
.detail-meta h1 { font-size: 24px; color: #222; margin-bottom: 6px; }
.detail-url a { color: #2c5cff; font-size: 14px; }
.detail-stats { color: #999; font-size: 13px; margin-top: 4px; }
.btn-visit {
  background: #2c5cff; color: #fff; padding: 12px 28px; border-radius: 8px; font-size: 15px;
  transition: background .2s;
}
.btn-visit:hover { background: #1e47d6; }
.detail-body { padding: 24px 0; }
.detail-body h3 { font-size: 16px; margin-bottom: 12px; color: #222; }
.detail-body p { color: #555; font-size: 14px; line-height: 1.8; }
.detail-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.tag { font-size: 12px; padding: 3px 12px; background: #eef2ff; color: #2c5cff; border-radius: 14px; }
.tag:hover { background: #2c5cff; color: #fff; }
.related { padding-top: 24px; border-top: 1px solid #eef0f4; }
.related h3 { font-size: 16px; margin-bottom: 16px; }

/* 空状态 */
.empty-tip { text-align: center; padding: 60px 20px; color: #999; }
.empty-tip a { color: #2c5cff; }
.search-result-tip { margin-bottom: 16px; font-size: 14px; color: #666; }

/* 页脚 */
.site-footer { background: #fff; padding: 30px 0; margin-top: 40px; border-top: 1px solid #eef0f4; }
.footer-links { display: flex; justify-content: center; gap: 20px; margin-bottom: 12px; }
.footer-links a { color: #666; font-size: 14px; }
.footer-links a:hover { color: #2c5cff; }
.copyright { text-align: center; color: #999; font-size: 13px; }
.copyright a { color: #999; }

/* 响应式 */
@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 10px 0; gap: 10px; }
  .search-box { order: 3; width: 100%; max-width: none; }
  .top-nav { font-size: 14px; gap: 12px; }
  .site-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .site-card { padding: 10px; }
  .card-logo { width: 36px; height: 36px; }
  .detail-head { flex-direction: column; text-align: center; }
  .form-page { padding: 20px; }
}