/* ── 说说插件样式 v2 · 参考 veryjack.com/say ── */
@import url('https://cdn-font.hyperos.mi.com/font/css2?family=MiSans:wght@300;400;500;600&display=swap');

/* ── 变量 ── */
:root {
    --ss-font:    'MiSans', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    --ss-bg:      transparent;
    --ss-text:    #333;
    --ss-sub:     #999;
    --ss-link:    #333;
    --ss-link-h:  #555;
    --ss-divider: #f0f0f0;
    --ss-img-bg:  #f5f5f5;
    --ss-accent:  #666;
    --ss-radius:  10px;
    --ss-avatar:  42px;  /* 列表中的头像尺寸 */
}

/* ── 外层 ── */
.ss-wrap {
    font-family: var(--ss-font);
    max-width: 680px;
    margin: 0 auto;
    color: var(--ss-text);
    background: var(--ss-bg);
    -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════
   Profile 区块（页面顶部）
══════════════════════════ */
.ss-profile {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 0 28px;
    border-bottom: 1px solid var(--ss-divider);
    margin-bottom: 28px;
}

.ss-avatar-link {
    display: block;
    flex-shrink: 0;
    text-decoration: none;
}

.ss-profile-avatar {
    display: block;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    background: #e8e8e8;
}

.ss-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #e8e8e8;
    color: #888;
    font-size: 1.4rem;
    font-weight: 500;
    text-decoration: none;
}

.ss-profile-info {
    flex: 1;
    min-width: 0;
}

.ss-profile-name {
    display: inline-block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ss-link);
    text-decoration: none;
    letter-spacing: .01em;
    transition: color .15s;
}
.ss-profile-name:hover { color: var(--ss-link-h); }

.ss-profile-desc {
    margin: 4px 0 0;
    font-size: .88rem;
    color: var(--ss-sub);
    font-weight: 300;
    line-height: 1.5;
}

/* ══════════════════════════
   日期分组
══════════════════════════ */
.ss-group {
    margin-bottom: 10px;
}

.ss-group-date {
    font-size: .78rem;
    font-weight: 500;
    color: var(--ss-sub);
    letter-spacing: .06em;
    padding: 18px 0 10px;
    text-transform: uppercase;
}

/* ══════════════════════════
   单条说说
══════════════════════════ */
.ss-item {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--ss-divider);
    animation: ss-in .4s ease both;
}
.ss-item:last-child {
    border-bottom: none;
}

@keyframes ss-in {
    from { opacity: 0; transform: translateY(8px) }
    to   { opacity: 1; transform: translateY(0) }
}
.ss-group:nth-child(1) .ss-item:nth-child(1) { animation-delay: .04s }
.ss-group:nth-child(1) .ss-item:nth-child(2) { animation-delay: .08s }
.ss-group:nth-child(1) .ss-item:nth-child(3) { animation-delay: .12s }
.ss-group:nth-child(2) .ss-item:nth-child(1) { animation-delay: .16s }
.ss-group:nth-child(2) .ss-item:nth-child(2) { animation-delay: .20s }
.ss-group:nth-child(3) .ss-item:nth-child(1) { animation-delay: .24s }

/* 头像（列表中） */
.ss-item-avatar-wrap {
    display: block;
    flex-shrink: 0;
    text-decoration: none;
    align-self: flex-start;
}

.ss-item-avatar {
    display: block;
    width: var(--ss-avatar);
    height: var(--ss-avatar);
    border-radius: 50%;
    object-fit: cover;
    background: #e8e8e8;
}

.ss-item-avatar.ss-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--ss-avatar);
    height: var(--ss-avatar);
    border-radius: 50%;
    background: #e8e8e8;
    color: #888;
    font-size: 1rem;
    font-weight: 500;
}

/* 正文区 */
.ss-item-body {
    flex: 1;
    min-width: 0;
}

/* 顶行：昵称 + 心情 + 时间 */
.ss-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.ss-item-name {
    font-size: .95rem;
    font-weight: 600;
    color: var(--ss-link);
    text-decoration: none;
    letter-spacing: .01em;
    transition: color .15s;
}
.ss-item-name:hover { color: var(--ss-link-h); }

.ss-item-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.ss-mood-tag {
    font-size: .78rem;
    font-weight: 400;
    white-space: nowrap;
}

.ss-time {
    font-size: .78rem;
    color: var(--ss-sub);
    font-weight: 300;
    white-space: nowrap;
}

/* 内容文字 */
.ss-content {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--ss-text);
    word-break: break-word;
    overflow-wrap: break-word;
}
.ss-content p {
    margin: 0 0 .7em;
    padding: 0;
}
.ss-content p:last-child { margin-bottom: 0; }
.ss-content a {
    color: #0077cc;
    text-decoration: none;
}
.ss-content a:hover { text-decoration: underline; }

/* ══════════════════════════
   图片网格
══════════════════════════ */
.ss-images {
    display: grid;
    gap: 4px;
    margin-top: 12px;
    max-width: 480px;
}
.ss-images-1 { grid-template-columns: 1fr;        max-width: 280px }
.ss-images-2 { grid-template-columns: 1fr 1fr }
.ss-images-3 { grid-template-columns: 1fr 1fr 1fr }

.ss-img-wrap {
    overflow: hidden;
    border-radius: 6px;
    aspect-ratio: 1;
    background: var(--ss-img-bg);
    cursor: zoom-in;
}
.ss-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .25s ease;
}
.ss-img-wrap:hover img { transform: scale(1.04) }

/* ══════════════════════════
   空状态
══════════════════════════ */
.ss-empty {
    text-align: center;
    color: var(--ss-sub);
    padding: 60px 0;
    font-size: .9rem;
    font-weight: 300;
}

/* ══════════════════════════
   灯箱
══════════════════════════ */
#ss-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.88);
    z-index: 99999;
    cursor: zoom-out;
    align-items: center;
    justify-content: center;
}
#ss-lightbox.active { display: flex; }
#ss-lightbox-img {
    max-width: 92vw;
    max-height: 90vh;
    border-radius: 6px;
    object-fit: contain;
    box-shadow: 0 12px 60px rgba(0,0,0,.5);
    animation: ss-lb .2s ease;
}
@keyframes ss-lb {
    from { transform: scale(.92); opacity: 0 }
    to   { transform: scale(1);   opacity: 1 }
}

/* ══════════════════════════
   响应式
══════════════════════════ */
@media (max-width: 520px) {
    :root { --ss-avatar: 36px }
    .ss-profile-avatar,
    .ss-avatar-fallback { width: 52px; height: 52px }
    .ss-item { gap: 10px; padding: 14px 0 }
    .ss-content { font-size: .95rem }
    .ss-images-3 { grid-template-columns: 1fr 1fr }
    .ss-images-1 { max-width: 100% }
}
