*{
    margin: 0;
    padding: 0;
    text-decoration: none;
    list-style-type: none;
    box-sizing: border-box;
}

body{
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    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;
}

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);
}

/* ===== 两行导航 ===== */
.nav-main{
    height: 40px;
    background-color: #000000;
}
.nav-sub{
    height: 40px;
    background-color: #000000;
    border-top: 1px solid #333333;
    display: none;
}
.li{
    float: left;
    width: 100px;
    line-height: 40px;
    text-align: center;
}
.li a{
    color: #ffffff;
    display: block;
}
.li a:hover{
    background-color: #666666;
}
.li-right{
    float: right;
}
.tab-item{
    color: #ffffff;
    cursor: pointer;
}
.tab-item:hover{
    background-color: #666666;
}
.tab-item.active{
    background-color: #666666;
}
.sub-item{
    float: left;
    width: 100px;
    line-height: 40px;
    text-align: center;
    color: #ffffff;
    cursor: pointer;
}
.sub-item:hover{
    background-color: #666666;
}
.sub-item.active{
    background-color: #666666;
}

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;
}

/* ===== 账号板块（主页内）===== */
.profile{
    padding: 30px 50px;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 200px);
}
.profile-head{
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 30px;
}
.avatar-wrap{
    position: relative;
    width: 80px;
    height: 80px;
    cursor: pointer;
}
.avatar-wrap .avatar-img{
    width: 80px;
    height: 80px;
}
.avatar-hint{
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: rgba(0,0,0,0.55);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.15s;
    pointer-events: none;
}
.avatar-wrap:hover .avatar-hint{
    opacity: 1;
}
.nick-row{
    display: flex;
    align-items: center;
    gap: 10px;
}
#nickText{
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
}
#nickInput{
    width: 180px;
}
.btn-small{
    background-color: #000000;
    color: #ffffff;
    border: none;
    height: 30px;
    padding: 0 14px;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
}
.btn-small:hover{
    background-color: #666666;
}
.sig-line{
    height: 1px;
    background-color: #999999;
    margin: 40px -30px 20px -30px;
}
.sig-area{
    max-width: 560px;
    margin: 0;
    text-align: left;
}
.sig-label{
    font-size: 18px;
    font-weight: 700;
    color: #000000;
    margin-bottom: 8px;
}
.sig-text{
    font-size: 16px;
    color: #333333;
    min-height: 24px;
    word-break: break-word;
}
.sig-text.empty{
    color: #999999;
}
.sig-area textarea{
    width: 100%;
    height: 80px;
    padding: 8px 10px;
    border: 1px solid #cccccc;
    outline: none;
    resize: vertical;
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 10px;
}
.sig-btns{
    display: flex;
    gap: 10px;
    margin-top: 10px;
}
.pwd-area{
    max-width: 560px;
    margin-top: auto;
    padding-top: 30px;
}
.pwd-area #pwdFormWrap{
    margin-top: 10px;
    max-width: 300px;
}
.pwd-area #pwdFormWrap input{
    margin-bottom: 10px;
}
.msg{
    font-size: 13px;
    margin-top: 10px;
}

/* ===== 头像 ===== */
.avatar-img{
    display: inline-block;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    vertical-align: middle;
    background-color: #ffffff;
    border: 1px solid #333333;
    object-fit: cover;
}

/* ===== 表单容器（账号设置等）===== */
.board-container{
    max-width: 420px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 主页板块 ===== */
.page-title{
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 100px;
    text-align: center;
    padding: 30px 0 0 0;
    color: #1a1a1a;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.25);
    letter-spacing: 16px;
}
.contact-hint{
    font-family: 'Fredoka', sans-serif;
    font-weight: 700;
    font-size: 24px;
    text-align: center;
    padding: 40px 0;
    color: #1a1a1a;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    letter-spacing: 4px;
}
.section-title{
    text-align: center;
    font-size: 24px;
    padding: 20px 0 10px;
    color: #000000;
}

/* ===== 卡组排行榜 ===== */
.rank-list{
    padding: 0 20px 20px;
}
.rank-item{
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 20px;
    position: relative;
    text-decoration: none;
    color: inherit;
}
.rank-item:hover{
    background: rgba(0,0,0,0.04);
}
.rank-item::after{
    content: '';
    position: absolute;
    bottom: 0;
    left: 30px;
    right: 30px;
    height: 1px;
    background: #999;
}
.rank-num{
    font-size: 18px;
    font-weight: bold;
    color: #333;
    min-width: 60px;
}
.rank-img{
    width: 72px;
    height: 72px;
    background: #fff;
    border-radius: 8px;
    flex-shrink: 0;
    object-fit: cover;
}
.rank-name{
    font-size: 18px;
    color: #333;
    flex: 1;
}
.rank-feature{
    font-size: 14px;
    color: #666;
    text-align: right;
    flex-shrink: 0;
    margin-right: 180px;
}

/* ===== 卡组大全 / 卡片网格 ===== */
.deck-grid{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin: 0 40px;
}
.deck-card{
    display: block;
    background-color: #cccccc;
}
.deck-card img{
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    display: block;
}
.deck-card .card-name{
    background-color: #000000;
    color: #ffffff;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    padding: 12px 0;
}
.deck-card:hover img{
    opacity: 0.8;
}
.deck-card:hover .card-name{
    background-color: #333333;
}

/* ===== 文本板块（个人信息等）===== */
.deck-section{
    margin: 40px;
}
.deck-section h2{
    font-size: 24px;
    font-weight: 700;
    border-left: 4px solid #000000;
    padding-left: 10px;
    margin-bottom: 10px;
}
.deck-section p{
    font-size: 18px;
    font-weight: 600;
    color: #666666;
    line-height: 1.8;
    padding-left: 14px;
}

/* ===== 留言表单 ===== */
.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;
}

/* 按钮 */
.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;
}
.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;
}
.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;
}

/* ===== 留言列表 ===== */
.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;
}
.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 - 80px - 70px - 60px);
    overflow-y: auto;
}
.drafts-section{
    width: 330px;
    flex-shrink: 0;
    padding: 0;
    padding-left: 30px;
    margin-left: 20px;
    max-height: calc(100vh - 80px - 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 - 80px - 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;
}

/* ===== 草稿箱 ===== */
.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;
}
