/* Facebook follow button in the top bar (shared by homepage and blog) */
.nav-right { display: flex; align-items: center; gap: 22px; }
.fb-btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px 8px 8px; border-radius: 999px;
  background: linear-gradient(135deg, #1877f2, #0a5bd8);
  color: #fff; font-weight: 700; font-size: .95rem; white-space: nowrap;
  box-shadow: 0 4px 16px rgba(24,119,242,.45);
  transition: transform .2s, box-shadow .2s;
}
.fb-btn::before { /* pulsing ring to draw the eye */
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: 0 0 0 0 rgba(24,119,242,.7);
  animation: fb-pulse 2.2s ease-out infinite;
}
.fb-btn:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 8px 24px rgba(24,119,242,.6); }
.fb-btn .fb-icon {
  width: 28px; height: 28px; border-radius: 50%; background: #fff;
  display: grid; place-items: center; flex: none;
}
.fb-btn .fb-icon svg { width: 18px; height: 18px; fill: #1877f2; }
@keyframes fb-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(24,119,242,.7); }
  70%  { box-shadow: 0 0 0 12px rgba(24,119,242,0); }
  100% { box-shadow: 0 0 0 0 rgba(24,119,242,0); }
}
@media (prefers-reduced-motion: reduce) { .fb-btn::before { animation: none; } }
@media (max-width: 420px) { .fb-btn { padding-right: 14px; font-size: .88rem; } }

/* "Made entirely by AI" badge in the footer (shared by homepage and blog) */
.ai-badge {
  display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center;
  margin-bottom: 12px; padding: 8px 18px; border-radius: 999px;
  border: 1px solid rgba(127,216,255,.45); background: rgba(127,216,255,.08);
  color: #fff; font-weight: 700; font-size: .95rem;
}
.ai-badge .ai-spark { display: inline-block; color: #7fd8ff; animation: ai-twinkle 1.8s ease-in-out infinite; }
.ai-badge .ai-sub { color: #7fd8ff; font-weight: 400; font-size: .85rem; }
@keyframes ai-twinkle { 50% { opacity: .35; transform: scale(.8); } }
@media (prefers-reduced-motion: reduce) { .ai-badge .ai-spark { animation: none; } }

/* Xiaohongshu (小红书) button beside Facebook: shows the second IP name 大马水果人 */
.xhs-btn {
  display: inline-flex; align-items: center; gap: 7px; flex: none; white-space: nowrap;
  padding: 6px 14px 6px 6px; border-radius: 999px;
  background: linear-gradient(135deg, #ff2442, #e0102e); color: #fff;
  font-weight: 700; font-size: .95rem;
  box-shadow: 0 4px 16px rgba(255,36,66,.45);
  transition: transform .2s, box-shadow .2s;
}
.xhs-btn:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 8px 24px rgba(255,36,66,.6); }
.xhs-btn .xhs-tag {
  background: #fff; color: #ff2442; border-radius: 6px;
  padding: 3px 5px; font-size: .62rem; font-weight: 800; line-height: 1.2;
}
.nav-right { gap: 12px; }
header nav { margin-right: 10px; }
/* Phones: logo alone is enough, leave room for 文章 + both social buttons */
@media (max-width: 480px) {
  .brand-name { display: none; }
  .nav-right { gap: 8px !important; }
  .fb-btn { padding: 5px 12px 5px 5px; font-size: .85rem; gap: 6px; }
  .fb-btn .fb-icon { width: 24px; height: 24px; }
  .xhs-btn { padding: 5px 11px 5px 5px; font-size: .85rem; gap: 5px; }
  .xhs-btn .xhs-tag { font-size: .56rem; padding: 3px 4px; }
}
/* Very narrow phones: drop the small 小红书 tag, keep the 大马水果人 name */
@media (max-width: 360px) { .xhs-btn .xhs-tag { display: none; } .xhs-btn { padding-left: 11px; } }

/* Email capture form (homepage + /join/) */
.sub-form { display: grid; gap: 12px; max-width: 520px; margin: 0 auto; text-align: left; }
.sub-row { display: flex; gap: 10px; flex-wrap: wrap; }
.sub-form input[type=text], .sub-form input[type=email] {
  flex: 1 1 200px; min-width: 0; padding: 14px 16px; font-size: 1rem; font-family: inherit;
  border: 2px solid #e2e2e6; border-radius: 12px; background: #fff; color: #0b0b0d;
}
.sub-form input:focus { outline: none; border-color: #d81920; }
.sub-form button {
  padding: 14px 28px; font-size: 1.05rem; font-weight: 800; font-family: inherit; cursor: pointer;
  border: 0; border-radius: 999px; background: #d81920; color: #fff; transition: background .2s, transform .2s;
}
.sub-form button:hover { background: #8f0f14; transform: translateY(-1px); }
.sub-form button:disabled { opacity: .6; cursor: wait; }
.sub-consent { display: flex; gap: 8px; align-items: flex-start; font-size: .85rem; color: #666; line-height: 1.5; }
.sub-consent input { margin-top: 3px; accent-color: #d81920; }
.sub-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; } /* bot trap */
.sub-msg { min-height: 1.4em; font-weight: 700; font-size: .95rem; }
.sub-msg.ok { color: #15803d; }
.sub-msg.err { color: #d81920; }

/* Article cards (.acard): blog list, "更多文章" under each article, homepage "最新文章" */
.acards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.acard { display: flex; flex-direction: column; background: #fff; border-radius: 16px; overflow: hidden; color: #0b0b0d; text-decoration: none; box-shadow: 0 6px 24px rgba(0,0,0,.08); transition: transform .2s, box-shadow .2s; }
.acard:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,.14); }
.acard-img { aspect-ratio: 16 / 9; background: #1a0a0b; overflow: hidden; display: grid; place-items: center; }
.acard-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.acard-ph { color: #fff; font-weight: 800; letter-spacing: .1em; }
.acard-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.acard-meta { color: #888; font-size: .82rem; }
.acard h3 { font-size: 1.15rem; line-height: 1.45; margin: 0; }
.acard:hover h3 { color: #d81920; }
.acard p { color: #555; font-size: .93rem; line-height: 1.6; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.acard-more { margin-top: auto; padding-top: 6px; color: #d81920; font-weight: 700; font-size: .9rem; }
/* the newest article on the blog list: cover beside the text */
.acard-big { flex-direction: row; margin-bottom: 24px; }
.acard-big .acard-img { flex: 0 0 52%; aspect-ratio: auto; min-height: 260px; }
.acard-big .acard-body { padding: 24px 26px; justify-content: center; }
.acard-big h3 { font-size: 1.5rem; }
@media (max-width: 720px) {
  .acard-big { flex-direction: column; }
  .acard-big .acard-img { flex: none; aspect-ratio: 16 / 9; min-height: 0; }
  .acard-big h3 { font-size: 1.25rem; }
}

/* Top-left logo: golden ring that slowly turns, soft glow, and a light sweep every few seconds */
@property --logo-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.brand-logo {
  position: relative; flex: none; display: inline-block;
  width: 44px; height: 44px; padding: 2px; border-radius: 50%; overflow: hidden;
  background: conic-gradient(from var(--logo-angle), #ffd76a, #fff3c4, #d81920, #8f0f14, #ffd76a);
  box-shadow: 0 0 10px rgba(255, 205, 90, .55), 0 0 22px rgba(216, 25, 32, .35);
  animation: logo-ring 6s linear infinite;
  transition: transform .3s, box-shadow .3s;
}
.brand-logo img { display: block; width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.brand-logo::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, .8) 50%, transparent 65%);
  mix-blend-mode: screen; transform: translateX(-130%);
  animation: logo-shine 4.5s ease-in-out infinite;
}
.brand:hover .brand-logo { transform: scale(1.08) rotate(-4deg); box-shadow: 0 0 14px rgba(255, 205, 90, .8), 0 0 30px rgba(216, 25, 32, .5); }
@keyframes logo-ring { to { --logo-angle: 360deg; } }
@keyframes logo-shine { 0%, 62% { transform: translateX(-130%); } 88%, 100% { transform: translateX(130%); } }
@media (prefers-reduced-motion: reduce) { .brand-logo, .brand-logo::after { animation: none; } }
