:root{
  --bg:#0b0c10;
  --panel:#101216;
  --text:#e8e8e8;
  --muted:#9aa0a6;
  --line:rgba(255,255,255,.08);
  --card:rgba(255,255,255,.06);
  --accent:#5eead4;

  --w: 420px; /* 朋友圈竖屏视口宽度（桌面居中展示） */
}

*{ box-sizing:border-box; }
html,body{
  height:100%;
  width:100%;
  overflow-x: hidden;
}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: radial-gradient(1200px 800px at 20% 0%, rgba(94,234,212,.10), transparent 55%),
              radial-gradient(1200px 900px at 90% 30%, rgba(59,130,246,.10), transparent 55%),
              var(--bg);
  color: var(--text);
  overscroll-behavior-x: none;
  touch-action: pan-y;
}

.shell{
  min-height:100%;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding:24px 12px;
  overflow-x: clip;
}

.phone{
  width:min(100%, var(--w));
  background: #000;
  border:1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  overflow:hidden;
  box-shadow: 0 18px 60px rgba(0,0,0,.55);
  touch-action: pan-y;
  overscroll-behavior-x: none;
}

/* 顶部栏（仿朋友圈顶部简单样式） */
.topbar{
  height: 48px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: linear-gradient(to bottom, rgba(0,0,0,.85), rgba(0,0,0,.40));
  position: sticky;
  top:0;
  z-index: 10;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.topbar .title{
  font-weight:600;
  letter-spacing:.5px;
}

.topbar .brand{
  display:flex;
  align-items:center;
  gap:10px;
}

.topbar .brand-logo{
  width:24px;
  height:24px;
  border-radius:6px;
  object-fit:cover;
  border:1px solid rgba(255,255,255,.22);
  box-shadow: 0 4px 12px rgba(0,0,0,.35);
}

/* 个人封面区 */
.cover{
  position:relative;
  height: 280px;
  background: #111;
  overflow:hidden;
}
.cover .cover-img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit: cover;
  filter: saturate(1.02) contrast(1.02);
}
.cover::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.08) 55%, rgba(0,0,0,.25) 100%);
}

/* 头像与昵称（右下） */
.profile{
  position:absolute;
  right: 14px;
  bottom: 14px;
  display:flex;
  align-items:flex-end;
  gap: 12px;
  z-index:2;
}
.nickname{
  text-align:right;
}
.nickname .name{
  font-weight:700;
  font-size: 18px;
  line-height: 1.2;
}
.nickname .sig{
  margin-top:4px;
  font-size: 12px;
  color: rgba(255,255,255,.82);
  max-width: 210px;
  text-shadow: 0 1px 2px rgba(0,0,0,.5);
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient: vertical;
  overflow:hidden;
}

.avatar{
  width: 64px;
  height: 64px;
  border-radius: 10px;
  border: 2px solid rgba(255,255,255,.85);
  box-shadow: 0 10px 24px rgba(0,0,0,.45);
  overflow:hidden;
  background:#222;
}
.avatar img{
  width:100%;
  height:100%;
  object-fit: cover;
}

/* 动态列表 */
.feed{
  background: #000;
  padding: 10px 0 14px;
}
.feed-status{
  padding: 8px 12px 2px;
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,.58);
}
.feed-sentinel{
  height: 1px;
}
.protected-media{
  -webkit-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  pointer-events: auto;
}

.no-copy-page .phone,
.no-copy-page .phone *{
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.post{
  --post-left-width: 40px;
  --post-gap: 10px;
  --media-center-offset: calc(var(--post-left-width) + var(--post-gap));
  display:flex;
  gap: var(--post-gap);
  padding: 12px 12px 14px;
}
.post + .post{
  border-top: 1px solid rgba(255,255,255,.07);
}

.post .left{
  width: var(--post-left-width);
  flex: 0 0 var(--post-left-width);
}
.post .left .mini{
  width:40px;height:40px;border-radius:8px;
  overflow:hidden;background:#222;border:1px solid rgba(255,255,255,.12);
}
.post .left img{ width:100%;height:100%;object-fit:cover; }

.post .right{
  flex:1;
  min-width:0;
}
.post .right .name{
  font-weight:650;
  font-size: 14px;
  color: #b7f7ee;
}
.post .right .content{
  margin-top:6px;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(255,255,255,.92);
  white-space: pre-wrap;
  word-break: break-word;
}

.link-card{
  margin-top: 8px;
  display: flex;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  overflow: hidden;
}

.link-card:hover{
  background: rgba(255,255,255,.07);
}

.link-card-cover{
  width: 92px;
  flex: 0 0 92px;
  background: #0b0b0b;
}

.link-card-cover img{
  width: 100%;
  height: 100%;
  min-height: 92px;
  object-fit: cover;
  display: block;
}

.link-card-body{
  min-width: 0;
  padding: 10px 10px 10px 0;
  flex: 1;
}

.link-card-site{
  font-size: 11px;
  color: rgba(255,255,255,.60);
}

.link-card-site-row{
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.link-card-favicon{
  width: 16px;
  height: 16px;
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  object-fit: cover;
  flex: 0 0 16px;
}

.link-card-title{
  margin-top: 4px;
  font-size: 13px;
  color: rgba(255,255,255,.92);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.link-card-desc{
  margin-top: 4px;
  font-size: 12px;
  color: rgba(255,255,255,.68);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post .right .grid{
  margin-top:8px;
  display:grid;
  gap: 4px;
  width: calc(100% + var(--media-center-offset));
  margin-left: calc(-1 * var(--media-center-offset));
  grid-template-columns: repeat(3, 1fr);
}
.post .right .grid.one{ grid-template-columns: 1fr; }
.post .right .grid.two{ grid-template-columns: repeat(2, 1fr); }

.post .right .grid img,
.post .right .grid video{
  width:100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.10);
  background:#111;
}

.post .right .grid img{
  cursor: zoom-in;
}

.post .right .video-wrap{
  margin-top: 8px;
  width: calc(100% + var(--media-center-offset));
  margin-left: calc(-1 * var(--media-center-offset));
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.12);
  background: #000;
}

.post .right .video-wrap video{
  width: 100%;
  height: auto;
  max-height: min(72vh, 560px);
  display: block;
  background: #000;
}

.post .meta{
  margin-top:8px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  color: var(--muted);
  font-size: 12px;
}
.post .meta .actions{
  display:flex; gap:10px; align-items:center;
}
.btn-ghost{
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: rgba(255,255,255,.86);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  cursor:pointer;
}
.btn-ghost:hover{ background: rgba(255,255,255,.08); }

/* 管理页 */
.admin{
  padding: 14px 12px 18px;
  background: #000;
}
.card{
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  border-radius: 14px;
  padding: 12px;
}
.card + .card{ margin-top: 12px; }
.card h3{
  margin:0 0 10px 0;
  font-size: 14px;
  color: rgba(255,255,255,.92);
}
.row{ display:flex; gap:10px; flex-wrap:wrap; }
.field{
  flex:1;
  min-width: 160px;
}
label{
  display:block;
  font-size:12px;
  color: rgba(255,255,255,.70);
  margin: 0 0 6px 0;
}
input[type="text"], textarea{
  width:100%;
  border-radius: 10px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.45);
  color: rgba(255,255,255,.92);
  padding: 10px 10px;
  outline:none;
}
textarea{ min-height: 90px; resize: vertical; }

input[type="file"]{
  width:100%;
  color: rgba(255,255,255,.82);
}

.btn{
  border:0;
  background: linear-gradient(135deg, rgba(94,234,212,.95), rgba(59,130,246,.85));
  color:#021014;
  font-weight:700;
  padding: 10px 14px;
  border-radius: 12px;
  cursor:pointer;
}
.btn:active{ transform: translateY(1px); }

.hint{
  margin-top:8px;
  font-size: 12px;
  color: rgba(255,255,255,.65);
}
.sep{
  height:1px;
  background: rgba(255,255,255,.08);
  margin: 10px 0;
}

.image-viewer{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding:
    calc(12px + env(safe-area-inset-top))
    calc(8px + env(safe-area-inset-right))
    calc(14px + env(safe-area-inset-bottom))
    calc(8px + env(safe-area-inset-left));
  background: rgba(0, 0, 0, 0.88);
  z-index: 9999;
  cursor: zoom-out;
}

.image-viewer.open{
  display: flex;
}

.iv-track-wrap{
  width: 100%;
  height: 100%;
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
}

.iv-track-wrap.dragging{
  cursor: grabbing;
}

.iv-track{
  width: 100%;
  height: 100%;
  display: flex;
  will-change: transform;
}

.iv-slide{
  width: 100%;
  height: 100%;
  flex: 0 0 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.iv-slide img{
  max-width: min(92vw, 1200px);
  max-height: calc(100vh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
  background: #0c0c0c;
}

.image-viewer-inner{
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.iv-close{
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  top: 10px;
  top: calc(10px + env(safe-area-inset-top));
  right: 10px;
  right: calc(10px + env(safe-area-inset-right));
  z-index: 3;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  background: rgba(0,0,0,.45);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.iv-counter{
  position: absolute;
  left: 50%;
  bottom: max(10px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 3;
  min-width: 58px;
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  background: rgba(0,0,0,.45);
  color: rgba(255,255,255,.95);
  font-size: 13px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.iv-nav{
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  background: rgba(0,0,0,.45);
  color: #fff;
  font-size: 28px;
  line-height: 1;
  text-align: center;
  cursor: pointer;
}

.iv-nav:disabled{
  opacity: .35;
  cursor: not-allowed;
}

.iv-prev{
  left: 8px;
  left: max(8px, env(safe-area-inset-left));
}

.iv-next{
  right: 8px;
  right: max(8px, env(safe-area-inset-right));
}
