/* ========== 邀请函留言板样式 ========== */

.message-board-container {
    margin-top: 30px;
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-board {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 250, 250, 0.95));
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 107, 97, 0.2);
    backdrop-filter: blur(10px);
}

.message-board-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255, 107, 97, 0.2);
}

.message-board-icon {
    font-size: 28px;
}

.message-board-header h3 {
    margin: 0;
    color: #ff6f61;
    font-size: 20px;
    flex: 1;
}

.message-count {
    background: #ff6f61;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* ========== 留言表单 ========== */

.message-form-wrapper {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    border: 1px dashed rgba(255, 107, 97, 0.3);
}

.message-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 13px;
    color: #666;
    font-weight: 600;
}

.form-input,
.form-textarea {
    padding: 12px 15px;
    border: 2px solid rgba(255, 107, 97, 0.3);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: #ff6f61;
    box-shadow: 0 0 0 3px rgba(255, 107, 97, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 80px;
}

.char-count {
    font-size: 12px;
    color: #999;
    text-align: right;
}

/* ========== 表情选择器 ========== */

.emoji-group {
    gap: 10px;
}

.emoji-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.emoji-item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(255, 107, 97, 0.1);
}

.emoji-item:hover {
    transform: scale(1.1);
    background: rgba(255, 107, 97, 0.2);
}

.emoji-item.selected {
    border-color: #ff6f61;
    background: rgba(255, 107, 97, 0.3);
    transform: scale(1.15);
}

/* ========== 提交按钮 ========== */

.submit-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #ff6f61, #ff8a80);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.submit-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(255, 107, 97, 0.3);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-icon {
    font-size: 16px;
}

.form-message {
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-size: 13px;
    min-height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-message.success {
    background: rgba(76, 175, 80, 0.1);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.form-message.error {
    background: rgba(244, 67, 54, 0.1);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.form-message.loading {
    color: #ff6f61;
}

/* ========== 留言列表 ========== */

.message-list-wrapper {
    margin-top: 25px;
}

.message-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 107, 97, 0.2);
}

.message-list-header h4 {
    margin: 0;
    color: #333;
    font-size: 16px;
}

.list-controls {
    display: flex;
    gap: 8px;
}

.refresh-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 107, 97, 0.1);
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.refresh-btn:hover {
    background: rgba(255, 107, 97, 0.2);
    transform: rotate(180deg);
}

.message-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 8px;
}

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

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

.message-list::-webkit-scrollbar-thumb {
    background: rgba(255, 107, 97, 0.3);
    border-radius: 3px;
}

.message-list::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 107, 97, 0.5);
}

.message-item {
    padding: 12px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    border-left: 3px solid #ff6f61;
    transition: all 0.3s ease;
}

.message-item:hover {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.message-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.message-emoji {
    font-size: 18px;
}

.message-nickname {
    font-weight: 600;
    color: #ff6f61;
    font-size: 14px;
}

.message-location {
    font-size: 12px;
    color: #666;
    background: rgba(255, 107, 97, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.message-time {
    font-size: 12px;
    color: #999;
}

.like-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(255, 107, 97, 0.1);
    border: 1px solid rgba(255, 107, 97, 0.3);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.like-btn:hover:not(:disabled) {
    background: rgba(255, 107, 97, 0.2);
    border-color: #ff6f61;
}

.like-btn.liked {
    background: rgba(255, 107, 97, 0.3);
    border-color: #ff6f61;
    color: #ff6f61;
}

.like-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.like-icon {
    font-size: 14px;
}

.like-count {
    font-weight: 600;
}

.message-content {
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

.loading,
.empty-state,
.error-state {
    text-align: center;
    padding: 30px 20px;
    color: #999;
}

.loading {
    font-size: 14px;
}

.empty-state,
.error-state {
    font-size: 13px;
}

/* ========== 分页 ========== */

.pagination {
    margin-top: 15px;
    display: flex;
    justify-content: center;
}

.pagination-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.page-btn {
    padding: 6px 12px;
    background: rgba(255, 107, 97, 0.1);
    border: 1px solid rgba(255, 107, 97, 0.3);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
}

.page-btn:hover {
    background: rgba(255, 107, 97, 0.2);
    border-color: #ff6f61;
}

.page-btn.active {
    background: #ff6f61;
    color: white;
    border-color: #ff6f61;
}

.page-ellipsis {
    padding: 6px 8px;
    color: #999;
}

/* ========== 弹幕板 ========== */

.barrage-board-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    pointer-events: none;
    background: transparent;
    margin: 0;
    padding: 0;
    border: none;
}

.barrage-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 998;
    pointer-events: none;
    background: transparent;
    padding: 0;
    margin: 0;
}

/* ========== 首页留言墙样式 ========== */

.message-wall-section {
    margin: 40px 0;
    padding: 30px 20px 50px 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 250, 250, 0.9));
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.message-wall-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
    text-align: center;
}

.section-icon {
    font-size: 32px;
}

.section-header h2 {
    margin: 0;
    color: #ff6f61;
    font-size: 28px;
}

.section-decoration {
    font-size: 24px;
    animation: float 3s ease-in-out infinite;
}

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

.message-wall-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

@media (max-width: 768px) {
    .message-wall-grid {
        grid-template-columns: 1fr;
    }
}

.message-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(255, 107, 97, 0.1);
    display: flex;
    gap: 15px;
}

.message-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(255, 107, 97, 0.15);
    border-color: rgba(255, 107, 97, 0.3);
}

.card-emoji {
    font-size: 32px;
    flex-shrink: 0;
}

.card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.card-nickname {
    font-weight: 600;
    color: #ff6f61;
    font-size: 14px;
}

.card-location {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
}

.card-text {
    color: #333;
    font-size: 13px;
    line-height: 1.5;
    flex: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #999;
}

.card-time {
    color: #bbb;
}

.card-like-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: rgba(255, 107, 97, 0.1);
    border: 1px solid rgba(255, 107, 97, 0.3);
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    color: #666;
    font-weight: 600;
}

.card-like-btn:hover:not(.liked) {
    background: rgba(255, 107, 97, 0.2);
    border-color: #ff6f61;
}

.card-like-btn.liked {
    background: rgba(255, 107, 97, 0.3);
    border-color: #ff6f61;
    color: #ff6f61;
}

.like-icon {
    font-size: 14px;
}

.like-count {
    font-weight: 600;
}

.loading-state,
.empty-state,
.error-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 107, 97, 0.2);
    border-top-color: #ff6f61;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.message-wall-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.view-all-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #ff6f61, #ff8a80);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-all-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(255, 107, 97, 0.3);
}

.arrow {
    transition: transform 0.3s ease;
}

.view-all-btn:hover .arrow {
    transform: translateX(4px);
}

/* ========== 首页弹幕样式 ========== */

.homepage-barrage-section {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 999;
    pointer-events: none;
    background: transparent;
    margin: 0;
    padding: 0;
    border: none;
}

.barrage-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 998;
    pointer-events: none;
    background: transparent;
    padding: 0;
    margin: 0;
}

.barrage-label {
    position: fixed;
    top: 170px;
    left: 20px;
    font-size: 13px;
    color: rgba(255, 107, 97, 0.6);
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 1000;
    pointer-events: none;
}

.homepage-barrage-container {
    position: fixed;
    top: 200px;
    left: 0;
    right: 0;
    width: 100%;
    height: 200px;
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin: 0;
    z-index: 998;
    pointer-events: none;
}

/* ========== 留言详情弹窗 ========== */

.message-detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.detail-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.detail-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.detail-emoji {
    font-size: 32px;
    flex-shrink: 0;
}

.detail-info {
    flex: 1;
}

.detail-nickname {
    font-weight: 600;
    color: #ff6f61;
    font-size: 16px;
}

.detail-time {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.detail-body {
    padding: 15px;
    background: rgba(255, 107, 97, 0.05);
    border-radius: 8px;
    border-left: 3px solid #ff6f61;
}

.detail-text {
    margin: 0;
    color: #333;
    font-size: 15px;
    line-height: 1.6;
    word-break: break-word;
}

.detail-footer {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.detail-like-btn,
.detail-share-btn {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid rgba(255, 107, 97, 0.3);
    background: rgba(255, 107, 97, 0.1);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.detail-like-btn:hover,
.detail-share-btn:hover {
    background: rgba(255, 107, 97, 0.2);
    border-color: #ff6f61;
}

.detail-like-btn.liked {
    background: rgba(255, 107, 97, 0.3);
    border-color: #ff6f61;
    color: #ff6f61;
}

/* ========== 响应式设计 ========== */

@media (max-width: 768px) {
    .message-board {
        padding: 12px;
        margin-top: 15px;
    }

    .message-board-header {
        gap: 8px;
        padding: 12px;
    }

    .message-board-icon {
        font-size: 24px;
    }

    .message-board-header h3 {
        font-size: 18px;
    }

    .message-count {
        font-size: 12px;
        padding: 4px 8px;
        min-width: 28px;
    }

    .message-form-wrapper {
        padding: 12px;
        margin-bottom: 15px;
    }

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

    .form-group label {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .form-group input,
    .form-group textarea {
        font-size: 13px;
        padding: 8px;
    }

    .form-group textarea {
        min-height: 80px;
    }

    .form-button {
        padding: 10px 20px;
        font-size: 13px;
    }

    .message-list {
        max-height: 300px;
    }

    .message-list-header {
        padding: 10px 0;
        gap: 10px;
    }

    .message-list-header h4 {
        font-size: 14px;
    }

    .sort-buttons {
        gap: 6px;
    }

    .sort-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .message-item {
        padding: 10px;
        margin-bottom: 8px;
    }

    .message-header {
        gap: 8px;
        margin-bottom: 8px;
    }

    .message-emoji {
        font-size: 16px;
    }

    .message-nickname {
        font-size: 13px;
    }

    .message-time {
        font-size: 11px;
    }

    .message-content {
        font-size: 12px;
        line-height: 1.5;
    }

    .section-header {
        flex-direction: column;
        gap: 10px;
    }

    .section-header h2 {
        font-size: 20px;
    }

    .message-wall-section {
        padding: 15px 10px 15px 10px;
        margin: 20px 0;
    }

    .message-wall-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .message-card {
        padding: 12px;
    }

    .message-card-header {
        gap: 8px;
        margin-bottom: 8px;
    }

    .message-card-emoji {
        font-size: 28px;
    }

    .message-card-name {
        font-size: 13px;
    }

    .message-card-content {
        font-size: 12px;
        line-height: 1.5;
        max-height: 60px;
    }

    .message-card-time {
        font-size: 11px;
    }

    .modal-content {
        padding: 15px;
    }

    .form-message {
        padding: 10px;
        font-size: 12px;
    }
}


/* 快速祝福按钮样式 */
.quick-blessing-btn {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 12px;
    background: rgba(255, 111, 97, 0.1);
    border: 1px solid rgba(255, 111, 97, 0.3);
    border-radius: 15px;
    color: #ff6f61;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quick-blessing-btn:hover {
    background: rgba(255, 111, 97, 0.2);
    border-color: rgba(255, 111, 97, 0.5);
    transform: scale(1.05);
}

.quick-blessing-btn:active {
    transform: scale(0.95);
}
