/* ============ 我的空间 - 前台样式 v2 (精致版) ============ */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --navy: #16324f;
  --navy-2: #2f5d8f;
  --blue: #4a86c7;
  --blue-light: #8ec0e8;
  --gold: #ffc21a;
  --gold-deep: #f59e0b;
  --bg-top: #eef4fb;
  --bg-bottom: #e3edf7;
  --card: #ffffff;
  --text: #2b3440;
  --text-sub: #7a8798;
  --text-light: #a3b0c0;
  --border: #e6edf5;
  --shadow-sm: 0 2px 8px rgba(31, 66, 105, .06);
  --shadow-md: 0 8px 24px rgba(31, 66, 105, .10);
  --shadow-lg: 0 16px 40px rgba(31, 66, 105, .14);
  --radius: 16px;
}

html { scroll-behavior: smooth; }

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(126, 174, 214, .28), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(255, 214, 59, .10), transparent 55%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  background-attachment: fixed;
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c4d5e6; border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #a8c0d8; background-clip: content-box; border: 2px solid transparent; }

/* ---------- 顶部导航 (毛玻璃) ---------- */
.topnav {
  position: sticky;
  top: 12px;
  z-index: 100;
  padding: 0 16px;
}
.topnav-inner {
  max-width: 1040px;
  margin: 0 auto;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: var(--shadow-md);
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--navy);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .5px;
}
.topnav-links { display: flex; align-items: center; gap: 8px; }
.nav-link {
  color: var(--text-sub);
  text-decoration: none;
  padding: 7px 16px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  transition: .2s;
}
.nav-link:hover { background: rgba(74, 134, 199, .10); color: var(--navy-2); }
.nav-link.active {
  background: linear-gradient(135deg, #5d9ad1, #4a86c7);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(74, 134, 199, .35);
}

.lang-wrap { display: flex; align-items: center; gap: 6px; margin-left: 6px; }
.lang-icon { font-size: 15px; }
.lang-select {
  background: #f2f7fc;
  color: var(--navy-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 10px;
  cursor: pointer;
  outline: none;
  max-width: 150px;
  transition: .2s;
}
.lang-select:hover { border-color: var(--blue-light); background: #fff; }
.lang-select option { color: var(--text); background: #fff; }

/* ---------- 横幅 ---------- */
.banner {
  position: relative;
  margin: 18px auto 0;
  max-width: 1040px;
  padding: 0 16px;
  height: 250px;
  overflow: hidden;
  border-radius: 26px;
  box-shadow: var(--shadow-lg);
}
.banner::before {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(115deg, rgba(255, 255, 255, .10) 0%, transparent 40%),
    radial-gradient(900px 340px at 15% 120%, rgba(255, 214, 59, .55) 0%, transparent 60%),
    radial-gradient(700px 320px at 100% 0%, rgba(126, 174, 214, .85) 0%, transparent 55%),
    linear-gradient(145deg, #2f5d8f 0%, #4a86c7 55%, #7eaed6 100%);
}
.banner::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(rgba(255, 255, 255, .28) 1.4px, transparent 1.4px),
    radial-gradient(rgba(255, 255, 255, .18) 1.2px, transparent 1.2px);
  background-size: 26px 26px, 17px 17px;
  background-position: 0 0, 8px 8px;
  opacity: .45;
}
.banner-decor { position: absolute; border-radius: 50%; pointer-events: none; }
.banner-decor.d1 {
  width: 220px; height: 220px; right: -50px; top: -70px;
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.32), rgba(255,255,255,.05) 60%, transparent 70%);
}
.banner-decor.d2 {
  width: 120px; height: 120px; left: 34%; bottom: -55px;
  background: radial-gradient(circle at 40% 40%, rgba(255, 214, 59, .45), transparent 68%);
}
.banner-decor.d3 {
  width: 60px; height: 60px; right: 22%; bottom: 22px;
  border: 2px solid rgba(255, 255, 255, .30);
  animation: floaty 7s ease-in-out infinite;
}
.banner-decor.d4 {
  width: 12px; height: 12px; left: 20%; top: 34px;
  background: rgba(255, 255, 255, .55);
  animation: floaty 5s ease-in-out infinite reverse;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.banner-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 0 34px;
}
.avatar-frame {
  position: relative;
  width: 108px; height: 108px;
  border-radius: 26px;
  padding: 5px;
  background: linear-gradient(135deg, #fff 0%, #dceaf8 100%);
  box-shadow: 0 10px 26px rgba(15, 40, 70, .35);
  flex-shrink: 0;
}
.avatar-frame::after {
  content: "";
  position: absolute; inset: -8px;
  border-radius: 30px;
  border: 2px solid rgba(255, 255, 255, .35);
  animation: avatarGlow 3.5s ease-in-out infinite;
}
@keyframes avatarGlow {
  0%, 100% { opacity: .5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}
.avatar-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 22px;
  display: block;
  background: #dce6f2;
}
.banner-info { min-width: 0; }
.banner-info h1 {
  color: #fff;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #fff 20%, #ffe9a8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .25));
}
.banner-info p {
  margin-top: 8px;
  color: rgba(255, 255, 255, .88);
  font-size: 14px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 480px;
}
.banner-stats {
  margin-top: 16px;
  display: flex;
  gap: 10px;
}
.stat {
  background: rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 14px;
  padding: 7px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 68px;
  transition: .2s;
}
.stat:hover { background: rgba(255, 255, 255, .26); transform: translateY(-2px); }
.stat .num { color: #fff; font-size: 19px; font-weight: 800; }
.stat .lbl { color: rgba(255, 255, 255, .8); font-size: 11.5px; margin-top: 1px; }

/* ---------- 主体布局 ---------- */
.main {
  max-width: 1040px;
  margin: 22px auto 0;
  padding: 0 16px 50px;
  display: grid;
  grid-template-columns: 1fr 320px;
  grid-template-areas:
    "feed about"
    "feed side";
  gap: 20px;
  align-items: start;
}
.column-main { grid-area: feed; min-width: 0; }
.column-side { grid-area: side; position: sticky; top: 88px; }
#aboutCard { grid-area: about; }

.section-head { display: flex; align-items: center; gap: 12px; padding: 4px 6px 14px; }
.section-title { font-size: 17px; color: var(--navy); font-weight: 700; white-space: nowrap; }
.section-line {
  height: 2px;
  flex: 1;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--blue-light), transparent);
}

/* ---------- 说说卡片 ---------- */
.feed { display: flex; flex-direction: column; gap: 16px; }
.post-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
  animation: fadeUp .5s ease both;
}
.post-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.post-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.post-avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  object-fit: cover;
  background: #dce6f2;
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--blue-light), var(--shadow-sm);
}
.post-name { font-size: 14.5px; color: var(--navy); font-weight: 700; }
.post-time { font-size: 12px; color: var(--text-light); margin-top: 3px; }
.post-content {
  font-size: 15px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}

/* 图片九宫格 */
.imgs { display: grid; gap: 7px; margin-top: 14px; }
.imgs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  cursor: zoom-in;
  display: block;
  background: #eef2f7;
  transition: transform .2s ease, box-shadow .2s ease;
}
.imgs img:hover { box-shadow: var(--shadow-md); }
.imgs-1 { grid-template-columns: 1fr; max-width: 430px; }
.imgs-1 img { height: auto; max-height: 480px; }
.imgs-2 { grid-template-columns: 1fr 1fr; max-width: 430px; }
.imgs-2 img { aspect-ratio: 1 / 1; }
.imgs-3 { grid-template-columns: repeat(2, 1fr); }
.imgs-3 img { aspect-ratio: 1 / 1; }
.imgs-3 img:first-child { grid-row: span 2; }
.imgs-4 { grid-template-columns: repeat(3, 1fr); }
.imgs-4 img { aspect-ratio: 1 / 1; }

.post-video {
  margin-top: 14px;
  width: 100%;
  max-height: 460px;
  border-radius: 12px;
  background: #000;
  display: block;
  box-shadow: var(--shadow-sm);
}
.video-wrap {
  position: relative;
  margin-top: 14px;
}
.video-wrap .post-video { margin-top: 0; }
.video-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 64px; height: 64px; border: none; border-radius: 50%;
  background: rgba(0, 0, 0, 0.55); color: #fff; font-size: 26px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  padding-left: 4px;
  z-index: 3;
}
.video-play:hover { background: rgba(0, 0, 0, 0.72); }
.video-hit {
  position: absolute; left: 0; right: 0; top: 0; bottom: 40px;
  z-index: 2;
  cursor: pointer;
}

.post-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.like-btn {
  border: none;
  background: linear-gradient(135deg, #f6fafd, #eef4fa);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-sub);
  padding: 7px 15px;
  border-radius: 20px;
  border: 1px solid var(--border);
  transition: .2s;
}
.like-btn:hover { background: #fff2f2; border-color: #f3c2c2; color: #e64a4a; transform: translateY(-1px); }
.like-btn.liked {
  background: linear-gradient(135deg, #ffecec, #ffdcdc);
  border-color: #f5b8b8;
  color: #e64a4a;
  font-weight: 700;
}
.like-btn .heart { font-size: 15px; transition: transform .2s ease; }
.like-btn.liked .heart { animation: pop .35s ease; }
@keyframes pop {
  0% { transform: scale(1); }
  45% { transform: scale(1.6) rotate(-8deg); }
  100% { transform: scale(1); }
}

/* ---------- 评论区 ---------- */
.post-comments { margin-top: 14px; border-top: 1px dashed var(--border); padding-top: 12px; }
.comment-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.comment-item {
  background: #f7fafd;
  border-radius: 10px;
  padding: 8px 12px;
  border: 1px solid #eef2f7;
}
.comment-item .c-nick { font-size: 12px; color: var(--blue); font-weight: 700; }
.comment-item .c-time { font-size: 11px; color: var(--text-light); margin-left: 6px; }
.comment-item .c-text { font-size: 13px; margin-top: 3px; line-height: 1.6; word-break: break-word; color: var(--text); }
.comment-form { display: flex; gap: 8px; }
.comment-form input {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  outline: none;
  background: #f8fbfe;
  font-family: inherit;
  transition: .2s;
}
.comment-form input:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 3px rgba(74,134,199,.14); }
.comment-form .c-nick { flex: 0 0 92px; }
.comment-form .c-text { flex: 1; }
.comment-form button {
  border: none;
  background: linear-gradient(135deg, #5d9ad1, #4a86c7);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 12px;
  cursor: pointer;
  transition: .2s;
}
.comment-form button:hover { filter: brightness(1.08); }
.comment-tip { font-size: 12px; color: #2e9e5b; min-height: 15px; margin-top: 6px; }
.comment-tip.err { color: #e64a4a; }

/* ---------- 留言板 ---------- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.side-card { position: relative; overflow: hidden; }
.side-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--blue-light), var(--gold));
}
.card-title {
  font-size: 15px;
  color: var(--navy);
  font-weight: 700;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title::before {
  content: "";
  width: 6px; height: 16px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--blue), var(--blue-light));
}
.msg-form { display: flex; flex-direction: column; gap: 9px; margin-bottom: 14px; }
.msg-form input, .msg-form textarea {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 13px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  outline: none;
  background: #f8fbfe;
  transition: .2s;
}
.msg-form input:focus, .msg-form textarea:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(74, 134, 199, .14);
}
.msg-form button {
  align-self: flex-end;
  border: none;
  background: linear-gradient(135deg, #5d9ad1, #4a86c7);
  color: #fff;
  padding: 8px 24px;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(74, 134, 199, .32);
  transition: .2s;
}
.msg-form button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.msg-tip { font-size: 12px; color: #2e9e5b; min-height: 16px; margin: -4px 0 10px; padding-left: 2px; }
.msg-tip.err { color: #e64a4a; }
.about-text {
  font-size: 13px;
  line-height: 1.85;
  color: var(--text-sub);
  white-space: pre-wrap;
  word-break: break-word;
}
.msg-list { display: flex; flex-direction: column; gap: 12px; max-height: 460px; overflow-y: auto; }
.msg-item { border-bottom: 1px dashed var(--border); padding-bottom: 10px; }
.msg-item .msg-nick {
  font-size: 12.5px;
  color: var(--blue);
  font-weight: 700;
  background: #eef5fc;
  border-radius: 8px;
  padding: 1px 8px;
}
.msg-item .msg-time { font-size: 11px; color: var(--text-light); margin-left: 6px; }
.msg-item .msg-text { font-size: 13px; margin-top: 4px; line-height: 1.65; word-break: break-word; color: var(--text); }
.msg-empty { font-size: 12px; color: var(--text-light); text-align: center; padding: 14px 0; }

/* ---------- 其他 ---------- */
.empty {
  background: var(--card);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  padding: 52px 20px;
  text-align: center;
  color: var(--text-light);
  font-size: 14px;
  box-shadow: var(--shadow-sm);
}
.footer {
  text-align: center;
  color: var(--text-light);
  font-size: 12.5px;
  padding: 10px 0 34px;
}

.lightbox {
  position: fixed; inset: 0;
  background: rgba(10, 22, 38, .9);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  animation: fadeIn .2s ease;
}
.lightbox img {
  max-width: 92vw; max-height: 92vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.lb-zone {
  position: absolute; top: 0; bottom: 0; width: 40%;
  z-index: 900;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.lb-zone-prev { left: 0; }
.lb-zone-next { right: 0; }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,0.14); color: #fff;
  z-index: 950;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.lb-prev { left: 18px; }
.lb-next { right: 18px; }
.lb-counter {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 14px; background: rgba(0,0,0,0.4);
  padding: 5px 14px; border-radius: 16px; z-index: 1000;
  pointer-events: none;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .main {
    grid-template-columns: 1fr;
    grid-template-areas:
      "about"
      "feed"
      "side";
  }
  /* 手机端 banner 与下方动态区对齐 (动态区左右各 16px 内边距) */
  .banner {
    margin-left: 16px;
    margin-right: 16px;
    height: auto;
    min-height: 220px;
  }
  .column-side { position: static; }
  .banner-inner { flex-direction: column; align-items: flex-start; padding: 26px 24px; gap: 16px; }
  .banner-info p { white-space: normal; }
  .topnav { top: 8px; }
}
@media (max-width: 520px) {
  .banner-stats { gap: 7px; }
  .stat { min-width: 58px; padding: 6px 10px; }
  .post-card { padding: 16px; }
  .comment-form { flex-wrap: wrap; }
  .comment-form .c-nick { flex: 1 1 100%; }
}

/* ===== 锁定动态 ===== */
.lock-wrap { margin-top: 14px; }
.lock-media { border-radius: 12px; }
.lock-media .imgs { margin-top: 0; }
.lock-media .imgs img,
.lock-media video {
  filter: blur(18px);
  pointer-events: none;
  user-select: none;
}
.lock-media .video-play { display: none; }
.lock-media .video-hit { pointer-events: none; }
.lock-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-top: 10px; padding: 10px 12px;
  background: #f2f4f8; border-radius: 10px;
}
.lock-icon { font-size: 18px; }
.lock-title { font-size: 13px; font-weight: 600; color: #555; }
.lock-hint { font-size: 12px; color: #999; }
.unlock-form { display: flex; gap: 6px; flex: 1 1 220px; }
.unlock-form .unlock-input {
  flex: 1; min-width: 0; padding: 8px 12px; border: 1px solid #ddd; border-radius: 8px;
  font-size: 13px; background: #fff; color: #333; outline: none;
}
.unlock-form button {
  padding: 8px 16px; border: none; border-radius: 8px; background: #5b7cfa; color: #fff;
  font-size: 13px; cursor: pointer; white-space: nowrap;
}
.unlock-form button:hover { background: #4a68e0; }
.unlock-tip { font-size: 12px; min-height: 14px; flex-basis: 100%; color: #c0392b; }
