/* moment-detail.css - 动态详情页面样式 */
/* 所有样式都使用 .moment-detail-page 前缀，避免与 chazuo.php 样式冲突 */

.moment-detail-page * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.moment-detail-page .moment-detail-container {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #fff;
}

.moment-detail-page .moment-header {
    height: 35px;
    background-color: #f8f8f8;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    padding: 0 25px;
    position: relative;
}

.moment-detail-page .back-button {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
    color: #333;
    font-size: 22px;
    transition: opacity 0.2s;
}

.moment-detail-page .back-button:hover {
    opacity: 0.7;
}

.moment-detail-page .moment-content-area {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    padding-bottom: 180px; /* 为底部输入栏和mini播放器留出空间 */
}

/* 底部空白区域 */
.moment-detail-page .bottom-spacer {
    height: 100px;
    width: 100%;
}

/* 底部固定输入栏 */
.moment-detail-page .bottom-input-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    padding: 7px 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    z-index: 1000;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
}

/* 未登录提示区域 */
.moment-detail-page .bottom-login-prompt {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    padding: 16px;
    text-align: center;
    z-index: 1000;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
}

.moment-detail-page .bottom-login-prompt a {
    display: block;
    color: #007aff;
    text-decoration: none;
    font-size: 15px;
    padding: 12px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.moment-detail-page .bottom-login-prompt a:hover {
    background-color: #f0f0f0;
}

.moment-detail-page .bottom-login-prompt a:active {
    background-color: #e0e0e0;
}

.moment-detail-page .bottom-input-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0; /* 允许flex子元素缩小 */
}

.moment-detail-page .bottom-input-compact {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
    background: #f5f5f5;
    cursor: pointer;
    height: 40px;
    line-height: 20px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.moment-detail-page .bottom-input-expanded {
    display: none;
    width: 100%;
    min-height: 60px;
    max-height: 120px;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    box-sizing: border-box;
    line-height: 1.5;
    overflow-y: auto;
}

.moment-detail-page .bottom-input-expanded.show {
    display: block;
}

.moment-detail-page .bottom-input-compact.hidden {
    display: none;
}

.moment-detail-page .bottom-input-toolbar {
    display: none;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding-top: 8px;
    justify-content: space-between;
    width: 100%;
}

.moment-detail-page .bottom-input-toolbar.show {
    display: flex;
}

.moment-detail-page .bottom-toolbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.moment-detail-page .bottom-toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.moment-detail-page .emoji-btn-bottom,
.moment-detail-page .image-btn-bottom {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.moment-detail-page .emoji-btn-bottom:hover,
.moment-detail-page .image-btn-bottom:hover {
    background: #f0f0f0;
    color: #0282ad;
}

.moment-detail-page .bottom-preview-image {
    position: relative;
    display: none;
    margin-top: 8px;
    margin-bottom: 8px;
    width: 100%;
}

.moment-detail-page .bottom-preview-image.show {
    display: block;
}

.moment-detail-page .bottom-preview-image img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    object-fit: cover;
}

.moment-detail-page .bottom-preview-image .remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.moment-detail-page .bottom-emoji-picker {
    position: absolute;
    bottom: 100px;
    left: 16px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 12px;
    display: none;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    max-width: 300px;
    z-index: 1001;
}

.moment-detail-page .bottom-emoji-picker.show {
    display: grid;
}

.moment-detail-page .bottom-emoji-item {
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    text-align: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.moment-detail-page .bottom-emoji-item:hover {
    background: #f0f0f0;
}

.moment-detail-page .bottom-char-count {
    font-size: 12px;
    color: #666;
    margin-left: 8px;
}

.moment-detail-page .bottom-char-count.warning {
    color: #ff6b6b;
}

.moment-detail-page .bottom-send-btn {
    background: linear-gradient(to right, #0282ad, #04a9e1);
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    height: 32px;
}

.moment-detail-page .bottom-send-btn:hover {
    opacity: 0.9;
}

.moment-detail-page .bottom-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.moment-detail-page .bottom-like-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    padding: 4px 8px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
}

.moment-detail-page .bottom-like-btn:hover {
    background: #f0f0f0;
}

.moment-detail-page .bottom-like-btn.liked {
    color: #ff6b6b;
}

.moment-detail-page .bottom-share-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    padding: 4px 8px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
}

.moment-detail-page .bottom-share-btn:hover {
    background: #f0f0f0;
}

/* 紧凑状态下的点赞按钮 */
.moment-detail-page .bottom-like-btn-compact {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.moment-detail-page .bottom-like-btn-compact:hover {
    background: #f0f0f0;
}

.moment-detail-page .bottom-like-btn-compact.liked {
    color: #ff6b6b;
}

.moment-detail-page .bottom-share-btn-compact {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.moment-detail-page .bottom-share-btn-compact:hover {
    background: #f0f0f0;
}

/* 分享功能模块 */
.moment-detail-page .share-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    border-radius: 16px 16px 0 0;
    padding: 20px 16px;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
    z-index: 2000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-height: 60vh;
    overflow-y: auto;
}

.moment-detail-page .share-panel.show {
    transform: translateY(0);
}

.moment-detail-page .share-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.moment-detail-page .share-panel-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.moment-detail-page .share-panel-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.moment-detail-page .share-panel-close:hover {
    background: #f0f0f0;
}

.moment-detail-page .share-options {
    display: flex;
    flex-direction: row;
    gap: 20px;
    flex-wrap: wrap;
}

.moment-detail-page .share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    min-width: 80px;
}

.moment-detail-page .share-option:hover {
    background: #f5f5f5;
    border-color: #e0e0e0;
}

/* 评论操作菜单 */
.moment-detail-page .comment-menu-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    position: absolute;
    top: 0;
    right: 0;
}

.moment-detail-page .comment-menu-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.moment-detail-page .comment-item {
    position: relative;
}

.moment-detail-page .comment-menu {
    position: absolute;
    top: 30px;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 120px;
    display: none;
}

.moment-detail-page .comment-menu.show {
    display: block;
}

.moment-detail-page .comment-menu-item {
    padding: 12px 16px;
    cursor: pointer;
    color: #333;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.moment-detail-page .comment-menu-item:last-child {
    border-bottom: none;
}

.moment-detail-page .comment-menu-item:hover {
    background: #f5f5f5;
}

.moment-detail-page .comment-menu-item.delete {
    color: #ff6b6b;
}

.moment-detail-page .comment-menu-item.delete:hover {
    background: #ffe0e0;
}

.moment-detail-page .comment-menu-item.block {
    color: #ff6b6b;
}

.moment-detail-page .comment-menu-item.block:hover {
    background: #ffe0e0;
}

.moment-detail-page .share-option-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
    flex-shrink: 0;
}

.moment-detail-page .share-option-icon.copy {
    background: linear-gradient(to right, #0282ad, #04a9e1);
}

.moment-detail-page .share-option-icon.delete {
    background: linear-gradient(to right, #ff6b6b, #ff8787);
}

.moment-detail-page .share-option-text {
    font-size: 13px;
    color: #333;
    text-align: center;
}

/* 提示气泡 */
.moment-detail-page .toast-notification {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    color: #333;
    padding: 12px 24px;
    border-radius: 24px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-size: 14px;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.moment-detail-page .toast-notification.show {
    opacity: 1;
}

/* 确认对话框 */
.moment-detail-page .confirm-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
}

.moment-detail-page .confirm-dialog-overlay.show {
    display: flex;
}

.moment-detail-page .confirm-dialog {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.moment-detail-page .confirm-dialog-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    text-align: center;
}

.moment-detail-page .confirm-dialog-message {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 24px;
    text-align: center;
}

.moment-detail-page .confirm-dialog-buttons {
    display: flex;
    gap: 12px;
}

.moment-detail-page .confirm-dialog-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.moment-detail-page .confirm-dialog-btn.cancel {
    background: #f5f5f5;
    color: #666;
}

.moment-detail-page .confirm-dialog-btn.cancel:hover {
    background: #e0e0e0;
}

.moment-detail-page .confirm-dialog-btn.confirm {
    background: linear-gradient(to right, #ff6b6b, #ff8787);
    color: #fff;
}

.moment-detail-page .confirm-dialog-btn.confirm:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.moment-detail-page .share-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    display: none;
}

.moment-detail-page .share-overlay.show {
    display: block;
}

.moment-detail-page .moment-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.moment-detail-page .moment-author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.moment-detail-page .moment-author-info {
    flex: 1;
}

.moment-detail-page .moment-author-name {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.moment-detail-page .moment-author-name a {
    color: #333;
    text-decoration: none;
}

.moment-detail-page .moment-publish-time {
    font-size: 14px;
    color: #999;
    margin-top: 2px;
}

.moment-detail-page .moment-text {
    font-size: 18px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 12px;
    word-wrap: break-word;
}

.moment-detail-page .moment-image {
    margin-bottom: 16px;
}

.moment-detail-page .moment-image img {
    max-width: 100%;
    border-radius: 8px;
}

.moment-detail-page .moment-tabs {
    display: flex;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 16px;
    position: relative;
}

.moment-detail-page .moment-tab {
    flex: 1;
    padding: 12px;
    text-align: center;
    background: none;
    border: none;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    position: relative;
}

.moment-detail-page .moment-tab.active {
    color: #0282ad;
    font-weight: 600;
}

.moment-detail-page .moment-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #0282ad;
}

.moment-detail-page .moment-tab span {
    margin-left: 4px;
    font-weight: normal;
    color: inherit;
}

.moment-detail-page .moment-tabs-wrapper {
    position: relative;
    overflow: hidden;
}

.moment-detail-page .moment-tabs-container {
    display: flex;
    transition: transform 0.3s ease;
    width: 200%;
}

.moment-detail-page .moment-tab-content {
    width: 50%;
    flex-shrink: 0;
}

.moment-detail-page .moment-tab-content.active {
    display: block;
}

.moment-detail-page .comments-list,
.moment-detail-page .likes-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.moment-detail-page .comment-item,
.moment-detail-page .like-item {
    display: flex;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.moment-detail-page .comment-item:last-child,
.moment-detail-page .like-item:last-child {
    border-bottom: none;
}

.moment-detail-page .comment-avatar,
.moment-detail-page .like-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
}

.moment-detail-page .comment-content,
.moment-detail-page .like-content {
    flex: 1;
}

.moment-detail-page .comment-username,
.moment-detail-page .like-username {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.moment-detail-page .comment-username a,
.moment-detail-page .like-username a {
    color: #333;
    text-decoration: none;
}

.moment-detail-page .user-level-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 0.75rem;
    background: #f5f9ff;
    color: #0282ad;
    border: 1px solid #e6f0ff;
    font-weight: 600;
}

.moment-detail-page .user-level-badge.vip-permanent {
    background: #333333;
    color: #fee5a2;
    border: 1px solid #333333;
}

.moment-detail-page .comment-text {
    font-size: 18px;
    color: #333;
    margin-bottom: 4px;
}

.moment-detail-page .comment-image {
    margin-top: 8px;
    margin-bottom: 4px;
}

.moment-detail-page .comment-image img {
    max-width: 200px;
    max-height: 100px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    transition: max-height 0.3s ease;
}

.moment-detail-page .comment-image img.expanded {
    max-height: 200px;
}

.moment-detail-page .comment-time,
.moment-detail-page .like-time {
    font-size: 14px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 8px;
}

.moment-detail-page .comment-reply-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
}

.moment-detail-page .comment-reply-btn:hover {
    color: #0282ad;
}

.moment-detail-page .comment-replies {
    margin-top: 8px;
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
}

.moment-detail-page .comment-reply-item {
    padding: 8px 0;
}

.moment-detail-page .comment-reply-item:not(:last-child) {
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 8px;
    padding-bottom: 8px;
}

.moment-detail-page .comment-reply-content {
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.moment-detail-page .comment-reply-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.moment-detail-page .comment-replies-footer {
    margin-top: 8px;
    padding-top: 8px;
    text-align: right;
    font-size: 12px;
    color: #666;
    cursor: pointer;
}

.moment-detail-page .comment-replies-footer:hover {
    color: #0282ad;
}

.moment-detail-page .comment-reply-input-container {
    margin-top: 8px;
    padding-left: 42px;
    display: none;
}

.moment-detail-page .comment-reply-input-container.show {
    display: block;
}

.moment-detail-page .comment-reply-input-wrapper {
    position: relative;
}

.moment-detail-page .comment-reply-placeholder {
    position: absolute;
    left: 12px;
    top: 10px;
    color: #999;
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}

.moment-detail-page .comment-reply-textarea {
    width: 100%;
    min-height: 60px;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    outline: none;
}

.moment-detail-page .comment-reply-textarea:focus {
    border-color: #0282ad;
}

.moment-detail-page .comment-reply-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px;
}

.moment-detail-page .comment-reply-send-btn {
    background: linear-gradient(to right, #0282ad, #04a9e1);
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.moment-detail-page .comment-reply-send-btn:hover {
    opacity: 0.9;
}

.moment-detail-page .comment-reply-cancel-btn {
    background: none;
    border: 1px solid #e0e0e0;
    color: #666;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
}

.moment-detail-page .comment-reply-cancel-btn:hover {
    background: #f5f5f5;
}

.moment-detail-page .empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

/* mini播放器上移9px */
.moment-detail-page .mini-player-container {
    bottom: 72px !important;
}

