/* ============ 变量与基础 ============ */
:root {
  --bg: #0d1b2a;
  --bg-soft: #13263a;
  --card: #14283d;
  --card-hover: #1a3149;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e2e8f0;
  --text-dim: #94a3b8;
  --teal: #2dd4bf;
  --blue: #3b82f6;
  --grad: linear-gradient(135deg, var(--teal), var(--blue));
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

/* 背景光晕装饰 */
.bg-glow {
  position: fixed;
  top: -180px;
  right: -120px;
  width: 480px;
  height: 480px;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.16), transparent 70%);
  border-radius: 50%;
  z-index: 0;
  pointer-events: none;
}

.bg-glow::after {
  content: "";
  position: absolute;
  left: -360px;
  bottom: -260px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.12), transparent 70%);
  border-radius: 50%;
}

/* ============ 顶部 ============ */
.site-header {
  position: relative;
  z-index: 1;
  padding: 48px 0 24px;
}

.logo-row {
  margin-bottom: 28px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo-icon {
  font-size: 44px;
  filter: drop-shadow(0 4px 14px rgba(45, 212, 191, 0.35));
}

.logo h1 {
  font-size: clamp(24px, 4vw, 34px);
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 0.5px;
}

.logo-sub {
  color: var(--text-dim);
  font-size: 14px;
  margin-top: 2px;
}

/* 搜索框 */
.search-wrap {
  position: relative;
  margin-bottom: 22px;
}

.search-input {
  width: 100%;
  padding: 14px 20px 14px 48px;
  font-size: 15px;
  color: var(--text);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input::placeholder {
  color: var(--text-dim);
}

.search-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.15);
}

.search-wrap::before {
  content: "⌕";
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-52%);
  font-size: 20px;
  color: var(--text-dim);
  pointer-events: none;
}

/* 分类标签 */
.cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cat-btn {
  padding: 8px 18px;
  font-size: 14px;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s;
}

.cat-btn:hover {
  color: var(--teal);
  border-color: rgba(45, 212, 191, 0.45);
}

.cat-btn.active {
  color: #062b24;
  background: var(--grad);
  border-color: transparent;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(45, 212, 191, 0.28);
}

/* ============ 卡片墙 ============ */
main.container {
  position: relative;
  z-index: 1;
  padding-top: 26px;
  padding-bottom: 48px;
}

.result-meta {
  color: var(--text-dim);
  font-size: 13px;
  margin-bottom: 16px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 22px 20px;
  background: linear-gradient(160deg, var(--card), rgba(20, 40, 61, 0.4));
  border: 1px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s;
  animation: card-in 0.35s ease both;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(45, 212, 191, 0.45);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(45, 212, 191, 0.12);
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.card-emoji {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  font-size: 28px;
  background: rgba(45, 212, 191, 0.08);
  border: 1px solid rgba(45, 212, 191, 0.18);
  border-radius: 12px;
  flex-shrink: 0;
}

.card-name {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 2px;
}

.card-cat {
  font-size: 12px;
  color: var(--teal);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.card-cat::before {
  content: "";
  width: 6px;
  height: 6px;
  background: var(--teal);
  border-radius: 50%;
}

.card-desc {
  color: var(--text-dim);
  font-size: 14px;
  flex-grow: 1;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 13px;
  color: var(--text-dim);
}

.card-open {
  color: var(--blue);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.card:hover .card-open {
  color: var(--teal);
}

/* 空状态 */
.empty {
  text-align: center;
  padding: 70px 0;
  color: var(--text-dim);
}

.empty-emoji {
  font-size: 44px;
  margin-bottom: 12px;
}

/* ============ 关于我 ============ */
.about {
  position: relative;
  z-index: 1;
  padding: 40px 0 56px;
}

.about-inner {
  max-width: 720px;
}

.about-card {
  background: linear-gradient(150deg, rgba(59, 130, 246, 0.1), rgba(45, 212, 191, 0.06));
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 18px;
  padding: 30px 28px;
}

.about-card h2 {
  font-size: 20px;
  margin-bottom: 12px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.about-card p {
  color: var(--text-dim);
  font-size: 14.5px;
  margin-bottom: 10px;
}

.about-contact {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
}

.wechat-name {
  color: var(--teal);
  font-weight: 700;
  letter-spacing: 0.5px;
}

/* ============ 页脚 ============ */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 22px 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}

/* ============ 详情弹层 ============ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal[hidden] {
  display: none;
}

.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(5, 12, 20, 0.72);
  backdrop-filter: blur(6px);
  animation: fade-in 0.2s ease;
}

.modal-panel {
  position: relative;
  width: min(560px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  background: var(--bg-soft);
  border: 1px solid rgba(45, 212, 191, 0.25);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
  animation: pop-in 0.22s ease;
}

@keyframes fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text-dim);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-close:hover {
  color: var(--text);
  border-color: rgba(45, 212, 191, 0.5);
}

.modal-body {
  padding: 28px;
}

.modal-emoji {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  font-size: 36px;
  background: rgba(45, 212, 191, 0.08);
  border: 1px solid rgba(45, 212, 191, 0.2);
  border-radius: 16px;
  margin-bottom: 16px;
}

.modal-name {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
}

.modal-cat {
  display: inline-block;
  font-size: 12.5px;
  color: #062b24;
  background: var(--grad);
  border-radius: 999px;
  padding: 3px 12px;
  margin-bottom: 16px;
}

.modal-section {
  margin-bottom: 14px;
}

.modal-section h4 {
  font-size: 14px;
  color: var(--teal);
  margin-bottom: 4px;
}

.modal-section p {
  color: var(--text-dim);
  font-size: 14.5px;
}

.review-box {
  background: rgba(59, 130, 246, 0.08);
  border-left: 3px solid var(--blue);
  border-radius: 8px;
  padding: 12px 14px;
}

.modal-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 11px 20px;
  background: var(--grad);
  color: #062b24;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  border-radius: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.modal-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(45, 212, 191, 0.35);
}

.modal-nolink {
  margin-top: 10px;
  color: var(--text-dim);
  font-size: 13px;
}

/* ============ 响应式 ============ */
@media (max-width: 640px) {
  .site-header { padding-top: 32px; }
  .logo-icon { font-size: 36px; }
  .card-grid { grid-template-columns: 1fr; }
  .modal-body { padding: 22px; }
  .about-card { padding: 24px 20px; }
}
