.message-board-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    max-width: 800px;
    height: 80%;
    max-height: 600px;
    background: var(--card-bg, #fff);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    z-index: 10000;
    overflow: hidden;
    animation: board-pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid var(--accent-color, #ff69b4);
}

@keyframes board-pop {
    0% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

.board-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: var(--header-bg, #edf2f6);
    color: var(--header-text, #2f5c9f);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    flex-shrink: 0;
}

.board-title {
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 1.2em;
}

.board-icon {
    width: 24px;
    height: 24px;
    margin-right: 10px;
}

.board-close {
    font-size: 28px;
    cursor: pointer;
    transition: transform 0.2s;
}

.board-close:hover {
    transform: rotate(90deg);
}

.board-tabs {
    display: flex;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.board-tab {
    padding: 12px 20px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s;
    font-weight: 500;
    color: #777;
}

.board-tab:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--active-color, #2196F3);
}

.board-tab.active {
    color: var(--active-color, #2196F3);
    background: white;
}

.board-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--active-color, #2196F3);
}

.board-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    background: var(--card-bg, #ffffff);
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.board-tab-content {
    display: none;
    padding: 20px;
    height: 100%;
    overflow-y: auto;
    box-sizing: border-box;
    flex: 1;
    visibility: hidden;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: -1;
}

.board-tab-content.active {
    display: flex;
    flex-direction: column;
    visibility: visible;
    position: relative;
    z-index: 1;
}

#viewContent {
    display: none;
    flex-direction: column;
}

#viewContent.active {
    display: flex;
}

.message-filter {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
    flex-wrap: wrap;
    flex-shrink: 0;
    justify-content: space-between;
}

.message-input, .message-textarea {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
    flex: 1;
    min-width: 100px;
}

.message-input:focus, .message-textarea:focus {
    border-color: var(--active-color, #2196F3);
    outline: none;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.2);
}

.message-textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.message-btn {
    padding: 8px 16px;
    background: var(--active-color, #2196F3);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.message-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.message-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.message-nav-btn {
    background: #f0f0f0;
    color: #555;
}

.message-nav-btn:hover {
    background: #e0e0e0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.message-display {
    background: var(--content-bg, #f5f5f5);
    border-radius: 10px;
    padding: 20px;
    min-height: 150px;
    position: relative;
    border: 1px solid #eee;
    overflow-y: auto;
    flex: 1;
}

.message-loading {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.loading-bubble {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0 4px;
    border-radius: 50%;
    background: var(--active-color, #2196F3);
    animation: bounce 0.6s infinite alternate;
}

.loading-bubble:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-bubble:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-10px);
    }
}

.message-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: #888;
    text-align: center;
}

.empty-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
    opacity: 0.6;
}

.message-content {
    display: none;
}

.message-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1px dashed #ddd;
    padding-bottom: 8px;
}

.message-info h3 {
    margin: 0;
    color: #333;
}

.message-info span {
    font-size: 0.8em;
    color: #999;
}

.message-body {
    line-height: 1.6;
    white-space: pre-wrap;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.char-counter {
    text-align: right;
    font-size: 0.8em;
    color: #999;
    margin-top: 4px;
}

.form-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.submit-btn {
    background: var(--active-color, #2196F3);
}

.reset-btn {
    background: #999;
}

/* 可爱风格增强 */
.message-board-panel::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: var(--header-bg, #edf2f6);
    transform: rotate(45deg);
    z-index: -1;
}

.message-display {
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.05);
}

.message-btn {
    font-size: 14px;
    letter-spacing: 0.5px;
}

/* 气泡效果 */
.message-body {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.message-body::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid white;
}

/* 浮动装饰元素 */
.board-content::before {
    content: '';
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%232196F3" opacity="0.2"><path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z"/></svg>');
    z-index: 0;
    pointer-events: none;
    opacity: 0.2;
}

/* 动画增强 */
@keyframes float {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
    100% {
        transform: translateY(0);
    }
}

.message-placeholder .empty-icon {
    animation: float 3s ease-in-out infinite;
}

/* 留言列表样式 */
.messages-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.message-item {
    margin-bottom: 15px;
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-left: 4px solid var(--active-color, #2196F3);
    transition: transform 0.2s;
}

.message-item:hover {
    transform: translateX(4px);
}

.message-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    border-bottom: 1px dashed #eee;
    padding-bottom: 8px;
}

.message-author {
    display: flex;
    align-items: center;
}

.author-name {
    font-weight: bold;
    color: var(--active-color, #2196F3);
    font-size: 1.1em;
}

.message-meta {
    font-size: 0.8em;
    color: #999;
}

.message-title {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 1.1em;
}

.message-body {
    line-height: 1.6;
    color: #555;
    white-space: pre-wrap;
    word-break: break-word;
}

/* 吐司提示 */
.toast-message {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 10001;
    animation: toast-in 0.3s, toast-out 0.3s 2.7s;
    opacity: 0;
    pointer-events: none;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes toast-out {
    from {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -20px);
    }
}

.board-tab-content::-webkit-scrollbar {
    width: 8px;
}

.board-tab-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.board-tab-content::-webkit-scrollbar-thumb {
    background: var(--active-color, #2196F3);
    opacity: 0.7;
    border-radius: 4px;
}

.board-tab-content::-webkit-scrollbar-thumb:hover {
    opacity: 1;
}

.message-display::-webkit-scrollbar {
    width: 6px;
}

.message-display::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 3px;
}

.message-display::-webkit-scrollbar-thumb {
    background: var(--active-color, #2196F3);
    opacity: 0.6;
    border-radius: 3px;
}

.message-display::-webkit-scrollbar-thumb:hover {
    opacity: 0.9;
}

.message-count {
    color: #777;
    font-size: 14px;
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding: 10px 0;
    flex-shrink: 0;
    border-top: 1px solid #eee;
}

.pagination-btn {
    padding: 6px 12px;
    background: var(--active-color, #2196F3);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.pagination-btn:hover:not(:disabled) {
    opacity: 0.9;
    transform: translateY(-2px);
}

.pagination-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 14px;
    color: #777;
}
