/* =========================================================
   宝妹の小空间 · 老式 QQ 空间 · 粉红立体风（塑料质感 + 厚度）
   ========================================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --pink-1: #ffeaf5;   /* 最浅 */
  --pink-2: #ffd0e7;
  --pink-3: #ffb3d9;
  --pink-4: #ff9ecb;
  --pink-5: #ff7eb8;
  --pink-deep: #e2568f;
  --pink-dark: #b02f6b;
  --pink-text: #8a3d64;
  --line: #ffb3d9;
  --thick: #ea8dbb;    /* 模块底部厚边 */
}

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "SimSun", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  color: var(--pink-text);
  background-color: #ffe3f1;
  background-image:
    radial-gradient(circle at 10px 10px, rgba(255, 255, 255, .9) 2px, transparent 2.6px),
    radial-gradient(circle at 40px 40px, rgba(255, 255, 255, .55) 1.6px, transparent 2.2px),
    linear-gradient(180deg, #ffeef7 0%, #ffdcee 55%, #ffcfe7 100%);
  background-size: 60px 60px, 60px 60px, 100% 100%;
  background-attachment: fixed;
  min-height: 100vh;
  padding-bottom: 26px;
}

.ico { vertical-align: -.16em; flex: none; }

/* ===== 飘落的小装饰（心形图标，非 emoji） ===== */
.deco { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.deco span { position: absolute; top: -12%; color: rgba(255, 143, 195, .6); animation: fall linear infinite; }
.deco span svg { fill: currentColor; stroke: none; display: block; }
@keyframes fall {
  0%   { transform: translateY(-12vh) rotate(0deg); }
  100% { transform: translateY(112vh) rotate(360deg); }
}

/* ===== 顶部大 banner ===== */
.qz-banner {
  position: relative;
  z-index: 2;
  background:
    radial-gradient(circle at 20% -50%, rgba(255, 255, 255, .95), transparent 58%),
    radial-gradient(circle at 88% 130%, rgba(255, 255, 255, .45), transparent 52%),
    linear-gradient(180deg, #ffc7e3 0%, #ffa5d2 48%, #ff86be 100%);
  border-bottom: 6px solid #c84386;
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, .95),
    inset 0 -12px 20px -12px rgba(150, 40, 100, .45),
    0 8px 20px rgba(170, 50, 115, .4);
}
.qz-banner::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 9px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .6) 0 9px, transparent 9px 18px);
  opacity: .8; pointer-events: none;
}

.qz-banner-inner {
  position: relative; z-index: 1;
  max-width: 1000px; margin: 0 auto;
  padding: 24px 18px 20px;
  display: flex; align-items: center; gap: 18px;
}

.qz-face {
  width: 86px; height: 86px; flex: 0 0 86px;
  display: grid; place-items: center; overflow: hidden;
  color: #d478a8;
  background: linear-gradient(160deg, #ffffff, #ffe3f2);
  border: 3px solid #fff; border-radius: 12px;
  box-shadow:
    0 0 0 2px #d94e92,
    0 6px 0 rgba(180, 60, 120, .5),
    0 11px 20px rgba(150, 40, 100, .35),
    inset 0 0 14px rgba(255, 150, 200, .55);
}
.qz-face img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 头像兜底：不管容器是哪一种，图片都被牢牢约束在框内，绝不外溢 */
.avatar-img {
  position: relative;
  overflow: hidden;
}
.avatar-img > img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  border-radius: inherit;
  display: block;
}

.qz-idcard { min-width: 0; }
.qz-nick {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: 24px; font-weight: 800; letter-spacing: 1px;
  color: #fff; line-height: 1.2;
  text-shadow: 0 1px 0 #b8387a, 0 2px 0 rgba(160, 45, 105, .6), 0 4px 9px rgba(120, 20, 70, .45);
}
.qz-owner {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .5px;
  color: #a03068; padding: 2px 9px 3px;
  background: linear-gradient(#ffffff, #ffd9ec);
  border: 1px solid #e07ab0; border-radius: 999px;
  text-shadow: none;
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 #e79ec8;
}
.qz-sign {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 9px; max-width: 100%;
  font-size: 13px; font-weight: 700; color: #a8306d;
  padding: 5px 13px;
  background: linear-gradient(rgba(255, 255, 255, .96), rgba(255, 242, 250, .96));
  border: 1px solid #fff;
  border-radius: 999px;
  text-shadow: 0 1px 0 #fff;
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 rgba(180, 60, 120, .28), 0 4px 10px rgba(150, 40, 100, .18);
  overflow: hidden;
}
.qz-sign .ico { flex: none; color: #e0699f; }

.qz-stats {
  margin-left: auto; flex: 0 0 auto;
  display: grid; gap: 7px;
  padding: 12px 15px;
  color: #8a3060; font-size: 12.5px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .95);
  background: linear-gradient(rgba(255, 255, 255, .94), rgba(255, 245, 251, .94));
  border: 1px solid #fff;
  border-radius: 12px;
  box-shadow: inset 0 1px 0 #fff, 0 3px 0 rgba(180, 60, 120, .3), 0 7px 16px rgba(150, 40, 100, .2);
}
.qz-stats .stat { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.qz-stats .stat .ico { color: #e0699f; }
.qz-stats .k { color: #96537a; }
.qz-stats .v { color: #a8306d; font-weight: 800; }
.qz-stats .num { color: #d43d84; font-size: 16px; font-weight: 800; letter-spacing: .5px; }

/* ===== QQ 式导航条 ===== */
.qz-nav {
  position: relative; z-index: 1;
  background: linear-gradient(#ff8cc2, #e3579a);
  border-top: 1px solid rgba(255, 255, 255, .8);
  border-bottom: 3px solid #c84386;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 3px 8px rgba(190, 70, 130, .3);
}
.qz-nav-in {
  max-width: 1000px; margin: 0 auto;
  padding: 0 18px; display: flex; flex-wrap: wrap;
}
.qz-nav a {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 18px; text-decoration: none;
  font-size: 14px; font-weight: 700; color: #fff;
  text-shadow: 0 1px 0 #c73a7d;
  border-right: 1px solid rgba(255, 255, 255, .35);
}
.qz-nav a:first-child { border-left: 1px solid rgba(255, 255, 255, .35); }
.qz-nav a:hover { background: rgba(150, 30, 90, .2); }
.qz-nav a.active { background: rgba(150, 30, 90, .34); }
.qz-nav a.active::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px;
  height: 3px; background: #fff8fc;
}

/* ===== 主体两栏 ===== */
.qz-wrap,
.layout {
  position: relative; z-index: 1;
  max-width: 1000px; margin: 16px auto 0; padding: 0 14px;
  display: flex; gap: 14px; align-items: flex-start;
}
.qz-side, .sidebar { width: 242px; flex: 0 0 242px; }
.qz-main, .content { flex: 1; min-width: 0; }

/* ===== 模块（塑料盒子 + 厚度） ===== */
.module {
  position: relative;
  background: #fff;
  border: 2px solid var(--pink-4);
  border-radius: 10px;
  margin-bottom: 14px;
  overflow: hidden;
  box-shadow:
    0 4px 0 var(--thick),
    0 9px 18px rgba(190, 70, 130, .22),
    inset 0 1px 0 #fff;
}
.module .mod-h {
  position: relative;
  display: flex; align-items: center; gap: 6px;
  padding: 9px 14px 9px 33px;
  font-size: 14px; font-weight: 800; color: #a52f6c;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .95);
  background: linear-gradient(#ffe3f1 0%, #ffc2e1 46%, #ffa9d3 54%, #ffcbe6 100%);
  border-bottom: 2px solid #e886b6;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset 0 -7px 10px -7px rgba(200, 90, 150, .4);
}
.module .mod-h::before {
  content: ""; position: absolute; left: 12px; top: 50%; margin-top: -5px;
  width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, #fff, #ff7eb8 62%, #dd4a8c);
  box-shadow: 0 1px 2px rgba(170, 50, 110, .65);
}
.module .mod-b {
  padding: 14px;
  background: linear-gradient(#fff, #fffafd);
}

/* ===== 按钮（3D 可按） ===== */
.btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  padding: 9px 20px; font-size: 14px; font-weight: 800; line-height: 1.2;
  color: #fff; text-shadow: 0 1px 0 #c73a7d;
  font-family: inherit;
  background: linear-gradient(#ffbce0 0%, #ff93c8 48%, #ff7cba 52%, #ffa8d3 100%);
  border: 2px solid #e2568f; border-radius: 9px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .9),
    0 4px 0 #d44b8a,
    0 7px 11px rgba(190, 70, 130, .3);
  transition: transform .06s, box-shadow .06s, filter .12s;
}
.btn:hover { filter: brightness(1.05); }
.btn:active {
  transform: translateY(4px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 0 0 #d44b8a, 0 1px 3px rgba(190, 70, 130, .35);
}
.btn.ghost {
  color: #d43d84; text-shadow: none;
  background: linear-gradient(#fff, #fff0f8);
  border-color: #f0a0c8;
  box-shadow: inset 0 1px 0 #fff, 0 4px 0 #f2b6d5, 0 7px 11px rgba(190, 70, 130, .18);
}
.btn.ghost:active {
  transform: translateY(4px);
  box-shadow: inset 0 1px 0 #fff, 0 0 0 #f2b6d5, 0 1px 3px rgba(190, 70, 130, .2);
}

/* ===== 侧栏菜单 ===== */
.menu a {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none;
  font-size: 14px; font-weight: 700; color: #a8306d;
  padding: 10px 14px; margin-bottom: 9px;
  background: linear-gradient(#fff, #ffeaf6);
  border: 2px solid var(--line); border-radius: 9px;
  box-shadow: inset 0 1px 0 #fff, 0 3px 0 #f2b6d5;
  transition: transform .06s, box-shadow .06s, background .12s;
}
.menu a:last-child { margin-bottom: 0; }
.menu a:hover { background: linear-gradient(#fff3fa, #ffdcef); }
.menu a:active { transform: translateY(3px); box-shadow: inset 0 1px 0 #fff, 0 0 0 #f2b6d5; }
.menu a.active {
  color: #fff; text-shadow: 0 1px 0 #c73a7d;
  background: linear-gradient(#ff9ecb, #ff6fae);
  border-color: #e2568f;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 3px 0 #d44b8a;
}
.menu a.menu-out {
  margin-top: 9px;
  color: #a8524a; border-color: #ffc0ae;
  background: linear-gradient(#fff, #ffefe9);
  box-shadow: inset 0 1px 0 #fff, 0 3px 0 #f3c3b3;
}
.menu a.menu-out:hover { background: linear-gradient(#fff6f2, #ffe3d9); }

/* ===== 侧栏资料卡 ===== */
.profile-mini { text-align: center; }
.profile-mini .ava {
  width: 94px; height: 94px; margin: 0 auto 10px;
  display: grid; place-items: center; overflow: hidden;
  font-size: 50px; line-height: 0;
  color: #d478a8;
  background: linear-gradient(160deg, #fff, #ffe0f1);
  border: 3px solid var(--pink-4); border-radius: 12px;
  box-shadow: inset 0 2px 0 #fff, 0 4px 0 var(--thick), 0 8px 16px rgba(190, 70, 130, .25);
}
.profile-mini .nm {
  font-size: 18px; font-weight: 800; color: #d43d84;
  text-shadow: 0 1px 0 #fff;
}
.profile-mini .row { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 13px; color: #9a5b7d; margin-top: 6px; word-break: break-all; }

/* ===== 资料栅格 ===== */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fact {
  padding: 10px 12px;
  background: linear-gradient(#fff, #fff5fb);
  border: 2px solid #ffc7e2; border-radius: 9px;
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 #f7cee3;
}
.fact .k { display: flex; align-items: center; gap: 4px; font-size: 12px; color: #b06a8e; }
.fact .v { font-size: 15px; font-weight: 800; color: #a8306d; margin-top: 3px; word-break: break-all; }

/* ===== 日记条目 ===== */
.diary-item {
  display: block; text-decoration: none; color: inherit;
  padding: 11px 13px; margin-bottom: 10px;
  background: linear-gradient(#fff, #fff5fb);
  border: 2px solid #ffc7e2; border-radius: 9px;
  box-shadow: inset 0 1px 0 #fff, 0 3px 0 #f7cee3;
  transition: transform .06s, box-shadow .06s, background .12s;
}
.diary-item:last-child { margin-bottom: 0; }
.diary-item:hover { background: linear-gradient(#ffeef8, #ffdcef); }
.diary-item:active { transform: translateY(3px); box-shadow: inset 0 1px 0 #fff, 0 0 0 #f7cee3; }
.diary-item .t { font-weight: 800; color: #d43d84; font-size: 14.5px; }
.diary-item .m { font-size: 12px; color: #b06a8e; margin: 4px 0; }
.diary-item .e { font-size: 13px; color: #7a3b5d; line-height: 1.7; }
.mood {
  display: inline-block; padding: 1px 10px 2px;
  font-size: 12px; font-weight: 700; color: #a8306d;
  background: linear-gradient(#ffe0f0, #ffb0d6);
  border: 1px solid #f39fc9; border-radius: 999px;
  box-shadow: inset 0 1px 0 #fff;
}

/* ===== 表单 ===== */
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: #b06a8e; margin-bottom: 5px; }
.field input, .field textarea {
  width: 100%; padding: 9px 11px;
  font-size: 14px; color: #7a3b5d; font-family: inherit;
  background: #fff; border: 2px solid var(--line); border-radius: 8px;
  box-shadow: inset 0 2px 5px rgba(200, 90, 150, .16);
  resize: vertical;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--pink-5);
  box-shadow: inset 0 2px 5px rgba(200, 90, 150, .16), 0 0 0 3px rgba(255, 126, 184, .28);
}

/* ===== 正文 / 杂项 ===== */
.diary-body { font-size: 15px; line-height: 2; color: #7a3b5d; word-break: break-word; }
.diary-meta { font-size: 13px; color: #b06a8e; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px dashed #ffc7e2; }
.empty { text-align: center; color: #b06a8e; padding: 18px; }
.mini-note { font-size: 12px; color: #b06a8e; margin-top: 8px; }

/* ===== 首页欢迎区 ===== */
.welcome-box { text-align: center; padding: 8px 6px 4px; }
.welcome-box .wb-title {
  font-size: 20px; font-weight: 800; color: #d43d84;
  text-shadow: 0 1px 0 #fff, 0 2px 0 #ffd0e7;
}
.welcome-box .wb-text { margin-top: 8px; font-size: 14px; color: #8a3d64; line-height: 1.9; }
.wb-tags { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.wb-tags span {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; font-weight: 700; color: #a8306d;
  padding: 4px 12px;
  background: linear-gradient(#fff, #ffe6f3);
  border: 2px solid #ffc7e2; border-radius: 999px;
  box-shadow: inset 0 1px 0 #fff, 0 2px 0 #f7cee3;
}
.blink { animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: .25; } }

/* ===== 页脚 ===== */
.footer, .qz-footer {
  position: relative; z-index: 1;
  max-width: 1000px; margin: 22px auto 0; padding: 0 14px;
}
.qz-footer-in, .footer {
  text-align: center; font-size: 12.5px; color: #8f4a70;
  line-height: 1.9;
  padding: 14px 12px;
  background: linear-gradient(#fff5fb, #ffe3f2);
  border: 2px solid var(--pink-3); border-radius: 10px;
  box-shadow: inset 0 1px 0 #fff, 0 4px 0 var(--thick), 0 8px 14px rgba(190, 70, 130, .18);
}
/* 兼容旧结构：footer 直接作为容器时去掉外框重复 */
.footer { padding: 14px 12px; }

/* ===== 响应式 ===== */
@media (max-width: 760px) {
  .qz-wrap, .layout { flex-direction: column; }
  .qz-side, .sidebar { width: 100%; flex: none; }
  .qz-banner-inner { flex-wrap: wrap; padding: 14px 14px 10px; }
  .qz-stats { margin-left: 0; width: 100%; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .qz-nick { font-size: 20px; }
}
@media (max-width: 520px) {
  .grid { grid-template-columns: 1fr; }
  .qz-nav a { padding: 9px 12px; font-size: 13px; }
  .qz-face { width: 64px; height: 64px; flex-basis: 64px; font-size: 36px; }
}
