/* Basic responsive layout */
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.5;
  background: linear-gradient(180deg, #f7f8fc 0%, #f6f7fb 45%, #f6f7fb 100%);
  color: #1f2937;
}
a { color: inherit; text-decoration: none; }

.container { max-width: 1100px; margin: 0 auto; padding: 18px; }
.topbar {
  background: #ffffff;
  border-bottom: 1px solid #eef0f5;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand { font-weight: 800; letter-spacing: .2px; }
.navlinks { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pill {
  padding: 8px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 999px;
  background: #fff;
}
.pill:hover { border-color: #cbd5e1; }
.lang-switch a { margin-left: 8px; }

.section-title {
  margin: 18px 0 10px;
  font-size: 20px;
  font-weight: 800;
}

.hero {
  margin-top: 6px;
  background: radial-gradient(900px 280px at 20% 10%, rgba(37, 99, 235, .18), rgba(37, 99, 235, 0) 60%),
              radial-gradient(720px 240px at 80% 0%, rgba(14, 165, 233, .14), rgba(14, 165, 233, 0) 60%),
              linear-gradient(135deg, #ffffff 0%, #f8fbff 50%, #ffffff 100%);
  border: 1px solid #e8eefc;
  border-radius: 16px;
  padding: 18px 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .04);
  overflow: hidden;
  position: relative;
}
.hero::after {
  content: "";
  position: absolute;
  inset: -2px -2px auto -2px;
  height: 120px;
  background: linear-gradient(90deg, rgba(37,99,235,.12), rgba(14,165,233,.06), rgba(16,185,129,.08));
  filter: blur(20px);
  pointer-events: none;
}
.hero-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.hero h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 1000;
  letter-spacing: .2px;
}
.hero p {
  margin: 8px 0 0;
  color: #4b5563;
  max-width: 560px;
  font-size: 13px;
}
.hero-badges {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #e6ecff;
  background: rgba(255,255,255,.75);
  color: #1d4ed8;
  font-weight: 900;
  font-size: 12px;
}
.stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.stat {
  min-width: 140px;
  background: rgba(255,255,255,.7);
  border: 1px solid #eef2ff;
  border-radius: 14px;
  padding: 10px 12px;
}
.stat .num {
  font-size: 20px;
  font-weight: 1000;
}
.stat .label {
  color: #6b7280;
  font-size: 12px;
  margin-top: 3px;
}

.search-row {
  margin: 10px 0 0;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.search-input {
  flex: 1;
  min-width: 260px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #fff;
  font-size: 13px;
  outline: none;
}
.btn {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid #dbeafe;
  background: #eff6ff;
  font-weight: 900;
  cursor: pointer;
}
.btn-primary {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}
.btn-ghost {
  background: #fff;
  border-color: #e5e7eb;
  color: #1f2937;
}
.btn-small {
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 12px;
}

.grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(12, 1fr);
}
.card {
  background: #fff;
  border: 1px solid #eef0f5;
  border-radius: 12px;
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(15, 23, 42, .08);
  border-color: #dbeafe;
}
.card > a { display: block; height: 100%; }
.card-body { padding: 14px; }

.cat-card { grid-column: span 4; }
.topic-card { grid-column: span 6; }
.link-card { grid-column: span 3; }

.card-title {
  font-weight: 800;
  margin-bottom: 8px;
  font-size: 15px;
  line-height: 1.4;
  word-break: break-word;
}
.card-desc {
  color: #6b7280;
  font-size: 12px;
  min-height: 36px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.mini-links {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mini-link {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid #eef2ff;
  background: rgba(255, 255, 255, .85);
}
.mini-link:hover {
  border-color: #c7d2fe;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
}
.mini-link-left { min-width: 0; }
.mini-link-domain {
  font-size: 11px;
  font-weight: 1000;
  color: #1d4ed8;
  margin-bottom: 4px;
  word-break: break-all;
  white-space: normal;
}
.mini-link-title {
  font-size: 12px;
  font-weight: 900;
  color: #0f172a;
  word-break: break-word;
}
.mini-link-intro {
  margin-top: 4px;
  font-size: 11px;
  color: #6b7280;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.mini-link-open {
  flex: 0 0 auto;
  align-self: center;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, .08);
  border: 1px solid rgba(37, 99, 235, .18);
  color: #1d4ed8;
  font-weight: 1000;
  font-size: 12px;
}

.card-url {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #eef2ff;
  background: linear-gradient(180deg, #fbfdff 0%, #f7fafc 100%);
}
.url-domain {
  display: inline-block;
  font-weight: 1000;
  color: #1d4ed8;
  font-size: 12px;
  margin-bottom: 6px;
}
.url-full {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  color: #374151;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip-row {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.enter-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid #dbeafe;
  background: rgba(37,99,235,.06);
  color: #1d4ed8;
  font-weight: 1000;
  font-size: 12px;
}
.arrow {
  width: 26px;
  height: 26px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2563eb;
  color: #fff;
  font-size: 14px;
}

.meta-row {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  color: #9ca3af;
  font-size: 11px;
}
.tag {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #eef0f5;
  background: #fafafa;
}

.empty {
  background: #fff;
  border: 1px dashed #d1d5db;
  border-radius: 12px;
  padding: 18px;
  color: #6b7280;
}

@media (max-width: 1020px) {
  .cat-card { grid-column: span 6; }
  .topic-card { grid-column: span 12; }
  .link-card { grid-column: span 6; }
}
@media (max-width: 560px) {
  .cat-card { grid-column: span 12; }
  .link-card { grid-column: span 12; }
}

.footer {
  padding: 22px 0 36px;
  color: #9ca3af;
  font-size: 12px;
  text-align: center;
}

