/* ========== 留言板页 ========== */
.message-page-main {
    background-color: #fff;
    /* 同搜索页：背景上移铺满导航栏背后，消除白缝；内容盒推回 y=90 与首页对齐 */
    margin-top: -90px;
    padding-top: 90px;
}

.message-page-container {
    max-width: 900px;
    padding-bottom: 60px;
}

.message-form-card,
.message-list-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 24px;
    margin-bottom: 24px;
}

/* 留言表单 */
.message-textarea {
    width: 100%;
    margin-top: 4px;
    border: 1.5px solid #eee;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 14px;
    color: #333;
    line-height: 1.6;
    resize: vertical;
    outline: none;
    background-color: #fafafa;
    font-family: inherit;
    transition: all 0.25s ease;
}

.message-textarea:focus {
    border-color: #ffcc80;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.12);
}

.message-textarea::placeholder {
    color: #aaa;
}

.message-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
}

.message-tip {
    font-size: 12px;
    color: #999;
}

.message-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 42px;
    padding: 0 28px;
    background: linear-gradient(135deg, #ff9800, #e65100);
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.message-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.35);
}

/* 留言数量 */
.message-count {
    margin-left: auto;
    font-size: 13px;
    color: #999;
}

/* 留言列表 */
.message-list {
    display: flex;
    flex-direction: column;
}

.message-item {
    display: flex;
    gap: 14px;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
}

.message-item:last-child {
    border-bottom: none;
    padding-bottom: 4px;
}

.message-avatar {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #fff8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff9800;
}

.message-body {
    flex: 1;
    min-width: 0;
}

.message-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}

.message-name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.message-time {
    font-size: 12px;
    color: #999;
    margin-left: auto;
}

.message-content {
    font-size: 14px;
    color: #444;
    line-height: 1.7;
    word-break: break-word;
    white-space: pre-wrap;
}

/* 管理员回复 */
.message-reply {
    margin-top: 12px;
    padding: 12px 16px;
    background-color: #f8f9fa;
    border-left: 3px solid #ff9800;
    border-radius: 0 8px 8px 0;
}

.message-reply-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.message-reply-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    color: #ff9800;
    background-color: #fff8f0;
    padding: 3px 10px;
    border-radius: 4px;
}

.message-reply-time {
    font-size: 12px;
    color: #999;
}

.message-reply-content {
    font-size: 13px;
    color: #555;
    line-height: 1.7;
    word-break: break-word;
    white-space: pre-wrap;
}

/* 空状态 */
.message-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 56px 20px;
}

.message-empty-icon {
    width: 72px;
    height: 72px;
    margin-bottom: 20px;
    background-color: #fff8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-empty-title {
    font-size: 17px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.message-empty-desc {
    font-size: 14px;
    color: #999;
}

/* 移动端响应式 */
@media (max-width: 768px) {
    .message-page-main {
        margin-top: -102px;   /* 移动端 body padding-top 为 102px */
        padding-top: 102px;
    }

    .message-page-container {
        padding-bottom: 40px;
    }

    .message-form-card,
    .message-list-card {
        padding: 16px;
        border-radius: 10px;
        margin-bottom: 16px;
    }

    .message-item {
        gap: 10px;
        padding: 16px 0;
    }

    .message-avatar {
        width: 38px;
        height: 38px;
    }

    .message-head {
        gap: 8px;
    }

    .message-time {
        margin-left: 0;
        order: 3;
        width: 100%;
    }

    .message-submit-btn {
        height: 40px;
        padding: 0 22px;
        font-size: 14px;
    }
}

/* ========== 提示消息 ========== */
.message-alert {
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 14px;
}

.message-alert-error {
    color: #d32f2f;
    background-color: #fff2f0;
    border: 1px solid #ffccc7;
}

.message-alert-success {
    color: #2e7d32;
    background-color: #f1f8e9;
    border: 1px solid #c5e1a5;
}

/* ========== 验证码 ========== */
.message-captcha-row {
    margin-top: 14px;
}

.message-captcha-field {
    display: flex;
    align-items: center;
    gap: 12px;
}

.message-captcha-input {
    flex: 1;
    min-width: 0;
    height: 42px;
    padding: 0 14px;
    border: 1.5px solid #eee;
    border-radius: 10px;
    font-size: 15px;
    color: #333;
    background-color: #fafafa;
    outline: none;
    letter-spacing: 3px;
    transition: all 0.25s ease;
}

.message-captcha-input:focus {
    border-color: #ffcc80;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.12);
}

.message-captcha-input::placeholder {
    color: #aaa;
    letter-spacing: normal;
    font-size: 14px;
}

.message-captcha-img {
    width: 120px;
    height: 42px;
    flex-shrink: 0;
    border: 1px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    object-fit: cover;
}

.message-captcha-tip {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #999;
}

@media (max-width: 768px) {
    .message-captcha-img {
        width: 104px;
        height: 40px;
    }

    .message-captcha-input {
        height: 40px;
    }
}
