/* 帖子详情页样式（由 page/post.php 引入，原内联 style 合并而来） */
    .reply-editor-container .ql-toolbar,
    [class*="reply-editor-"] .ql-toolbar {
        border-radius: 8px 8px 0 0;
        border-color: #ddd !important;
        background: #f8f9fa;
    }
    .reply-editor-container .ql-container,
    [class*="reply-editor-"] .ql-container {
        border-radius: 0 0 8px 8px;
        border-color: #ddd !important;
    }
    .reply-editor-container .ql-editor {
        min-height: 150px;
    }
    .reply-editor-sub .ql-editor {
        min-height: 80px;
    }
    .reply-editor-sub {
        height: auto !important;
    }
    .reply-editor-sub .ql-container {
        height: auto;
    }
    .ql-snow .ql-picker.ql-font .ql-picker-label::before,
    .ql-snow .ql-picker.ql-font .ql-picker-item::before {
        content: '字体';
    }
    .ql-snow .ql-picker.ql-size .ql-picker-label::before,
    .ql-snow .ql-picker.ql-size .ql-picker-item::before {
        content: '字号';
    }
    .post-content iframe,
    .reply-content iframe {
        width: 100%;
        aspect-ratio: 16 / 9;
        border: none;
        border-radius: 8px;
    }
.post-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.post-left-sidebar {
    width: 220px;
    flex-shrink: 0;
    position: sticky;
    top: 80px;
}
.post-main {
    flex: 1;
    min-width: 0;
}
@media (max-width: 1100px) {
    .post-left-sidebar {
        display: none;
    }
}

/* 红包样式 */
.post-redpacket-section {
    margin: 0;
    padding: 0;
    text-align: left;
}
.redpacket-card {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    border-radius: 16px;
    overflow: hidden;
    color: #fff;
    box-shadow: 0 8px 32px rgba(220, 38, 38, 0.3);
    max-width: 400px;
    margin: 0;
    transition: transform 0.3s, box-shadow 0.3s;
}
.redpacket-card.redpacket-card-sidebar {
    width: 220px;
    max-width: 220px;
}
.redpacket-card-sidebar .redpacket-header {
    padding: 12px 15px;
    font-size: 13px;
}
.redpacket-card-sidebar .redpacket-body {
    padding: 15px;
}
.redpacket-card-sidebar .redpacket-amount .amount-num {
    font-size: 28px;
}
.redpacket-card-sidebar .redpacket-amount .amount-unit {
    font-size: 14px;
}
.redpacket-card-sidebar .redpacket-info {
    flex-direction: column;
    gap: 5px;
}
.redpacket-card-sidebar .redpacket-time {
    font-size: 11px;
}
.redpacket-card-sidebar .redpacket-footer {
    padding: 10px 15px 15px;
}
.redpacket-card-sidebar .redpacket-btn {
    padding: 8px 20px;
    font-size: 13px;
    border-radius: 18px;
}
.redpacket-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(220, 38, 38, 0.4);
}
.redpacket-header {
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.redpacket-body {
    padding: 25px 20px;
    text-align: center;
}
.redpacket-amount {
    margin-bottom: 10px;
}
.redpacket-amount .amount-num {
    font-size: 42px;
    font-weight: bold;
}
.redpacket-amount .amount-unit {
    font-size: 16px;
    margin-left: 4px;
}
.redpacket-info {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 13px;
    margin-bottom: 8px;
    opacity: 0.9;
}
.redpacket-status {
    padding: 2px 10px;
    border-radius: 12px;
    background: rgba(255,255,255,0.2);
}
.redpacket-status.status-1 {
    background: #fbbf24;
    color: #92400e;
}
.redpacket-time {
    font-size: 12px;
    opacity: 0.85;
}
.redpacket-footer {
    padding: 15px 20px 20px;
    text-align: center;
}
.redpacket-btn {
    background: #fbbf24;
    color: #92400e;
    border: none;
    padding: 12px 45px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.redpacket-btn:hover:not(:disabled) {
    background: #f59e0b;
    transform: scale(1.05);
}
.redpacket-btn:disabled, .redpacket-btn.disabled {
    background: rgba(255,255,255,0.3);
    color: rgba(255,255,255,0.8);
    cursor: not-allowed;
    transform: none;
}
.redpacket-btn.opened {
    background: #86efac;
    color: #166534;
}

/* 红包弹窗 */
.redpacket-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.75);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.redpacket-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.redpacket-modal {
    width: 320px;
    background: #dc2626;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s;
}
.redpacket-modal-overlay.active .redpacket-modal {
    transform: scale(1);
}
.redpacket-modal-top {
    height: 180px;
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fbbf24;
    padding: 20px;
    text-align: center;
}
.redpacket-modal-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc2626;
    font-size: 24px;
    margin-bottom: 10px;
    overflow: hidden;
}
.redpacket-modal-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.redpacket-modal-title {
    font-size: 16px;
    color: #fff;
    margin-bottom: 5px;
}
.redpacket-modal-desc {
    font-size: 13px;
    opacity: 0.9;
}
.redpacket-envelope {
    position: absolute;
    left: 50%;
    bottom: 60px;
    transform: translateX(-50%);
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: #fbbf24;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    transition: all 0.3s;
    z-index: 10;
}
.redpacket-envelope:hover {
    transform: translateX(-50%) scale(1.1);
}
.redpacket-envelope i {
    font-size: 36px;
    color: #dc2626;
}
.redpacket-envelope.opening {
    animation: envelope-shake 0.5s ease-in-out;
}
.redpacket-envelope.opened {
    animation: envelope-open 0.6s ease forwards;
}
@keyframes envelope-shake {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    25% { transform: translateX(-50%) rotate(-10deg); }
    75% { transform: translateX(-50%) rotate(10deg); }
}
@keyframes envelope-open {
    0% { transform: translateX(-50%) scale(1); opacity: 1; }
    50% { transform: translateX(-50%) scale(1.3); opacity: 0.8; }
    100% { transform: translateX(-50%) scale(0); opacity: 0; }
}
.redpacket-modal-bottom {
    height: 140px;
    background: #b91c1c;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 20px;
}
.redpacket-result {
    text-align: center;
    color: #fbbf24;
    display: none;
    padding: 20px;
}
.redpacket-result.show {
    display: block;
}
.redpacket-result-amount {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 5px;
}
.redpacket-result-text {
    font-size: 14px;
    color: #fff;
}
.redpacket-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: rgba(255,255,255,0.8);
    font-size: 24px;
    cursor: pointer;
    z-index: 20;
}
.redpacket-modal-close:hover {
    color: #fff;
}
.redpacket-records {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 15px;
    padding: 0 20px;
}
.redpacket-record-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 13px;
    color: #fff;
}
.redpacket-record-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dc2626;
    font-size: 12px;
    overflow: hidden;
}
.redpacket-record-name {
    flex: 1;
}
.redpacket-record-amount {
    color: #fbbf24;
    font-weight: bold;
}

@keyframes dialog-fade-in {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes highlight-pulse {
    0% { background-color: transparent; box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.4); }
    50% { background-color: rgba(52, 152, 219, 0.1); box-shadow: 0 0 0 10px rgba(52, 152, 219, 0); }
    100% { background-color: transparent; box-shadow: 0 0 0 0 rgba(52, 152, 219, 0); }
}
.highlight-reply {
    position: relative;
}
.highlight-reply::before {
    content: '';
    position: absolute;
    left: -5px;
    top: -5px;
    right: -5px;
    bottom: -5px;
    border: 2px solid #3498db;
    border-radius: 12px;
    animation: border-pulse 2s ease-in-out 3;
    pointer-events: none;
}
@keyframes border-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}
@keyframes fade-in-down {
    from { opacity: 0; transform: translateX(-50%) translateY(-20px); }
    to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
@keyframes fade-out-up {
    from { opacity: 1; transform: translateX(-50%) translateY(0); }
    to { opacity: 0; transform: translateX(-50%) translateY(-20px); }
}
.link-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 9999; display: none; justify-content: center; align-items: center; padding: 20px; }
.link-modal-box { background: #fff; border-radius: 16px; padding: 24px; max-width: 360px; width: 100%; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,0.2); }
.link-modal-icon { width: 56px; height: 56px; border-radius: 50%; background: #fff3e0; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; font-size: 28px; color: #ff9800; }
.link-modal-title { font-size: 18px; font-weight: 600; color: #333; margin-bottom: 8px; }
.link-modal-desc { font-size: 14px; color: #666; margin-bottom: 8px; }
.link-modal-url { font-size: 12px; color: #999; word-break: break-all; margin-bottom: 20px; }
.link-modal-actions { display: flex; gap: 12px; }
.link-modal-btn { flex: 1; padding: 12px; border-radius: 8px; border: none; font-size: 15px; cursor: pointer; }
.link-modal-cancel { background: #f5f5f5; color: #666; }
.link-modal-confirm { background: #4CAF50; color: #fff; }

/* 投票区域折叠 */
.poll-body { max-height: 2000px; overflow: hidden; opacity: 1; transition: max-height 0.25s ease-out, opacity 0.2s ease-out; margin-top: 14px; }
.poll-body.collapsed { max-height: 0; opacity: 0; margin-top: 0; }
.poll-header:hover { opacity: 0.85; }
