/* =========================
   留言板
========================= */

#message-section {

    max-width: 960px;

    margin:
        72px auto 0;

    padding: 0;
}

#message-section h2 {

    margin-bottom: 20px;

    font-size: 22px;

    color:
        #e8e8ee;
}

/* =========================
   输入区域
========================= */

.message-form {

    display: flex;

    flex-direction: column;

    gap: 12px;

    margin-bottom: 28px;

    padding: 20px;

    border-radius: 16px;

    background:
        rgba(18,21,32,0.5);

    border:
        1px solid rgba(255,255,255,0.06);
}

.message-form input,
.message-form textarea {

    width: 100%;

    padding: 14px;

    border: none;

    border-radius: 12px;

    background:
        rgba(25,27,40,0.72);

    border:
        1px solid rgba(255,255,255,0.05);

    color: white;

    resize: none;

    backdrop-filter:
        blur(10px);

    font-size: 14px;

    outline: none;

    transition:
        0.2s;

    box-sizing: border-box;
}

.message-form input:focus,
.message-form textarea:focus {

    border:
        1px solid rgba(216,154,199,0.35);

    box-shadow:
        0 0 12px rgba(216,154,199,0.08);
}

.message-form textarea {

    min-height: 90px;
}

.message-form button:disabled {

    opacity: 0.58;

    cursor: progress;
}

/* =========================
   输入框字数统计
========================= */

.textarea-wrap {

    position: relative;
}

.msg-counter {

    position: absolute;

    right: 14px;

    bottom: 12px;

    font-size: 12px;

    color: #8d93a6;

    pointer-events: none;

    user-select: none;

    transition: 0.2s;
}

.msg-counter.limit {

    color: #d89ac7;
}

/* =========================
   留言列表
========================= */

#message-board {

   column-count: 4;

    column-gap: 14px;

    min-height: 80px;

}

/* =========================
   留言卡片
========================= */
.message-card {

    display: inline-block;

    width: 100%;

    margin-bottom: 14px;

    break-inside: avoid;

    vertical-align: top;

    padding: 14px;

    border-radius: 12px;

    background:
        rgba(25,27,40,0.72);

    border:
        1px solid rgba(216,154,199,0.22);

    outline:
        1px solid rgba(255,255,255,0.03);

    backdrop-filter:
        blur(12px);

    box-shadow:
        0 0 18px rgba(139,127,209,0.12);

    box-sizing: border-box;

    position: relative;

    overflow: hidden;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

/* 顶部渐变线 */

.message-card::before {

    content: "";

    position: absolute;

    top: 0;

    left: 0;

    width: 100%;

    height: 2px;

    background:
        linear-gradient(
            90deg,
            #8b7fd1,
            #d89ac7,
            transparent
        );

    opacity: 0.75;
}

/* hover */

.message-card:hover {

    transform:
        translateY(-3px);

    background:
        rgba(35,38,55,0.92);

    border-color:
        rgba(216,154,199,0.28);

    box-shadow:
        0 0 24px rgba(139,127,209,0.18);
}
/* =========================
   留言彩蛋
========================= */
.corrupted {
 opacity: 0.68;

    background:
        rgba(18,20,28,0.45);

    border:
        1px solid rgba(255,255,255,0.04);

    box-shadow: none;

    filter:
        saturate(0.72);

    animation:
        flicker 7s infinite;
}
.corrupted .msg-name{
    color: #9a9fb3;
}
@keyframes flicker {
    0% {
        border-color:
            rgba(255,255,255,0.05);
    }
    50% {
        border-color:
            rgba(255,255,255,0.01);
    }
    100% {
        border-color:
            rgba(255,255,255,0.05);
    }
}
.corrupted:hover {

    transform: none;

    box-shadow: none;
}
/* =========================
   卡片顶部
========================= */

.msg-top {

    display: block !important;

    flex: none !important;

    margin-bottom: 10px;
}

.msg-name {

    display: block !important;

    margin-bottom: 4px;

    color:
        #d89ac7;

    font-size: 13px;

    font-weight: bold;
}

.msg-time {

    display: block !important;

    color:
        #8d93a6;

    font-size: 10px;
}

/* =========================
   留言内容
========================= */

.msg-content {

    display: block !important;

    margin-top: 8px;

    color:
        #d7dbea;

    line-height: 1.6;

    font-size: 12px;
}

/* 输入框字数统计 */

.msg-counter {

    text-align: right;

    margin-top: -4px;

    font-size: 12px;

    color: #8d93a6;

    padding-right: 6px;
}

.msg-counter.limit {

    color: #d89ac7;
}

/* =========================
   空留言
========================= */

.empty-message {

    width: 100%;

    padding: 20px;

    border-radius: 12px;

    background:
        rgba(25,27,40,0.72);

    border:
        1px solid rgba(255,255,255,0.05);

    text-align: center;

    color:
        #8d93a6;

    box-sizing: border-box;
}

/* =========================
   平板
========================= */

@media (max-width: 768px) {

    #message-section {

        padding: 0;
    }

    #message-board {

        column-count: 2;
    }

    .message-card {

        width: 100%;
    }

    #message-section h2 {

        font-size: 22px;
    }
}

@media (max-width: 480px) {

    #message-board {

        column-count: 1;
    }
}
/* 强制修复留言卡片 */

.msg-top {

    display: block !important;

    flex: none !important;

    height: auto !important;

    min-height: 0 !important;

    max-height: none !important;

    margin-bottom: 10px;
}

.msg-name {

    display: inline !important;

    color:
        #d89ac7;

    font-size: 13px;

    font-weight: bold;
}

.msg-time {

    float: right;

    color:
        #8d93a6;

    font-size: 10px;
}

.msg-content {

    clear: both;

    display: block;

    margin-top: 10px;

    line-height: 1.6;

    font-size: 12px;

    color:
        #d7dbea;
}
