/* ==================== Supreme 增强组件样式 ==================== */

/* ---------- 悬浮工具栏 ---------- */
.supreme-float-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #6b7280;
    background: rgba(255, 255, 255, 0.55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(156, 163, 175, 0.3);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.1);
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, opacity 0.22s ease;
}
.dark .supreme-float-btn {
    background: rgba(55, 65, 81, 0.55);
    color: #9ca3af;
    border-color: rgba(156, 163, 175, 0.25);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
.supreme-float-btn:hover { color: #3b82f6; }
.dark .supreme-float-btn:hover { color: #a5b4fc; }
.supreme-float-btn:active { transform: scale(0.94); }

.supreme-float {
    position: fixed;
    right: 1rem;
    z-index: 40;
}
.supreme-float--top {
    bottom: 65px;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
}
.supreme-float--top.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.supreme-float--toc {
    bottom: 115px;
    display: none;
}
.supreme-float--toc.is-ready { display: block; }
.supreme-float--toc.is-open .supreme-float-btn { transform: scale(0.94); color: #3b82f6; }
.dark .supreme-float--toc.is-open .supreme-float-btn { color: #a5b4fc; }

/* ---------- 文章目录面板 ---------- */
.supreme-float-panel {
    position: absolute;
    right: 0;
    bottom: 3rem;
    width: 16rem;
    max-width: calc(100vw - 2rem);
    max-height: 60vh;
    overflow-y: auto;
    padding: 0.5rem;
    border-radius: 0.875rem;
    background: rgba(255, 255, 255, 0.96);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(209, 213, 219, 0.6);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    transform-origin: bottom right;
    pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s ease;
    scrollbar-width: thin;
}
.dark .supreme-float-panel {
    background: rgba(31, 41, 55, 0.97);
    border-color: rgba(75, 85, 99, 0.7);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}
.supreme-float--toc.is-open .supreme-float-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.supreme-float-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.25rem 0.375rem 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid rgba(209, 213, 219, 0.6);
    margin-bottom: 0.375rem;
}
.dark .supreme-float-head { color: #e5e7eb; border-bottom-color: rgba(75, 85, 99, 0.7); }
.supreme-toc-close {
    background: none; border: none; cursor: pointer; color: #9ca3af; padding: 2px 6px; line-height: 1;
}
.supreme-toc-close:hover { color: #3b82f6; }
.supreme-toc-item {
    display: block;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.8125rem;
    color: #4b5563;
    text-decoration: none;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease;
}
.supreme-toc-item:hover { background: rgba(59, 130, 246, 0.08); color: #3b82f6; }
.dark .supreme-toc-item { color: #9ca3af; }
.dark .supreme-toc-item:hover { background: rgba(139, 92, 246, 0.15); color: #a5b4fc; }
.supreme-toc-item.lv1 { font-weight: 600; font-size: 0.875rem; }
.supreme-toc-item.lv2 { padding-left: 18px; }
.supreme-toc-item.lv3 { padding-left: 30px; font-size: 0.78125rem; }
.supreme-toc-item.lv4 { padding-left: 42px; font-size: 0.75rem; color: #6b7280; }
.supreme-toc-item.lv5 { padding-left: 54px; font-size: 0.6875rem; color: #6b7280; }
.supreme-toc-item.is-active { background: rgba(59, 130, 246, 0.12); color: #3b82f6; font-weight: 600; }
.dark .supreme-toc-item.is-active { background: rgba(139, 92, 246, 0.22); color: #c4b5fd; }

/* ---------- 外链离开提醒弹窗 ---------- */
.supreme-extlink-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.supreme-extlink-modal[hidden] { display: none; }
.supreme-extlink-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(3px);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.supreme-extlink-modal.is-open .supreme-extlink-mask { opacity: 1; }
.supreme-extlink__panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 24rem;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    opacity: 0;
    transform: translateY(12px) scale(0.97);
    transition: opacity 0.22s ease, transform 0.22s ease;
    outline: none;
}
.supreme-extlink-modal.is-open .supreme-extlink__panel { opacity: 1; transform: translateY(0) scale(1); }
.supreme-extlink__icon {
    width: 3rem; height: 3rem; margin: 0 auto 0.75rem;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.12);
}
.supreme-extlink__title { font-size: 1.125rem; font-weight: 700; color: #1f2937; margin-bottom: 0.5rem; }
.dark .supreme-extlink__title { color: #f3f4f6; }
.supreme-extlink__desc { font-size: 0.8125rem; color: #6b7280; margin-bottom: 0.75rem; }
.dark .supreme-extlink__desc { color: #9ca3af; }
.supreme-extlink__host {
    display: inline-flex; align-items: center;
    max-width: 100%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    padding: 0.4rem 0.75rem;
    border-radius: 0.5rem;
    background: rgba(156, 163, 175, 0.15);
    color: #374151;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}
.dark .supreme-extlink__host { color: #e5e7eb; }
.supreme-extlink__actions { display: flex; gap: 0.75rem; }
.supreme-extlink__btn {
    flex: 1;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}
.supreme-extlink__btn--ghost { background: rgba(156, 163, 175, 0.15); color: #4b5563; border: 1px solid transparent; }
.dark .supreme-extlink__btn--ghost { color: #d1d5db; }
.supreme-extlink__btn--ghost:hover { background: rgba(156, 163, 175, 0.28); }
.supreme-extlink__btn--primary {
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    color: #fff;
    border: none;
}
.supreme-extlink__btn--primary:hover { box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4); }

/* ---------- 文章阅读信息（时长/字数） ---------- */
.meta-extra { display: inline-flex; align-items: center; flex-wrap: wrap; }
.meta-extra .text { display: inline-flex; align-items: center; }
.meta-extra .line { color: #d1d5bb; }
.dark .meta-extra .line { color: #4b5563; }

/* ---------- 评论验证码 ---------- */
.captcha-row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
#captcha-img { flex-shrink: 0; }
#captcha-input { width: 120px; }
#captcha-refresh { white-space: nowrap; }

/* ---------- 瞬间 / 说说 时间线 ---------- */
.supreme-moments { position: relative; }
.supreme-moment-item {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-left: 3px solid #3b82f6;
}
.dark .supreme-moment-item { border-left-color: #6366f1; }
.supreme-moment-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
}
.supreme-moment-body img { border-radius: 0.5rem; margin: 0.5rem 0; }
.supreme-moment-body p { margin: 0.4rem 0; }
.supreme-moment-body a { color: #3b82f6; }
