/* 随时小记（front/admin share base） */

.memos-page {
    height: calc(100vh - 120px);
    min-height: 0;
    overflow: hidden;
    background: #020617;
}

.memos-stage {
    position: relative;
    height: 100%;
    overflow: hidden;
    background:
        radial-gradient(1000px 420px at 50% 50%, rgba(76, 29, 149, 0.22), transparent 65%),
        #020617;
}

.memos-stage.has-hero-bg {
    /* Match moments hero background layering */
    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;
}

.memos-mask {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(700px 260px at 50% 30%, rgba(59, 130, 246, 0.16), transparent 75%),
        linear-gradient(180deg, rgba(2, 6, 23, 0.36), rgba(2, 6, 23, 0.70));
    pointer-events: none;
}

.memos-layer {
    position: relative;
    width: 100%;
    height: 100%;
}

.memos-stage-head {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    width: min(760px, 94%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    pointer-events: none;
}

.memos-stage-title {
    pointer-events: none;
    color: #f8fafc;
    text-align: center;
}

.memos-stage-title .t1 {
    font-size: 28px;
    letter-spacing: 1px;
    font-weight: 900;
    text-shadow: 0 10px 26px rgba(2, 6, 23, 0.35);
}

.memos-stage-title .t2 {
    margin-top: 6px;
    font-size: 12px;
    color: rgba(248, 250, 252, 0.92);
    font-weight: 800;
}

.memos-stage-link {
    pointer-events: auto;
    white-space: nowrap;
}

.memos-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: rgba(226, 232, 240, 0.9);
    font-weight: 900;
}

.memos-bubble {
    position: absolute;
    width: min(320px, 90vw);
    transform: translate(-50%, -50%);
    text-decoration: none;
    color: #e2e8f0;
    z-index: 2;
    animation: memosFloat var(--float-dur, 18s) ease-in-out infinite;
    animation-delay: var(--float-delay, 0s);
    display: block;
}

.memos-bubble-body-only {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.memos-bubble:hover {
    z-index: 5;
}

.memos-bubble > div {
    pointer-events: none; /* anchor handles click */
}

.memos-bubble-inner {
    display: flex;
    gap: 14px;
    align-items: center;
}

.memos-bubble-cover {
    width: 90px;
    height: 90px;
    flex: 0 0 auto;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(2, 6, 23, 0.45);
}

.memos-bubble-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.memos-bubble-cover-empty {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    color: rgba(226, 232, 240, 0.55);
    font-weight: 900;
    font-size: 12px;
}

.memos-bubble-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.memos-bubble {
    border-radius: 14px;
    padding: 12px 12px;
    background: rgba(15, 23, 42, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px) saturate(160%);
    -webkit-backdrop-filter: blur(10px) saturate(160%);
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.memos-bubble-time {
    font-size: 11px;
    font-weight: 900;
    color: rgba(226, 232, 240, 0.78);
    margin-bottom: 6px;
}

.memos-bubble-title {
    font-size: 14px;
    font-weight: 1000;
    color: rgba(248, 250, 252, 0.96);
    line-height: 1.35;
    word-break: break-word;
}

.memos-bubble-author {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 800;
    color: rgba(147, 197, 253, 0.92);
}

.memos-bubble-action {
    margin-top: 10px;
    display: flex;
    justify-content: flex-end;
}

.memos-bubble-btn {
    pointer-events: none;
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    font-weight: 1000;
    font-size: 12px;
}

@keyframes memosFloat {
    0% { transform: translate(-50%, -50%) translate3d(0, 0, 0); }
    25% { transform: translate(-50%, -50%) translate3d(0, calc(var(--float-dy, 8px) * -1), 0); }
    50% { transform: translate(-50%, -50%) translate3d(0, calc(var(--float-dy, 8px) * 0.55), 0); }
    75% { transform: translate(-50%, -50%) translate3d(0, calc(var(--float-dy, 8px) * -0.4), 0); }
    100% { transform: translate(-50%, -50%) translate3d(0, 0, 0); }
}

.memos-wrap {
    width: min(760px, 94%);
    margin: 0 auto;
    padding: 0 0 52px;
    position: relative;
    top: -52px;
}

.memos-tag-list {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 12px;
}

.memos-tag {
    display: block;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 14px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.memos-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

.memos-tag-time {
    font-size: 12px;
    color: #64748b;
    font-weight: 700;
}

.memos-tag-title {
    margin-top: 10px;
    font-size: 16px;
    line-height: 1.35;
    font-weight: 900;
    color: #1e293b;
    letter-spacing: 0.2px;
}

.memos-tag-author {
    margin-top: 8px;
    font-size: 12px;
    color: #476185;
    font-weight: 800;
}

.memos-chapter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
}

.memos-slider {
    margin-top: 14px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    position: relative;
}

.memos-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.24);
    color: #1e293b;
    width: 36px;
    height: 36px;
    cursor: pointer;
}

.memos-slider-btn.prev {
    left: 10px;
}

.memos-slider-btn.next {
    right: 10px;
}

.memos-slide {
    display: none;
}

.memos-slide.is-active {
    display: block;
}

.memos-slide a {
    text-decoration: none;
    color: inherit;
}

.memos-slide-title {
    font-size: 18px;
    font-weight: 950;
    color: #1e293b;
    line-height: 1.35;
}

.memos-slide-time {
    margin-top: 10px;
    font-size: 12px;
    color: #64748b;
    font-weight: 800;
}

/* ===== 第二章：左右切换卡片样式（并支持鼠标右键切换）===== */
.memos-chapters-wrap {
    position: relative;
    width: 100%;
    height: calc(100% - 60px);
    min-height: 520px;
    display: grid;
    place-items: center;
    padding-top: 72px;
}

.memos-chapters-cards {
    position: relative;
    width: min(680px, 94%);
    height: 360px;
}

.memos-chapter-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(520px, 92vw);
    text-decoration: none;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(15, 23, 42, 0.56);
    color: #f8fafc;
    backdrop-filter: blur(14px) saturate(170%);
    -webkit-backdrop-filter: blur(14px) saturate(170%);
    box-shadow: 0 24px 48px rgba(2, 6, 23, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.16);
    padding: 18px 18px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.25s ease, filter 0.25s ease;
}

.memos-chapter-card.is-active {
    opacity: 1;
    pointer-events: auto !important;
    transform: translate(-50%, -50%) scale(1);
    filter: none;
    z-index: 2;
}

.memos-chapter-card.is-prev,
.memos-chapter-card.is-next {
    opacity: 0.6;
    pointer-events: none;
}

.memos-chapter-card.is-prev {
    transform: translate(-50%, -50%) translateX(-160px) scale(0.92);
    z-index: 1;
}

.memos-chapter-card.is-next {
    transform: translate(-50%, -50%) translateX(160px) scale(0.92);
    z-index: 1;
}

.memos-chapter-card.is-rest {
    opacity: 0;
    pointer-events: none;
}

.memos-chapter-card-title {
    text-align: center;
    font-weight: 1000;
    font-size: 20px;
    line-height: 1.35;
    word-break: break-word;
}

.memos-chapter-card-time {
    margin-top: 12px;
    font-size: 12px;
    font-weight: 900;
    color: rgba(148, 163, 184, 0.95);
}

.memos-chapters-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(148, 163, 184, 0.24);
    color: #e2e8f0;
    cursor: pointer;
    pointer-events: auto;
    z-index: 10;
}

.memos-chapters-cards {
    position: relative;
    z-index: 2;
}

.memos-chapters-nav.prev {
    left: calc(50% - min(340px, 47vw) - 18px);
}

.memos-chapters-nav.next {
    right: calc(50% - min(340px, 47vw) - 18px);
}

.memos-chapters-dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 4;
}

.memos-chapters-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: rgba(226, 232, 240, 0.36);
}

.memos-chapters-dots .dot.is-active {
    background: rgba(37, 99, 235, 0.95);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.memos-chapters-wrap.is-style-b .memos-chapter-card {
    background: rgba(255, 255, 255, 0.90);
    color: #0f172a;
    border-color: rgba(2, 6, 23, 0.16);
    box-shadow: 0 24px 50px rgba(2, 6, 23, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.memos-chapters-wrap.is-style-b .memos-chapter-card-time {
    color: rgba(100, 116, 139, 0.95);
}

.memos-chapters-wrap.is-style-b .memos-chapter-card.is-prev {
    transform: translate(-50%, -50%) translateX(-140px) scale(0.88) rotate(-1deg);
}

.memos-chapters-wrap.is-style-b .memos-chapter-card.is-next {
    transform: translate(-50%, -50%) translateX(140px) scale(0.88) rotate(1deg);
}

.memos-chapter-card-inner {
    display: flex;
    gap: 16px;
    align-items: center;
}

.memos-chapter-cover {
    width: 90px;
    height: 90px;
    flex: 0 0 auto;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(2, 6, 23, 0.45);
}

.memos-chapter-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.memos-chapter-cover-empty {
    width: 100%;
    height: 100%;
    display: block;
}

.memos-chapter-card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.memos-chapter-card-action {
    margin-top: 12px;
    display: flex;
    justify-content: center;
}

.memos-chapter-card-btn {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    font-weight: 1000;
    font-size: 12px;
}

.memos-detail-cover-wrap {
    width: 100%;
    margin-bottom: 14px;
}

.memos-detail-cover {
    width: 100%;
    height: auto;
    max-height: 340px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

/* Make code blocks render even if wangeditor doesn't output md-code wrapper */
.memos-content pre {
    margin: 14px 0;
    padding: 42px 16px 14px;
    border-radius: 12px;
    border: 1px solid #cbd5e1;
    background: #0f172a;
    overflow: hidden;
    position: relative;
}

.memos-content pre code {
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    color: #e2e8f0;
    line-height: 1.7;
    white-space: pre;
}

.memos-content pre code[data-lang]::before {
    content: attr(data-lang);
    position: absolute;
    top: 14px;
    left: 16px;
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
    border: 1px solid rgba(226, 232, 240, 0.18);
    color: rgba(226, 232, 240, 0.95);
    font-weight: 1000;
    font-size: 12px;
    letter-spacing: 0.2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.memos-detail-card {
    margin-top: 14px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 18px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.memos-detail-title {
    margin: 0;
    font-size: 26px;
    font-weight: 1000;
    color: #0f172a;
    letter-spacing: 0.2px;
}

.memos-meta {
    margin-top: 10px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 800;
}

.memos-content {
    margin-top: 16px;
    color: #0f172a;
    line-height: 1.8;
    letter-spacing: 0.2px;
}

.memos-content img {
    width: min(100%, 640px);
    height: auto;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    margin-top: 8px;
}

