/* Moments (Friends Circle) - style inspired by supplied jotting page */
.moments-page {
    min-height: calc(100vh - 120px);
    background: #f4f7ff;
}

.moments-hero {
    position: relative;
    min-height: 45vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.moments-hero-bg {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(22, 30, 66, 0.45), rgba(22, 30, 66, 0.2)),
        var(--moments-hero-bg, none),
        radial-gradient(1200px 420px at 20% 10%, rgba(147, 197, 253, 0.38), transparent 65%),
        radial-gradient(1000px 520px at 80% 10%, rgba(167, 139, 250, 0.36), transparent 65%),
        linear-gradient(140deg, #4f46e5, #7c3aed);
    background-size: cover, cover, auto, auto, auto;
    background-position: center center, center center, center, center, center;
}

.moments-hero::before,
.moments-hero::after {
    content: "";
    position: absolute;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    filter: blur(0.2px);
}

.moments-hero::before {
    width: 210px;
    height: 42px;
    left: 6%;
    top: 16%;
}

.moments-hero::after {
    width: 160px;
    height: 34px;
    right: 9%;
    top: 12%;
}

.moments-hero-inner {
    position: relative;
    z-index: 1;
    text-align: center;
}

.moments-title .t1 {
    font-size: 34px;
    line-height: 1.2;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
    text-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
}

.moments-title .t2 {
    margin-top: 10px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 18px;
}

.moments-wrap {
    width: min(760px, 94%);
    margin: 0 auto;
    padding: 0 0 52px;
    position: relative;
    top: -52px;
}

.moments-alert {
    background: #fff;
    border: 1px solid #dbe3ff;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
    color: #334155;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
}

.moments-alert.error {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

.moments-publish {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.moments-tip {
    color: #64748b;
    font-size: 13px;
}

.moments-login-link {
    display: inline-flex;
    align-items: center;
    margin-left: 10px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    color: #4338ca;
    text-decoration: none;
    font-weight: 700;
}

.moments-list {
    margin-top: 14px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.moment-card {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 10px;
    background: #fff;
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
}

.moment-card:last-child {
    border-bottom: none;
}

.moment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, #c7d2fe, #bae6fd);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e293b;
    font-weight: 700;
}

.moment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.moment-name {
    margin-top: 2px;
    color: #607199;
    font-size: 15px;
    font-weight: 700;
}

.moment-content {
    margin: 8px 16px 0 0;
    line-height: 1.6;
    color: #1e293b;
    letter-spacing: 0.4px;
}

.moment-content.markdown-content img {
    width: min(100%, 520px);
    height: auto;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    margin-top: 8px;
}

.moment-address-line {
    margin-top: 10px;
    font-size: 12px;
    color: #64748b;
}

.moment-meta {
    margin: 16px 0 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    color: #94a3b8;
    font-size: 12px;
}

.moment-meta--bar {
    margin-top: 12px;
    margin-bottom: 0;
    align-items: center;
}

.moment-time--bar {
    color: #b2b2b2;
    font-size: 12px;
}

.moment-interactions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.moment-ico-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border: none;
    background: transparent;
    color: #8a8a8a;
    cursor: pointer;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.moment-ico-btn:hover:not(:disabled) {
    color: #476185;
    background: rgba(71, 97, 133, 0.08);
}

.moment-ico-btn--like.is-liked {
    color: #ef4444;
}

.moment-ico-btn--like.is-liked .moment-svg-ico path {
    stroke: #ef4444;
    fill: rgba(239, 68, 68, 0.12);
}

.moment-ico-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.moment-svg-ico {
    flex-shrink: 0;
    vertical-align: middle;
}

.moment-address {
    margin-right: 8px;
}

.moment-action {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #16a34a;
    border-radius: 6px;
    padding: 3px 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.moment-action:hover {
    background: #dcfce7;
}

.moment-comments {
    margin-top: 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 4px 12px 12px;
}

/* 无评论且未点开输入框时，不占用空白条 */
.moment-comments:not(:has(.mc-item)) {
    margin-top: 0;
    padding: 0;
    border: none;
    background: transparent;
}

.moment-comments:not(:has(.mc-item)) .moment-comment-form-wrap:not([hidden]) {
    margin-top: 10px;
    padding: 14px 14px 12px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.moment-comment-form-wrap {
    margin-top: 8px;
}

.moment-comment-form-wrap[hidden] {
    display: none !important;
}

/* —— 评论列表（用户名 + 等级 + 正文同一行，元信息第二行）—— */
.mc-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0 10px;
    border-bottom: 1px solid #f1f5f9;
}

.moment-comments > .mc-item + .mc-item,
.moment-comments > .mc-item + .mc-replies + .mc-item {
    border-top: 1px solid #e5e7eb;
    margin-top: 4px;
    padding-top: 14px;
}

.mc-replies {
    margin: 0 0 2px 52px;
}

.mc-item--reply {
    padding: 10px 0 8px;
    border-bottom: 1px solid #f8fafc;
}

.mc-item--reply:last-child {
    border-bottom: none;
}

.mc-avatar {
    position: relative;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(145deg, #e0e7ff, #dbeafe);
}

.mc-avatar--md {
    width: 40px;
    height: 40px;
}

.mc-avatar--sm {
    width: 32px;
    height: 32px;
}

.mc-avatar-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.mc-avatar-img.is-hidden {
    display: none !important;
}

.mc-avatar-letter {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 15px;
    color: #312e81;
    line-height: 1;
    user-select: none;
}

.mc-avatar--sm .mc-avatar-letter {
    font-size: 13px;
}

.mc-body {
    flex: 1;
    min-width: 0;
}

.mc-mainline {
    font-size: 14px;
    line-height: 1.55;
    color: #18191c;
    word-break: break-word;
}

.mc-uname {
    color: #fb7299;
    font-weight: 600;
}

.mc-uname--reply {
    color: #61666d;
    font-weight: 600;
}

.mc-lv {
    display: inline-block;
    margin-left: 6px;
    padding: 0 5px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    vertical-align: 1px;
    color: #fff;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
}

.mc-lv--muted {
    background: #94a3b8;
}

.mc-replyto {
    margin-left: 6px;
    color: #9499a0;
    font-size: 13px;
}

.mc-mention {
    margin-left: 2px;
    color: #008ac5;
    font-weight: 500;
}

.mc-colon {
    color: #18191c;
}

.mc-text {
    color: #18191c;
}

.mc-metaline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-top: 6px;
    font-size: 12px;
    color: #9499a0;
}

.mc-time {
    color: #9499a0;
}

.mc-geo {
    color: #9499a0;
}

.mc-reply {
    margin-left: auto;
    border: none;
    background: transparent;
    color: #9499a0;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
}

.mc-reply:hover {
    color: #008ac5;
    background: rgba(0, 138, 197, 0.08);
}

/* —— 评论输入区（左头像 + 大框 + 右下「评论」）—— */
.moment-comment-form {
    margin-top: 4px;
}

.moment-comment-form--bili {
    margin-top: 10px;
}

.mc-editor {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.mc-editor-avatar {
    position: relative;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(145deg, #e0e7ff, #dbeafe);
}

.mc-editor-avatar-inner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: #312e81;
    line-height: 1;
    user-select: none;
}

.mc-editor-avatar-inner.is-guest {
    color: #64748b;
    font-size: 16px;
}

.mc-editor-avatar-cover {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.mc-editor-avatar-cover.is-hidden {
    display: none !important;
}

.mc-editor-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mc-editor-textarea {
    width: 100%;
    min-height: 96px;
    resize: vertical;
    border: 1px solid #dcdfe6;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.5;
    color: #18191c;
    outline: none;
    background: #fff;
    font-family: inherit;
    box-sizing: border-box;
}

.mc-editor-textarea::placeholder {
    color: #c0c4cc;
}

.mc-editor-textarea:focus {
    border-color: #00a1d6;
    box-shadow: 0 0 0 2px rgba(0, 161, 214, 0.12);
}

.mc-editor-textarea:disabled {
    background: #f5f7fa;
    color: #909399;
    cursor: not-allowed;
}

.mc-editor-actions {
    display: flex;
    justify-content: flex-end;
}

.mc-editor-submit {
    border: none;
    cursor: pointer;
    padding: 8px 22px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: #00a1d6;
    transition: background 0.15s ease;
}

.mc-editor-submit:hover:not(:disabled) {
    background: #0097c7;
}

.mc-editor-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.moments-input {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    padding: 8px 10px;
    font-size: 13px;
    outline: none;
    background: #fff;
}

.moments-input.small {
    padding: 8px 10px;
}

.moments-input:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.moments-btn {
    border: none;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #6366f1);
}

.moments-btn.mini {
    padding: 7px 10px;
}

.moments-btn:disabled,
.moment-action:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.moments-empty {
    padding: 20px;
    text-align: center;
    color: #64748b;
}

@media (max-width: 700px) {
    .moments-wrap {
        width: 100%;
        padding-left: 10px;
        padding-right: 10px;
    }

    .moments-title .t1 {
        font-size: 30px;
    }

    .moments-title .t2 {
        font-size: 16px;
    }

    .mc-replies {
        margin-left: 40px;
    }
}

