/* ======================== 留言板 ======================== */

.board-page .app-main {
    gap: 1rem;
}

.board-intro {
    padding: 1.5rem;
}

.board-intro .page-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.board-intro .page-title .icon {
    color: #e67e22;
}

.board-flash {
    margin: 0.2rem 0 1rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.88rem;
    line-height: 1.6;
}

.board-flash-success {
    color: #1e7e34;
    background: #e8f7ec;
    border: 1px solid #b9e6c5;
}

.board-flash-error {
    color: #c0392b;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.board-compose {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-top: 0.6rem;
}

.board-compose-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #fde6d2;
    background: #fde6d2;
}

.board-compose-main {
    flex: 1;
    min-width: 0;
}

.board-compose textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 90px;
    padding: 0.8rem 0.95rem;
    border: 1.5px solid #f0e6dc;
    border-radius: 12px;
    background: #fdfaf7;
    color: #5a4a42;
    font-family: inherit;
    font-size: 0.94rem;
    line-height: 1.7;
    resize: vertical;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.board-compose textarea:focus {
    outline: none;
    border-color: #e67e22;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.12);
}

.board-compose-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-top: 0.55rem;
}

.board-compose-foot > span {
    color: #a99a92;
    font-size: 0.78rem;
}

.board-compose-foot .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1.1rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

.board-compose-foot .btn .icon {
    width: 16px;
    height: 16px;
}

.board-login-tip {
    margin-top: 0.9rem;
    padding: 1rem;
    border-radius: 12px;
    background: #fdf7f1;
    border: 1px dashed #f0d8c2;
    text-align: center;
}

.board-login-tip p {
    margin: 0 0 0.7rem;
    color: #8a7a72;
    font-size: 0.88rem;
}

.board-login-tip .btn {
    margin: 0 0.25rem;
}

.board-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.board-message {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(240, 230, 220, 0.9);
    border-radius: 16px;
    padding: 1.2rem 1.3rem;
    box-shadow: 0 2px 12px rgba(90, 74, 66, 0.05);
}

.board-message:target {
    border-color: rgba(230, 126, 34, 0.55);
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.1);
}

.board-message-head {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.board-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #fde6d2;
    background: #fde6d2;
}

.board-meta {
    min-width: 0;
}

.board-author {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    color: #5a4a42;
    font-size: 0.92rem;
    font-weight: 600;
}

.board-author-title {
    padding: 0.05rem 0.45rem;
    border-radius: 20px;
    background: #fff3e6;
    color: #d35400;
    font-size: 0.7rem;
    font-weight: 500;
}

.board-time {
    display: block;
    margin-top: 0.15rem;
    color: #a99a92;
    font-size: 0.76rem;
}

.board-content {
    margin: 0.8rem 0 0.9rem;
    color: #4a3c35;
    font-size: 0.94rem;
    line-height: 1.8;
    word-break: break-word;
}

.board-actions {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    padding-top: 0.65rem;
    border-top: 1px solid #f5ede6;
}

.board-action {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0;
    border: none;
    background: transparent;
    color: #9a8a82;
    font-family: inherit;
    font-size: 0.82rem;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s ease;
}

.board-action .icon {
    width: 16px;
    height: 16px;
}

.board-action:hover,
.board-action.liked {
    color: #e67e22;
}

.board-like.liked .icon {
    fill: rgba(230, 126, 34, 0.18);
}

.board-comments {
    display: none;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px dashed #f0e6dc;
}

.board-comments.open {
    display: block;
}

.board-no-comments,
.board-login-comment {
    margin: 0.1rem 0 0.5rem;
    color: #b0a29a;
    font-size: 0.82rem;
}

.board-login-comment a {
    color: #e67e22;
}

.board-comment {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.45rem 0;
}

.board-comment-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 1.5px solid #fde6d2;
    background: #fde6d2;
}

.board-comment-main {
    flex: 1;
    min-width: 0;
}

.board-comment-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.15rem;
}

.board-comment-head span {
    color: #6b5b53;
    font-size: 0.8rem;
    font-weight: 600;
}

.board-comment-head time {
    color: #b3a59d;
    font-size: 0.72rem;
}

.board-comment-content {
    color: #5a4a42;
    font-size: 0.86rem;
    line-height: 1.7;
    word-break: break-word;
}

.board-comment-form {
    display: flex;
    gap: 0.55rem;
    margin-top: 0.55rem;
}

.board-comment-form input[type="text"] {
    flex: 1;
    min-width: 0;
    padding: 0.55rem 0.8rem;
    border: 1.5px solid #f0e6dc;
    border-radius: 10px;
    background: #fdfaf7;
    color: #5a4a42;
    font-family: inherit;
    font-size: 0.86rem;
}

.board-comment-form input[type="text"]:focus {
    outline: none;
    border-color: #e67e22;
    background: #fff;
}

.board-comment-form .btn {
    flex-shrink: 0;
    padding: 0.45rem 0.9rem;
    border: none;
    border-radius: 10px;
    background: #e67e22;
    color: #fff;
    font-family: inherit;
    font-size: 0.82rem;
    cursor: pointer;
}

.board-empty {
    padding: 2rem;
    text-align: center;
    color: #a99a92;
}

.board-pagination {
    margin-top: 0.4rem;
}

/* 举报弹窗 */
.board-modal-mask {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.5);
}

.board-modal-mask.show {
    display: flex;
}

.board-modal {
    width: min(440px, 100%);
    max-height: min(90vh, 640px);
    overflow: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.board-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.25rem 0.8rem;
    border-bottom: 1px solid #f5ede6;
}

.board-modal-head h3 {
    margin: 0;
    color: #5a4a42;
    font-size: 1.05rem;
}

.board-modal-close {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: #faf7f4;
    color: #8a7a72;
    font-size: 1.2rem;
    cursor: pointer;
}

.board-modal-body {
    padding: 1rem 1.25rem;
}

.board-report-tip {
    margin: 0 0 0.8rem;
    color: #8a7a72;
    font-size: 0.84rem;
}

.board-form-group {
    margin-bottom: 0.85rem;
}

.board-form-group label {
    display: block;
    margin-bottom: 0.35rem;
    color: #6b5b53;
    font-size: 0.84rem;
}

.board-form-group select,
.board-form-group textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 0.6rem 0.75rem;
    border: 1.5px solid #f0e6dc;
    border-radius: 10px;
    background: #fdfaf7;
    color: #5a4a42;
    font-family: inherit;
    font-size: 0.86rem;
    resize: vertical;
}

.board-form-group select:focus,
.board-form-group textarea:focus {
    outline: none;
    border-color: #e67e22;
    background: #fff;
}

.board-modal-foot {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
    padding: 0.9rem 1.25rem 1.1rem;
    border-top: 1px solid #f5ede6;
}

.board-modal-foot .btn {
    padding: 0.5rem 1rem;
    border-radius: 9px;
    border: none;
    font-size: 0.86rem;
    cursor: pointer;
}

.board-modal-foot .btn-secondary {
    background: #faf7f4;
    color: #8a7a72;
}

.board-modal-foot .btn-primary {
    background: linear-gradient(135deg, #e67e22, #d35400);
    color: #fff;
}

/* 深色模式 */
body.dark-mode .board-message,
body.dark-mode .board-modal {
    background: #242424;
    border-color: #333;
    box-shadow: none;
}

body.dark-mode .board-content,
body.dark-mode .board-comment-content {
    color: #ddd;
}

body.dark-mode .board-actions {
    border-top-color: #333;
}

body.dark-mode .board-comments {
    border-top-color: #333;
}

body.dark-mode .board-compose textarea,
body.dark-mode .board-comment-form input[type="text"],
body.dark-mode .board-form-group select,
body.dark-mode .board-form-group textarea {
    background: #1d1d1d;
    border-color: #3a3a3a;
    color: #eee;
}

body.dark-mode .board-login-tip {
    background: #242424;
    border-color: #3a3a3a;
}

body.dark-mode .board-modal-head,
body.dark-mode .board-modal-foot {
    border-color: #333;
}

body.dark-mode .board-modal-head h3 {
    color: #eee;
}

body.dark-mode .board-comment-head span {
    color: #ccc;
}

/* 手机端 */
@media (max-width: 900px) {
    .board-intro {
        padding: 1.15rem;
    }

    .board-compose {
        gap: 0.6rem;
    }

    .board-compose-avatar {
        width: 38px;
        height: 38px;
    }

    .board-message {
        padding: 1rem;
        border-radius: 14px;
    }

    .board-actions {
        gap: 0.9rem;
    }

    .board-action {
        font-size: 0.8rem;
    }

    .board-comment-form {
        gap: 0.4rem;
    }

    .board-comment-form .btn {
        padding: 0.45rem 0.7rem;
    }
}
.board-delete-form {
    display: inline;
    margin: 0;
    padding: 0;
}

.board-delete-btn {
    color: #c0392b;
}

.board-delete-btn:hover {
    color: #e74c3c;
}

/* 留言图片 */
.board-image-input {
    display: none;
}

.board-compose-tools {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.board-image-pick {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    background: #fdf7f1;
    color: #d35400;
    font-size: 0.78rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.board-image-pick:hover {
    background: #fde6d2;
}

.board-image-pick .icon {
    width: 15px;
    height: 15px;
}

.board-compose-tools > span {
    color: #a99a92;
    font-size: 0.76rem;
}

.board-image-hint {
    color: #b3a59d !important;
    font-size: 0.72rem !important;
}

.board-image-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 0.55rem;
}

.board-image-preview img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 9px;
    border: 1px solid #f0e6dc;
    background: #f5f0eb;
}

.board-images {
    display: grid;
    gap: 6px;
    margin: 0 0 0.9rem;
}

.board-images-1 {
    grid-template-columns: 1fr;
    max-width: 460px;
}

.board-images-2 {
    grid-template-columns: repeat(2, 1fr);
    max-width: 520px;
}

.board-images-3 {
    grid-template-columns: repeat(3, 1fr);
    max-width: 660px;
}

.board-images a {
    display: block;
    overflow: hidden;
    border-radius: 10px;
    background: #f5f0eb;
}

.board-images img {
    display: block;
    width: 100%;
    height: 170px;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.board-images-1 img {
    height: auto;
    max-height: 380px;
    object-fit: contain;
}

.board-images a:hover img {
    transform: scale(1.02);
}

body.dark-mode .board-image-preview img,
body.dark-mode .board-images a {
    background: #1d1d1d;
    border-color: #333;
}

body.dark-mode .board-image-pick {
    background: #2a1d10;
    color: #f5b041;
}

/* 删除留言确认弹窗 */
.board-confirm {
    width: min(400px, 100%);
    padding: 1.5rem 1.4rem 1.3rem;
    border-radius: 18px;
    background: #fff;
    text-align: center;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
}

.board-confirm-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 0.8rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fde8e8;
    color: #c0392b;
}

.board-confirm-icon .icon {
    width: 26px;
    height: 26px;
}

.board-confirm-title {
    margin: 0 0 0.45rem;
    color: #5a4a42;
    font-size: 1.08rem;
}

.board-confirm-text {
    margin: 0;
    color: #8a7a72;
    font-size: 0.86rem;
    line-height: 1.75;
}

.board-confirm-actions {
    display: flex;
    justify-content: center;
    gap: 0.7rem;
    margin-top: 1.2rem;
}

.board-confirm-actions .btn {
    min-width: 104px;
    padding: 0.55rem 1rem;
    border: none;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.86rem;
    cursor: pointer;
}

.board-confirm-actions .btn-secondary {
    background: #f5f1ed;
    color: #6b5b53;
}

.board-confirm-actions .btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: #fff;
}

body.dark-mode .board-confirm {
    background: #242424;
}

body.dark-mode .board-confirm-title {
    color: #eee;
}

body.dark-mode .board-confirm-text {
    color: #aaa;
}

body.dark-mode .board-confirm-icon {
    background: #3a1a1a;
    color: #f87171;
}

.board-author a,
.board-comment-head a {
    color: inherit;
    text-decoration: none;
}

.board-author a:hover,
.board-comment-head a:hover {
    color: #e67e22;
}
