/* ==========================================================================
   校园回声 · 独立页面（克制版）
   --------------------------------------------------------------------------
   设计主线：首屏只引导「写」这一件事；去掉漂浮词、噪点、旋转卡片等
   装饰，用留白、字号对比与单一光晕建立视觉层次。
   ========================================================================== */

html {
    scroll-behavior: smooth;
    scroll-padding-top: 76px;
}

/* 站点 style.css 可能把 body / main 设为 flex，本页需要正常块级布局 */
.wall-body,
.wall-body main {
    display: block !important;
}

.wall-body {
    --w-primary: #2db48a;
    --w-primary-2: #0ea5e9;
    --w-teacher: #3b82f6;
    --w-student: #f59e0b;
    --w-note-teacher: #eaf4ff;
    --w-note-student: #fff7e6;
    --w-page: #f4f7f9;
    --w-panel: #ffffff;
    --w-panel-2: #fbfdfe;
    --w-text: #16202c;
    --w-muted: #67788d;
    --w-border: rgba(16, 32, 48, .1);
    --w-shadow: 0 18px 48px rgba(15, 23, 42, .1);

    margin: 0;
    background: var(--w-page);
    color: var(--w-text);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

[data-mode="dark"] .wall-body {
    --w-page: #0d1420;
    --w-panel: #131c2b;
    --w-panel-2: #101825;
    --w-note-teacher: #142b4a;
    --w-note-student: #3a2a12;
    --w-text: #e6edf5;
    --w-muted: #97a5b8;
    --w-border: rgba(148, 163, 184, .2);
    --w-shadow: 0 18px 48px rgba(0, 0, 0, .35);
}

/* ---------------- 极简顶栏 ---------------- */
.wall-topbar {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 60;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(16px, 4vw, 40px);
    color: rgba(255, 255, 255, .94);
    transition: background .3s ease, color .3s ease, box-shadow .3s ease, border-color .3s ease;
    border-bottom: 1px solid transparent;
}

.wall-topbar.scrolled {
    background: color-mix(in srgb, var(--w-panel) 86%, transparent);
    color: var(--w-text);
    border-bottom-color: var(--w-border);
    box-shadow: 0 6px 22px rgba(15, 23, 42, .05);
    backdrop-filter: saturate(160%) blur(12px);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
}

.wall-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: .02em;
}

.wall-brand em {
    font-style: normal;
    font-weight: 500;
    font-size: 12px;
    opacity: .7;
    margin-left: 8px;
    padding-left: 10px;
    border-left: 1px solid currentColor;
}

.wall-topbar-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.wall-top-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 13px;
    color: inherit;
    text-decoration: none;
    opacity: .9;
    transition: background .2s ease, opacity .2s ease;
}

.wall-top-link:hover {
    opacity: 1;
    background: rgba(255, 255, 255, .12);
}

.wall-topbar.scrolled .wall-top-link:hover {
    background: color-mix(in srgb, var(--w-primary) 10%, transparent);
    color: var(--w-primary);
}

.wall-mode-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 13px;
    font-family: inherit;
    font-weight: 400;
    cursor: pointer;
    opacity: .9;
    transition: background .2s ease, opacity .2s ease;
}

.wall-mode-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, .12);
}

.wall-topbar.scrolled .wall-mode-btn:hover {
    background: color-mix(in srgb, var(--w-primary) 10%, transparent);
    color: var(--w-primary);
}

/* ---------------- HERO：只引导写这一件事 ---------------- */
.wall-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 104px clamp(16px, 4vw, 32px) 54px;
    text-align: center;
    background: #0b1220;
    color: #fff;
    overflow: hidden;
    isolation: isolate;
}

.wall-hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(110% 110% at 50% 30%, rgba(45, 180, 138, .18), transparent 55%),
        radial-gradient(90% 90% at 80% 10%, rgba(59, 130, 246, .12), transparent 50%),
        linear-gradient(180deg, #0b1220 0%, #0e192a 100%);
}

.wall-glow {
    position: absolute;
    top: 10%;
    left: 50%;
    width: 520px;
    height: 520px;
    transform: translateX(-50%);
    border-radius: 50%;
    background: var(--w-primary);
    filter: blur(110px);
    opacity: .14;
    animation: wall-glow-pulse 10s ease-in-out infinite alternate;
}

@keyframes wall-glow-pulse {
    from { opacity: .12; transform: translateX(-50%) scale(1); }
    to { opacity: .18; transform: translateX(-50%) scale(1.08); }
}

.wall-hero-inner {
    position: relative;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
}

.wall-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    padding: 5px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .2);
    background: rgba(255, 255, 255, .06);
    font-size: 12.5px;
    letter-spacing: .06em;
    color: rgba(255, 255, 255, .84);
}

.wall-hero-title {
    margin: 0 0 16px;
    font-size: clamp(40px, 7vw, 76px);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.02em;
}

.wall-hero-title em {
    font-style: normal;
    background: linear-gradient(100deg, #7ce6c1, var(--w-primary-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.wall-hero-sub {
    max-width: 32em;
    margin: 0 auto 34px;
    font-size: clamp(15px, 1.6vw, 18px);
    line-height: 1.8;
    color: rgba(255, 255, 255, .7);
}

/* ---------------- 投稿卡：绝对主角 ---------------- */
.wall-post {
    margin: 0 auto;
    padding: 26px 28px 22px;
    border-radius: 18px;
    background: var(--w-panel);
    color: var(--w-text);
    text-align: left;
    box-shadow: 0 28px 70px rgba(0, 0, 0, .35);
    border: 1px solid var(--w-border);
}

.wall-post-head {
    margin-bottom: 18px;
}

.wall-post-title {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 700;
}

.wall-post-hint {
    font-size: 11.5px;
    color: var(--w-muted);
}

/* 身份选择 */
.wall-post-role {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.wall-role-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--w-border);
    background: transparent;
    color: var(--w-text);
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease, transform .18s ease;
}

.wall-role-btn i {
    font-size: 18px;
    color: var(--w-muted);
    transition: color .2s ease;
}

.wall-role-btn .wall-role-main {
    font-size: 14px;
    font-weight: 600;
}

.wall-role-btn .wall-role-sub {
    display: block;
    font-size: 11px;
    color: var(--w-muted);
}

.wall-role-btn:hover {
    transform: translateY(-2px);
}

.wall-role-btn.on {
    border-color: var(--w-primary);
    background: color-mix(in srgb, var(--w-primary) 10%, transparent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--w-primary) 14%, transparent);
}

.wall-role-btn.on i { color: var(--w-primary); }

.wall-role-btn.on .wall-role-main {
    color: var(--w-text);
}

/* 分类 */
.wall-post-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.wall-cat-btn {
    padding: 5px 13px;
    border-radius: 999px;
    border: 1px solid var(--w-border);
    background: transparent;
    color: var(--w-muted);
    font-size: 12px;
    cursor: pointer;
    transition: all .18s ease;
}

.wall-cat-btn:hover {
    color: var(--w-primary);
    border-color: var(--w-primary);
}

.wall-cat-btn.on {
    background: var(--w-primary);
    border-color: var(--w-primary);
    color: #fff;
    font-weight: 600;
}

/* 输入区 */
.wall-post-editor {
    border: 1px solid var(--w-border);
    border-radius: 12px;
    background: var(--w-page);
    overflow: hidden;
}

.wall-textarea {
    display: block;
    width: 100%;
    min-height: 130px;
    padding: 14px 16px;
    border: 0;
    outline: none;
    resize: vertical;
    background: transparent;
    color: var(--w-text);
    font-size: 14px;
    line-height: 1.85;
}

.wall-textarea::placeholder {
    color: var(--w-muted);
    opacity: .8;
}

.wall-post-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-top: 1px dashed var(--w-border);
    background: rgba(127, 127, 127, .03);
}

.wall-counter {
    font-size: 12px;
    color: var(--w-muted);
    font-variant-numeric: tabular-nums;
}

.wall-submit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 24px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(100deg, var(--w-primary), #4fc79f);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
    box-shadow: 0 10px 24px rgba(45, 180, 138, .32);
}

.wall-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(45, 180, 138, .4);
}

.wall-submit:disabled {
    opacity: .55;
    cursor: not-allowed;
    transform: none;
}

.wall-post-tip {
    min-height: 18px;
    margin: 12px 0 0;
    font-size: 12.5px;
    color: var(--w-muted);
}

.wall-post-tip.ok { color: var(--w-primary); font-weight: 700; }
.wall-post-tip.err { color: #e2483c; font-weight: 700; }

/* 统计 */
.wall-stats {
    margin-top: 28px;
    font-size: 13px;
    color: rgba(255, 255, 255, .55);
}

.wall-stats b {
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    margin-right: 3px;
    font-variant-numeric: tabular-nums;
}

.wall-stats .teacher b { color: #8dc0ff; }
.wall-stats .student b { color: #ffc773; }

.wall-stats-dot {
    margin: 0 8px;
}

/* ---------------- 通用区块 ---------------- */
.wall-cloud-box,
.wall-list-box {
    max-width: 1100px;
    margin: 0 auto;
    padding: clamp(56px, 8vw, 96px) clamp(16px, 4vw, 32px) 0;
}

.wall-sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.wall-sec-title {
    margin: 0;
    font-size: clamp(19px, 2.2vw, 24px);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 9px;
}

.wall-sec-title i {
    color: var(--w-primary);
}

.wall-cloud-tabs,
.wall-list-tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    background: var(--w-panel);
    border: 1px solid var(--w-border);
}

.wall-cloud-tab,
.wall-list-tab {
    padding: 5px 16px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--w-muted);
    font-size: 13px;
    cursor: pointer;
    transition: all .18s ease;
}

.wall-cloud-tab:hover,
.wall-list-tab:hover {
    color: var(--w-text);
}

.wall-cloud-tab.active,
.wall-list-tab.active {
    background: var(--w-primary);
    color: #fff;
    font-weight: 600;
}

/* ---------------- 词云 ---------------- */
.wall-cloud {
    position: relative;
    height: 240px;
    padding: 20px;
    border-radius: 18px;
    background: var(--w-panel);
    border: 1px solid var(--w-border);
    box-shadow: var(--w-shadow);
    overflow: hidden;
    text-align: center;
}

.wall-cloud canvas {
    display: block;
    width: 100% !important;
    height: auto !important;
    max-width: 100%;
}

.wall-cloud-empty {
    font-size: 14px;
    color: var(--w-muted);
    padding: 80px 0;
}

/* ---------------- 列表 ---------------- */
.wall-list-lead {
    margin: -6px 0 22px;
    font-size: 13.5px;
    color: var(--w-muted);
}

.wall-list-note {
    margin: 4px 0 0;
    font-size: 12.5px;
    color: var(--w-muted);
    text-align: center;
    opacity: .85;
}

.wall-list {
    columns: 3;
    column-gap: 16px;
    /* 胶带 absolute top:-10px，需要顶部空间，否则第一行会被列容器裁剪；
       底部也要留足空间，避免最后一行旋转后的胶带露出列表外 */
    padding-top: 6px;
    padding-bottom: 16px;
}

.wall-item {
    position: relative;
    break-inside: avoid;
    margin: 10px 0 18px;
    padding: 22px 18px 14px;
    border-radius: 2px 18px 2px 18px;
    background: var(--w-panel);
    border: 1px solid var(--w-border);
    box-shadow: 0 3px 0 rgba(15, 23, 42, .04),
                0 10px 22px rgba(15, 23, 42, .08);
    transition: transform .25s ease, box-shadow .25s ease;
    transform: rotate(var(--w-rotate, 0deg));
}

.wall-item.teacher { background: var(--w-note-teacher); }
.wall-item.student { background: var(--w-note-student); }

.wall-item:hover {
    transform: rotate(0deg) translateY(-4px);
    box-shadow: 0 2px 0 rgba(15, 23, 42, .04),
                0 18px 40px rgba(15, 23, 42, .13);
    z-index: 2;
}

/* 胶带：相对定位，既保留文档流占位（避免 CSS columns 把绝对定位子元素错误掉落），
   又通过 top 偏移让胶带一半露出便签顶部，保持水平不随 item 旋转 */
.wall-tape {
    display: block;
    position: relative;
    top: -10px;
    width: 64px;
    height: 22px;
    margin: 0 auto;
    border-radius: 2px;
    background: rgba(255, 255, 255, .45);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
    opacity: .85;
    transform: rotate(calc(var(--w-rotate, 0deg) * -1));
}

.wall-item.teacher .wall-tape { background: rgba(59, 130, 246, .18); }
.wall-item.student .wall-tape { background: rgba(245, 158, 11, .18); }

.wall-item-text {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.85;
    color: var(--w-text);
    word-break: break-word;
}

.wall-item-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11.5px;
    color: var(--w-muted);
}

.wall-item-role {
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 600;
    color: #fff;
    background: var(--w-muted);
}

.wall-item-role.teacher { background: var(--w-teacher); }
.wall-item-role.student { background: var(--w-student); }

.wall-item-cat {
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid var(--w-border);
}

.wall-item-time {
    margin-left: auto;
    opacity: .75;
}

/* 空状态也做成墙上一张便签 */
.wall-list-empty {
    column-span: all;
    width: min(420px, 92vw);
    margin: 8px auto 0;
    padding: 34px 26px;
    border-radius: 2px 18px 2px 18px;
    background: var(--w-note-student);
    border: 1px solid var(--w-border);
    box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
    text-align: center;
    font-size: 14px;
    color: var(--w-muted);
    position: relative;
}

.wall-list-empty::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 64px;
    height: 22px;
    border-radius: 2px;
    background: rgba(245, 158, 11, .18);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}

.wall-item-empty {
    width: min(420px, 92vw);
    margin: 8px auto 0;
    padding: 34px 26px;
    border-radius: 2px 18px 2px 18px;
    background: var(--w-note-student);
    border: 1px solid var(--w-border);
    box-shadow: 0 10px 22px rgba(15, 23, 42, .08);
    text-align: center;
    font-size: 14px;
    color: var(--w-muted);
    position: relative;
}

.wall-item-empty .wall-tape {
    background: rgba(245, 158, 11, .18);
}

.wall-more-box {
    display: flex;
    justify-content: center;
    padding: 8px 0 clamp(56px, 8vw, 96px);
}

.wall-more {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 42px;
    padding: 0 28px;
    border-radius: 999px;
    border: 1px solid var(--w-border);
    background: var(--w-panel);
    color: var(--w-muted);
    font-size: 14px;
    cursor: pointer;
    transition: all .2s ease;
}

.wall-more:hover {
    color: var(--w-primary);
    border-color: var(--w-primary);
    transform: translateY(-2px);
}

/* ---------------- 页脚 ---------------- */
.wall-foot {
    border-top: 1px solid var(--w-border);
    background: var(--w-panel-2);
}

.wall-foot-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 26px clamp(16px, 4vw, 32px) 34px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 20px;
    font-size: 12px;
    color: var(--w-muted);
}

.wall-foot-brand {
    font-weight: 700;
    color: var(--w-text);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.wall-foot-links {
    display: inline-flex;
    align-items: center;
    gap: 16px;
}

.wall-foot-links a {
    color: var(--w-muted);
    text-decoration: none;
    transition: color .2s ease;
}

.wall-foot-links a:hover {
    color: var(--w-primary);
}

/* ---------------- Toast ---------------- */
.wall-toast {
    position: fixed;
    left: 50%;
    bottom: 42px;
    transform: translate(-50%, 16px);
    z-index: 100004;
    max-width: 86vw;
    padding: 11px 24px;
    border-radius: 999px;
    background: rgba(15, 23, 42, .93);
    color: #fff;
    font-size: 13px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .3);
    opacity: 0;
    visibility: hidden;
    transition: opacity .26s ease, transform .26s ease, visibility .26s;
}

.wall-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

/* ---------------- 滚动淡入 ---------------- */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .55s ease, transform .55s ease;
}

.reveal.in {
    opacity: 1;
    transform: none;
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 960px) {
    .wall-list {
        columns: 2;
    }
}

@media (max-width: 680px) {
    .wall-topbar {
        height: 58px;
        padding: 0 14px;
    }

    .wall-brand em {
        display: none;
    }

    .wall-top-link {
        padding: 0 10px;
    }

    .wall-top-link span {
        display: none;
    }

    .wall-hero {
        min-height: auto;
        padding: 92px 16px 48px;
    }

    .wall-post {
        padding: 20px 18px 18px;
    }

    .wall-role-btn {
        padding: 10px;
        flex-direction: column;
        text-align: center;
        gap: 4px;
    }

    .wall-role-btn i {
        font-size: 20px;
    }

    .wall-role-main {
        font-size: 13px;
    }

    .wall-role-sub {
        display: none;
    }

    .wall-stats {
        font-size: 12px;
    }

    .wall-stats b {
        font-size: 16px;
    }

    .wall-cloud {
        height: 200px;
        padding: 12px;
    }

    .wall-list {
        columns: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wall-glow {
        animation: none !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
