*{
    margin: 0;
    padding: 0;
    text-decoration: none;
    list-style-type: none;
    box-sizing: border-box;
}
body{
    background-color: #dedede;
    background-image:
        linear-gradient(45deg, rgba(0,0,0,0.35) 2px, transparent 2px),
        linear-gradient(135deg, rgba(0,0,0,0.35) 2px, transparent 2px);
    background-size: 20px 20px;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.05);
}

header{
    background-color: #dedede;
    background-image:
        linear-gradient(45deg, rgba(0,0,0,0.35) 2px, transparent 2px),
        linear-gradient(135deg, rgba(0,0,0,0.35) 2px, transparent 2px);
    background-size: 20px 20px;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.05);
}
header nav{
    height: 40px;
    background-color: #000000;
}

.navul{
    position: relative;
    z-index: 999;
}
.navul a{
    color: #ffffff;
}
.navul a:hover{
    background-color: #666666;
    display: block;
}
.li{
    float: left;
    width: 100px;
    line-height: 40px;
    text-align: center;
}
.li-right{
    float: right;
}

.dropul{
    position: absolute;
}
.dropli{
    background-color: #000000;
    width: 100px;
    line-height: 40px;
}

.dropdown{
    position: relative;
}
.drop-trigger{
    color: #ffffff;
    cursor: pointer;
    display: block;
}
.drop-trigger:hover{
    background-color: #666666;
}
.dropdown .dropul{
    display: none;
}
.dropdown:hover .dropul{
    display: block;
}

body{
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main{
    flex: 1;
    background-color: #dedede;
    background-image:
        linear-gradient(45deg, rgba(0,0,0,0.35) 2px, transparent 2px),
        linear-gradient(135deg, rgba(0,0,0,0.35) 2px, transparent 2px);
    background-size: 20px 20px;
    box-shadow: inset 0 0 50px rgba(0,0,0,0.05);
    padding: 30px 0;
}

footer{
    height: 70px;
    background-color: #000000;
}
footer p{
    color: #ffffff;
    text-align: center;
    line-height: 70px;
}

/* 留言板容器 */
.board-container{
    max-width: 420px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 表单区域 */
.form-section{
    background-color: #ffffff;
    border: 2px solid #000000;
    padding: 25px;
    margin-bottom: 30px;
}
.form-section h2{
    font-size: 18px;
    margin-bottom: 15px;
    color: #000000;
    border-bottom: 2px solid #000000;
    padding-bottom: 10px;
}

.form-row{
    margin-bottom: 15px;
}
.form-row:last-child{
    margin-bottom: 0;
}

input[type="text"],
input[type="password"]{
    width: 100%;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    border: 1px solid #cccccc;
    outline: none;
}
input[type="text"]:focus,
input[type="password"]:focus{
    border-color: #000000;
}

#content{
    width: 100%;
    height: 300px;
    padding: 12px;
    font-size: 14px;
    border: 1px solid #cccccc;
    outline: none;
    resize: vertical;
    font-family: inherit;
}
#content:focus{
    border-color: #000000;
}

.form-actions{
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* 按钮统一风格：仿 nav 按钮 */
.btn-submit{
    background-color: #000000;
    color: #ffffff;
    border: none;
    height: 40px;
    padding: 0 20px;
    font-size: 14px;
    cursor: pointer;
    line-height: 40px;
    text-align: center;
    font-family: inherit;
}
.btn-submit:hover{
    background-color: #666666;
}

.btn-upload{
    background-color: #000000;
    color: #ffffff;
    height: 40px;
    padding: 0 20px;
    font-size: 14px;
    cursor: pointer;
    line-height: 40px;
    text-align: center;
    display: inline-block;
}
.btn-upload:hover{
    background-color: #666666;
}
.btn-upload input[type="file"]{
    display: none;
}

.file-name{
    color: #666666;
    font-size: 13px;
}

/* 留言列表 */
.messages-section h2{
    font-size: 18px;
    margin-bottom: 15px;
    color: #000000;
}

.message-card{
    background-color: #ffffff;
    border: 2px solid #000000;
    padding: 20px;
    margin-bottom: 15px;
    position: relative;
}

.message-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.message-user{
    font-weight: bold;
    font-size: 15px;
    color: #000000;
}
.message-time{
    font-size: 12px;
    color: #999999;
}

.message-body{
    font-size: 14px;
    line-height: 1.7;
    color: #333333;
    word-break: break-word;
}

.message-image{
    margin-top: 12px;
    max-width: 100%;
}
.message-image img{
    max-width: 100%;
    max-height: 400px;
    display: block;
}

/* 删除按钮仿 nav 风格 */
.btn-delete{
    background-color: #000000;
    color: #ffffff;
    border: none;
    height: 32px;
    padding: 0 14px;
    font-size: 12px;
    cursor: pointer;
    line-height: 32px;
    text-align: center;
    font-family: inherit;
}
.btn-delete:hover{
    background-color: #666666;
}

/* 点赞按钮 */
.btn-like{
    background: none;
    border: 1px solid #cccccc;
    height: 32px;
    padding: 0 14px;
    font-size: 13px;
    cursor: pointer;
    line-height: 30px;
    text-align: center;
    font-family: inherit;
    color: #666666;
    margin-right: 8px;
}
.btn-like:hover{
    border-color: #e74c3c;
    color: #e74c3c;
}
.btn-like.liked{
    border-color: #e74c3c;
    color: #e74c3c;
}
.like-count-only{
    font-size: 13px;
    color: #e74c3c;
    margin-right: 8px;
}

.message-footer{
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* 双栏布局（留言页 & 留言大厅） */
.write-container,
.hall-container{
    display: flex;
    align-items: flex-start;
    gap: 0;
    padding: 0 20px;
    min-height: 0;
}
.write-container .form-section,
.hall-container .messages-section{
    flex: 1;
    margin-right: 20px;
    margin-bottom: 0;
    padding-right: 30px;
    border-right: 2px solid #000000;
    max-height: calc(100vh - 40px - 70px - 60px);
    overflow-y: auto;
}

/* 右侧栏通用 */
.drafts-section{
    width: 330px;
    flex-shrink: 0;
    padding: 0;
    padding-left: 30px;
    margin-left: 20px;
    max-height: calc(100vh - 40px - 70px - 60px);
    overflow-y: auto;
}
.my-messages-section{
    width: 330px;
    flex-shrink: 0;
    background-color: #ffffff;
    border: 2px solid #000000;
    padding: 25px;
    padding-left: 30px;
    margin-left: 20px;
    max-height: calc(100vh - 40px - 70px - 60px);
    overflow-y: auto;
}
.drafts-section h2,
.my-messages-section h2{
    font-size: 18px;
    margin-bottom: 15px;
    color: #000000;
    border-bottom: 2px solid #000000;
    padding-bottom: 10px;
}
.my-messages-section .message-card{
    border-width: 1px;
    padding: 12px;
    margin-bottom: 10px;
}
.my-messages-section .message-body{
    font-size: 13px;
    max-height: 80px;
    overflow: hidden;
}

.btn-draft{
    background-color: #666666;
    color: #ffffff;
    border: none;
    height: 40px;
    padding: 0 20px;
    font-size: 14px;
    cursor: pointer;
    line-height: 40px;
    text-align: center;
    font-family: inherit;
}
.btn-draft:hover{
    background-color: #444444;
}

.draft-card{
    background-color: #ffffff;
    border: 2px solid #000000;
    padding: 12px;
    margin-bottom: 10px;
}
.draft-content{
    font-size: 13px;
    color: #333333;
    line-height: 1.5;
    margin-bottom: 8px;
    max-height: 80px;
    overflow: hidden;
    word-break: break-word;
}
.draft-image{
    margin-bottom: 8px;
}
.draft-image img{
    max-width: 100%;
    max-height: 80px;
    display: block;
}
.draft-time{
    font-size: 11px;
    color: #999999;
    margin-bottom: 8px;
}
.draft-actions{
    display: flex;
    gap: 8px;
}
.btn-draft-restore{
    background-color: #000000;
    color: #ffffff;
    border: none;
    height: 28px;
    padding: 0 12px;
    font-size: 12px;
    cursor: pointer;
    line-height: 28px;
    text-align: center;
    font-family: inherit;
}
.btn-draft-restore:hover{
    background-color: #666666;
}
.btn-draft-publish{
    background-color: #000000;
    color: #ffffff;
    border: none;
    height: 28px;
    padding: 0 12px;
    font-size: 12px;
    cursor: pointer;
    line-height: 28px;
    text-align: center;
    font-family: inherit;
}
.btn-draft-publish:hover{
    background-color: #666666;
}
.btn-draft-delete{
    background: none;
    border: 1px solid #cccccc;
    color: #999999;
    height: 28px;
    padding: 0 12px;
    font-size: 12px;
    cursor: pointer;
    line-height: 26px;
    text-align: center;
    font-family: inherit;
}
.btn-draft-delete:hover{
    border-color: #e74c3c;
    color: #e74c3c;
}

/* 空状态 */
.empty-msg{
    text-align: center;
    color: #999999;
    padding: 40px 0;
    font-size: 14px;
}
