/* ===== LovePanda - Modern Morandi Green Theme ===== */

/* CSS variables for easy theming */
:root{
  --bg-0:#0e1613;        /* 深背景基色（墨绿偏黑） */
  --bg-1:#14231d;        /* 次级深色 */
  --bg-2:#1b2f27;        /* 过渡层 */
  --brand:#6B8F71;       /* 莫兰迪绿（主色） */
  --brand-2:#9DB9A7;     /* 莫兰迪浅绿（点缀） */
  --ink-1:#E8F0EC;       /* 主文字 */
  --ink-2:#BFD2C9;       /* 次文字 */
  --link:#A6D0BE;        /* 链接 */
  --surface:rgba(255,255,255,.06); /* 毛玻璃面层 */
  --border:rgba(255,255,255,.10);  /* 毛玻璃边线 */
  --shadow:0 10px 30px rgba(0,0,0,.35);
  --page-max:1480px;
  --page-gutter:32px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; margin:0; }
body{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Noto Sans", "PingFang SC", "Microsoft YaHei", sans-serif;
  color:var(--ink-1);
  /* 深绿莫兰迪渐变（保留原有层次感） */
  background:
    radial-gradient(60% 90% at 50% -10%, rgba(109,144,116,.25) 0%, rgba(20,35,29,0) 60%),
    linear-gradient(160deg, var(--bg-1) 0%, var(--bg-2) 50%, var(--bg-0) 100%);
  line-height:1.65;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

/* 背景画布（保留现有星空/之后可替换成竹叶粒子） */
#bg-canvas{
  position:fixed; inset:0; z-index:-1; display:block;
  background: radial-gradient(60% 80% at 50% 0%, #1b2f27 0%, #101914 60%, #0b120f 100%);
}

/* Layout */
.container{
  width:min(var(--page-max), calc(100% - (var(--page-gutter) * 2)));
  max-width:none;
  margin:0 auto;
  padding:24px 0;
}

/* Header */
header a{
  color:var(--ink-1); text-decoration:none; font-weight:700; letter-spacing:0;
}
.site-header{
  display:flex; justify-content:space-between; align-items:center; gap:16px 24px;
  flex-wrap:wrap; padding-top:18px;
}
.site-brand{
  color:#e8f0ff; text-decoration:none; font-weight:700; letter-spacing:0;
}
.header-tools{
  display:flex; align-items:center; justify-content:flex-end; gap:10px; flex-wrap:wrap;
  margin-left:auto;
}
.langs{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.langs a,
.motion-toggle{
  color:var(--link); text-decoration:none; padding:6px 10px; border-radius:8px;
  border:1px solid var(--border); background:rgba(255,255,255,.03);
  transition:transform .18s ease, background .18s ease, border-color .18s ease;
  font:inherit; line-height:1.3;
}
.motion-toggle{
  min-width:120px; text-align:center; white-space:nowrap; cursor:pointer;
  appearance:none; -webkit-appearance:none;
}
.langs a:hover,
.motion-toggle:hover{ transform:translateY(-1px); background:rgba(255,255,255,.06); }
.langs a.active{ background:rgba(255,255,255,.12); border-color:rgba(255,255,255,.18); }
.motion-toggle[aria-pressed="true"]{ background:rgba(255,255,255,.12); border-color:rgba(255,255,255,.18); }
.motion-toggle[aria-pressed="false"]{ color:rgba(191,210,201,.72); }

/* Hero */
.hero{ padding:96px 0 48px; color:var(--ink-1); }
.hero--compact{ padding-top:24px; }
.hero h1{ font-size:64px; line-height:1.08; margin:0 0 16px; max-width:1120px; }
.hero p{ font-size:20px; color:var(--ink-2); max-width:860px; }

/* Card Grid */
.grid{
  display:grid; gap:18px; margin:28px 0 6px;
  grid-template-columns:repeat(auto-fit, minmax(min(100%, 320px),1fr));
}
.card{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:8px;
  padding:18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform .22s ease, border-color .22s ease, background .22s ease, box-shadow .22s ease;
}
.card h3{ margin:6px 0 8px; font-size:20px; color:#e7f3ed; }
.card p{ margin:0 0 10px; color:var(--ink-2); }
.card,
.profile-card,
.profile-panel{
  overflow-wrap:anywhere;
}
.card a{
  color:var(--brand-2); text-decoration:none; font-weight:600;
  border-bottom:1px dashed rgba(166,208,190,.5);
}
.card:hover{
  transform:translateY(-4px);
  background:linear-gradient(180deg, rgba(155,193,171,.10), rgba(255,255,255,.05));
  border-color:rgba(166,208,190,.35);
  box-shadow: 0 16px 40px rgba(0,0,0,.45);
}

/* Responsive media */
img.resp{ max-width:100%; height:auto; border-radius:8px; box-shadow: var(--shadow); }

.profile-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap:18px;
  margin:28px 0 6px;
}

.profile-card,
.profile-panel{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:8px;
  padding:18px;
  box-shadow:var(--shadow);
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
}

.profile-card{
  display:flex;
  flex-direction:column;
  min-height:280px;
}

.profile-card h3,
.profile-panel h2{
  margin:0 0 10px;
  color:#e7f3ed;
}

.profile-card p,
.profile-panel p{
  color:var(--ink-2);
}

.profile-card__eyebrow{
  margin:0 0 8px;
  color:var(--brand-2);
  font-size:13px;
  font-weight:700;
  text-transform:uppercase;
}

.profile-meta,
.profile-facts{
  display:grid;
  gap:10px;
  margin:14px 0;
}

.profile-meta div,
.profile-facts div{
  display:grid;
  gap:2px;
}

.profile-meta dt,
.profile-facts dt{
  color:rgba(166,208,190,.75);
  font-size:13px;
  font-weight:700;
}

.profile-meta dd,
.profile-facts dd{
  margin:0;
  color:var(--ink-2);
}

.profile-actions{
  margin-top:auto;
}

.profile-actions a,
.profile-detail-page a{
  color:var(--brand-2);
  font-weight:600;
}

.profile-detail-page{
  max-width:980px;
}

.profile-detail-page h1{
  font-size:48px;
  line-height:1.12;
  margin:18px 0 20px;
}

.profile-hero-image{
  margin:0 0 18px;
}

.profile-panel + .profile-panel{
  margin-top:18px;
}

.inline-separator{
  color:rgba(200,211,202,.38);
  margin:0 8px;
}

.breadcrumb{
  margin-bottom:8px; font-size:14px; opacity:.8;
}

.page-actions{
  margin:24px 0;
}

/* Footer */
footer{
  margin:48px 0 24px; color:var(--ink-2); font-size:14px; text-align:center;
}
footer a{ color:var(--link); text-decoration:none; }

/* Utility */
a{ color:var(--link); }
a:hover{ text-decoration:underline; }

/* Focus visible */
:focus-visible{
  outline:2px solid var(--brand-2);
  outline-offset:2px;
  border-radius:8px;
}

/* Motion preferences */
@media (prefers-reduced-motion: reduce){
  *{ animation:none !important; transition:none !important; }
}

/* Small screens tweaks */
@media (max-width:560px){
  :root{ --page-gutter:18px; }
  .container{ padding:18px 0; }
  .hero{ padding:72px 0 32px; }
  .hero h1{ font-size:40px; }
  .hero p{ font-size:17px; }
  .site-header{ align-items:flex-start; }
  .header-tools{ width:100%; justify-content:flex-start; margin-left:0; }
  .langs a,
  .motion-toggle{ padding:6px 9px; }
  .motion-toggle{ min-width:0; }
  .profile-card{ min-height:0; }
}

@media (min-width:1500px){
  .hero h1{ font-size:76px; }
}

@media (max-width:900px){
  :root{ --page-gutter:24px; }
  .hero h1{ font-size:48px; }
  .hero p{ font-size:18px; }
  .profile-detail-page h1{ font-size:40px; }
}

/* ==== LovePanda minimal legal footer (Morandi green, low-key) ==== */
.lp-footer{
  margin-top: 48px;
  border-top: 1px solid rgba(255,255,255,.06);
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.12) 100%);
}

.lp-footer__inner{
  width:min(var(--page-max), calc(100% - (var(--page-gutter) * 2)));
  max-width:none; margin:0 auto; padding:14px 0;
  display:flex; gap:10px; align-items:center; justify-content:space-between;
  color: rgba(200, 211, 202, .65);  /* 莫兰迪浅绿，低饱和 */
  font-size: 13px;
}

.lp-footer a{
  color: rgba(166, 208, 190, .55);  /* 链接更淡 */
  text-decoration: none;
  transition: color .18s ease, opacity .18s ease;
  opacity: .9;
}
.lp-footer a:hover{ color: rgba(166,208,190,.75); opacity: 1; }
.lp-footer a:focus-visible{
  outline: 2px solid rgba(166,208,190,.55);
  outline-offset: 3px; border-radius: 6px;
}
.lp-footer .dot{ color: rgba(200,211,202,.38); margin: 0 6px; }

.panda-map-page{
  background:
    radial-gradient(60% 90% at 50% -10%, rgba(60,90,140,.28) 0%, rgba(10,22,40,0) 55%),
    linear-gradient(160deg, #0c1a2e 0%, #0a1530 50%, #071125 100%) !important;
}

/* 窄屏排版 */
@media (max-width: 560px){
  :root{ --page-gutter:18px; }
  .lp-footer__inner{ flex-direction: column; gap:6px; padding:12px 18px; }
  .hero h1{ font-size:40px; }
  .hero p{ font-size:17px; }
  .profile-detail-page h1{ font-size:34px; }
}

/* outer frame: holds both the clipped map and the deco panda */
.lp-map-frame{
  position: relative;
  margin-top: 6px;
}

/* inner clip: gives the physical frame (round corners, border, shadow) */
.lp-map-clip{
  position: relative;
  border-radius: 8px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.10);
  overflow: hidden;                 /* only the map is clipped */
}

/* subtle top highlight to sell the "physical rim" */
.lp-map-clip::before{
  content:"";
  position:absolute; inset:0 0 auto 0; height:16px;
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,0));
  pointer-events:none; z-index: 2;
}

/* the actual map lives inside the clip */
#map{
  position: relative;
  z-index: 1;
  width:100%;
  height:clamp(560px, 76vh, 900px);
}

.map-error{
  margin:0; padding:24px; color:var(--ink-2);
}

.leaflet-popup-content h3{ margin:0; font-size:16px; color: var(--brand-2); }
.map-popup-list{
  list-style:none;
  margin:12px 0 0;
  padding:0;
  display:grid;
  gap:10px;
}
.map-popup-list li{
  display:grid;
  gap:2px;
}
.map-popup-list span{
  font-weight:700;
  color:#2f3c37;
}

/* panda sits on the rim (NOT clipped) */
.lp-map-panda{
  position: absolute;
  top: -40px;           /* negative pulls it out over the rim */
  right: 18px;          /* use left:18px if you want left side */
  width: 60px;         /* adjust to taste */
  transform: rotate(-2deg);
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.35));
  z-index: 3;
  pointer-events: none; /* never block map controls */
  user-select: none;
}
@media (max-width: 900px){
  .lp-map-panda{ width: 48px; top: -52px; }
}
@media (max-width: 560px){
  .lp-map-panda{ width: 40px; top: -46px; right: 12px; }
  #map{ height:72vh; min-height:420px; }
}
