* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background: #EDF1F5; color: #333; font-size: 14px;
}

/* ======== 顶部导航 ======== */
.top-nav {
    position: sticky; top: 0; z-index: 50;
    background: #fff; border-bottom: 1px solid #e3e8ee;
    height: 52px;
}
.top-inner {
    max-width: 1180px; margin: 0 auto; height: 100%;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px;
}
.top-logo {
    display: flex; align-items: center; gap: 8px;
    color: #12B7F5; font-size: 17px; font-weight: 700; text-decoration: none;
}
.top-back {
    color: #5a6675; font-size: 13px; cursor: pointer;
    padding: 6px 14px; border-radius: 15px; transition: all .2s;
}
.top-back:hover { background: #f0f4f8; color: #12B7F5; }

/* ======== 头部横幅 ======== */
.space-hero {
    height: 210px; position: relative;
    display: flex; align-items: flex-end;
    box-shadow: inset 0 -60px 80px rgba(0,0,0,.12);
}
.hero-inner {
    max-width: 1180px; margin: 0 auto; padding: 0 20px 26px;
    width: 100%; display: flex; align-items: flex-end; gap: 18px;
}
.hero-avatar {
    width: 88px; height: 88px; border-radius: 18px; object-fit: cover;
    border: 3px solid #fff; box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.hero-text { flex: 1; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.25); }
.hero-text h1 { font-size: 28px; font-weight: 700; }
.hero-sig { font-size: 14px; margin-top: 4px; opacity: .95; }
.hero-meta { font-size: 12px; margin-top: 3px; opacity: .8; }
.hero-btn {
    border: none; background: #fff; color: #333;
    padding: 9px 22px; border-radius: 20px; font-size: 14px; cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,.18); transition: all .2s;
}
.hero-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.22); }

/* ======== 主体三栏 ======== */
.space-body {
    max-width: 1180px; margin: 18px auto 0;
    padding: 0 20px; display: flex; gap: 16px; align-items: flex-start;
}
.space-left { width: 232px; flex-shrink: 0; }
.space-main { flex: 1; min-width: 0; }
.space-right { width: 290px; flex-shrink: 0; }

.card {
    background: #fff; border-radius: 12px;
    box-shadow: 0 2px 10px rgba(16, 32, 56, .06);
    padding: 16px; margin-bottom: 16px;
}
.card-title {
    font-size: 15px; font-weight: 600; color: #2b3648;
    margin-bottom: 12px; padding-left: 10px;
    border-left: 3px solid #12B7F5;
}

/* ======== 左栏 ======== */
.profile-card { text-align: center; padding-top: 22px; }
.profile-avatar {
    width: 74px; height: 74px; border-radius: 16px; object-fit: cover;
    box-shadow: 0 4px 12px rgba(0,0,0,.14);
}
.profile-name { font-size: 18px; font-weight: 700; margin-top: 10px; }
.profile-sig {
    font-size: 12px; color: #8a94a1; margin-top: 4px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.profile-stats {
    display: flex; justify-content: center; gap: 18px;
    margin: 14px 0 6px; padding-top: 12px;
    border-top: 1px dashed #e6ebf0;
}
.profile-stats div { text-align: center; }
.profile-stats b { display: block; font-size: 17px; color: #12B7F5; }
.profile-stats span { font-size: 11px; color: #a0aab5; }
.profile-nav { margin-top: 8px; }
.pn {
    display: block; padding: 9px 12px; border-radius: 8px;
    color: #5a6675; text-decoration: none; font-size: 14px;
    transition: background .15s, color .15s; text-align: left;
}
.pn:hover { background: #f2f6fa; }
.pn.active { background: #E3F4FE; color: #12B7F5; font-weight: 600; }

.visit-card .visitor-list { display: flex; flex-wrap: wrap; gap: 10px; }
.visitor {
    width: 56px; text-align: center; text-decoration: none; color: #333;
}
.visitor img {
    width: 48px; height: 48px; border-radius: 12px; object-fit: cover;
    border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.1);
    transition: transform .2s;
}
.visitor:hover img { transform: scale(1.08); }
.visitor span {
    display: block; font-size: 11px; margin-top: 4px;
    color: #8a94a1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.v-empty { color: #a0aab5; font-size: 12px; text-align: center; padding: 8px 0; }

/* ======== 中栏：发表动态 ======== */
.publish-card textarea {
    width: 100%; height: 86px; resize: none;
    border: none; outline: none; font-size: 14px; font-family: inherit;
    line-height: 1.6; color: #333;
}
.publish-row {
    display: flex; align-items: center; justify-content: space-between;
    border-top: 1px solid #eef1f5; padding-top: 10px;
}
.pub-tools { display: flex; align-items: center; gap: 10px; }
.pub-add-file {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 13px; color: #12B7F5; cursor: pointer;
    padding: 4px 12px; border-radius: 14px; background: #E3F4FE;
    transition: all .2s; user-select: none;
}
.pub-add-file:hover { background: #d0edfd; }
.pub-tip { font-size: 12px; color: #a0aab5; }
.pub-image-box {
    display: flex; flex-wrap: wrap; gap: 8px;
    margin-top: 10px;
}
.pub-img-item { position: relative; }
.pub-img-item img {
    width: 80px; height: 80px; object-fit: cover;
    border-radius: 8px; display: block;
    box-shadow: 0 2px 6px rgba(0,0,0,.1);
}
.pub-img-del {
    position: absolute; top: -7px; right: -7px;
    width: 19px; height: 19px; border-radius: 50%;
    background: rgba(0,0,0,.55); color: #fff;
    font-size: 11px; line-height: 19px; text-align: center;
    cursor: pointer; user-select: none; transition: background .2s;
}
.pub-img-del:hover { background: #e4572e; }
.pub-video-box {
    display: flex; align-items: center; gap: 10px;
    margin-top: 10px; padding: 8px;
    background: #f6f8fa; border-radius: 10px;
}
.pub-video-box video {
    width: 160px; height: 90px; object-fit: cover; border-radius: 8px;
    background: #000; flex-shrink: 0;
}
.pub-video-name {
    flex: 1; font-size: 12px; color: #5a6675;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pub-video-del {
    color: #c0c8d2; font-size: 15px; cursor: pointer;
    padding: 4px 6px; border-radius: 6px; flex-shrink: 0;
}
.pub-video-del:hover { color: #e4572e; background: #ffe9e3; }
.btn-primary-sm {
    border: none; background: #12B7F5; color: #fff;
    padding: 8px 22px; border-radius: 17px; font-size: 13px; cursor: pointer;
    transition: background .2s;
}
.btn-primary-sm:hover { background: #0fa5da; }
.btn-primary-sm:disabled { opacity: .55; cursor: default; }

/* 在他人空间发布时的归属提示 */
.pub-scope-tip {
    font-size: 12px; color: #8a94a1; margin-bottom: 8px;
    padding: 6px 10px; background: #f6f8fa; border-radius: 8px;
}
.pub-scope-tip a { color: #12B7F5; text-decoration: none; }
.pub-scope-tip a:hover { text-decoration: underline; }

/* 动态卡片 */
.moment-card { padding: 16px 18px; }
.moment-name a { color: #12B7F5; text-decoration: none; }
.moment-name a:hover { text-decoration: underline; }
.moment-head { display: flex; align-items: center; gap: 10px; }
.moment-avatar { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; }
.moment-head-info { flex: 1; }
.moment-name { font-size: 14px; font-weight: 600; color: #12B7F5; }
.moment-time { font-size: 12px; color: #a0aab5; margin-top: 1px; }
.moment-del { color: #c0c8d2; font-size: 12px; cursor: pointer; }
.moment-del:hover { color: #e4572e; }
.moment-content {
    font-size: 15px; line-height: 1.7; margin: 12px 2px;
    white-space: pre-wrap; word-break: break-word;
}
.moment-image.single {
    display: block; max-width: 100%; max-height: 480px;
    border-radius: 10px; margin: 4px 2px 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.moment-images {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 6px; margin: 4px 2px 10px;
}
.moment-images .moment-image {
    width: 100%; aspect-ratio: 1; object-fit: cover;
    border-radius: 8px; display: block;
    cursor: pointer; transition: transform .15s;
}
.moment-images .moment-image:hover { transform: scale(1.02); }
.moment-video {
    display: block; width: 100%; height: auto; max-height: 420px;
    border-radius: 10px; background: #000;
    margin: 4px 2px 10px;
    /* 封面/画面填满，避免出现黑边与黑屏 */
    object-fit: cover;
    /* 禁止长按弹出保存菜单 / 选中拖拽 */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}
.moment-comments {
    background: #f6f8fa; border-radius: 8px; padding: 10px 12px;
}
.mc-item { font-size: 13px; line-height: 1.7; color: #4a5568; }
.mc-user { color: #12B7F5; text-decoration: none; font-weight: 500; }
.moment-input-row {
    display: flex; gap: 8px; margin-top: 10px;
}
.mc-input {
    flex: 1; height: 32px; padding: 0 12px;
    border: 1px solid #e3e8ee; border-radius: 16px; font-size: 13px;
    outline: none; transition: border-color .2s;
}
.mc-input:focus { border-color: #12B7F5; }
.mc-btn {
    height: 32px; padding: 0 16px; border: none; border-radius: 16px;
    background: #12B7F5; color: #fff; font-size: 13px; cursor: pointer;
}
.mc-btn:disabled { opacity: .55; }
.empty-tip { text-align: center; color: #a0aab5; font-size: 13px; padding: 30px 0; }

/* ======== 右栏：留言板 ======== */
.gb-input-row { display: flex; gap: 8px; margin-bottom: 12px; }
.gb-input-row input {
    flex: 1; height: 34px; padding: 0 12px;
    border: 1px solid #e3e8ee; border-radius: 17px; font-size: 13px;
    outline: none; transition: border-color .2s;
}
.gb-input-row input:focus { border-color: #12B7F5; }
.gb-list { max-height: 520px; overflow-y: auto; }
.gb-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed #eef1f5; }
.gb-item:last-child { border-bottom: none; }
.gb-avatar { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; flex-shrink: 0; }
.gb-body { flex: 1; min-width: 0; }
.gb-head { display: flex; align-items: center; gap: 8px; }
.gb-name { font-size: 13px; color: #12B7F5; text-decoration: none; font-weight: 500; }
.gb-time { font-size: 11px; color: #b0bac4; }
.gb-del { font-size: 11px; color: #c0c8d2; cursor: pointer; margin-left: auto; }
.gb-del:hover { color: #e4572e; }
.gb-content { font-size: 13px; color: #4a5568; margin-top: 4px; line-height: 1.6; word-break: break-word; }
.gb-empty { color: #a0aab5; font-size: 12px; text-align: center; padding: 14px 0; }

/* ======== 页脚 ======== */
.space-footer {
    text-align: center; color: #a0aab5; font-size: 12px;
    padding: 26px 0 30px;
}

/* ======== Toast ======== */
.toast-msg {
    position: fixed; top: 62px; left: 50%; transform: translateX(-50%) translateY(-14px);
    background: rgba(30,34,40,.92); color: #fff; font-size: 13px;
    padding: 9px 18px; border-radius: 8px; z-index: 999;
    opacity: 0; transition: all .3s; pointer-events: none;
}
.toast-msg.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast-msg.ok { background: rgba(31,158,93,.94); }

/* ======== 响应式 ======== */
@media (max-width: 960px) {
    .space-right { display: none; }
    .space-left { width: 200px; }
}
@media (max-width: 720px) {
    .space-body { flex-direction: column; }
    .space-left { width: 100%; }
    .space-hero { height: auto; padding: 40px 0 18px; }
    .hero-avatar { width: 64px; height: 64px; }
}
/* ---- 手机窄屏 ---- */
@media (max-width: 480px) {
    .top-inner { padding: 0 12px; }
    .top-logo { font-size: 15px; }
    .space-body { padding: 0 12px; margin-top: 12px; }
    .hero-inner { padding: 0 14px 18px; gap: 12px; }
    .hero-avatar { width: 56px; height: 56px; border-radius: 14px; }
    .hero-text h1 { font-size: 21px; }
    .hero-sig { font-size: 12px; }
    .hero-btn { padding: 8px 16px; font-size: 13px; }
    .profile-stats { gap: 12px; }
    .moment-card { padding: 13px 14px; }
    .moment-input-row { flex-wrap: wrap; }
    .mc-input { flex: 1 1 100%; }
    .mc-btn { width: 100%; height: 34px; border-radius: 17px; }
    .space-footer { padding: 20px 0 24px; }
}
