/* Forum 页面 - 按 UI 设计稿 */

.lang-text {
    font-size: 13px;
    margin-left: 4px;
}

/* ========== TOP 轮播区：左侧 TOP，右侧轮播 ========== */
.forum-top-section {
    padding: 32px 0 24px;
    background: #fff;
}

.forum-top-row {
    display: flex;
    align-items: stretch;
    gap: 24px;
}

.forum-top-title {
    font-size: 32px;
    font-weight: bold;
    color: #000;
    margin: 0;
    letter-spacing: 1px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.forum-top-carousel-area {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* 轮播可见区域：只显示 4 张图 */
.forum-carousel-wrap {
    flex: 1;
    min-width: 0;
    max-width: 848px; /* 4 * 200 + 3 * 16 */
    overflow: hidden;
}

.forum-carousel-track {
    display: flex;
    gap: 15px;
    transition: transform 0.4s ease;
    width: max-content;
}

.forum-carousel-item {
    flex: 0 0 200px;
    width: 200px;
}

.forum-carousel-img {
    width: 100%;
    height: 150px;
    background-size: cover;
    background-position: center;
    object-fit: cover;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.forum-carousel-img:hover {
    opacity: 0.9;
}

.forum-carousel-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color, #E0E0E0);
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.forum-carousel-btn:hover {
    background: var(--primary-color, #0066FF);
    border-color: var(--primary-color, #0066FF);
    color: #fff;
}

/* ========== 主内容区 ========== */
.forum-main {
    background-color: #EFEFEF;
    padding-top: 20px;
    padding-bottom: 40px;
    display: flex;
}

.forum-main .container.main-container {
    background-color: transparent;
    padding-top: 0;
    padding-bottom: 0;
}
.forum-main .container .forum-main-row{
display: flex;
}
.forum-posts-col {
    background-color: #fff;
    padding: 24px;
    border-radius: 8px;
}

/* 加载更多按钮样式 */
.forum-load-more-wrapper {
    text-align: center;
    padding: 30px 0;
    margin-top: 20px;
}

.forum-load-more-btn {
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary, #333);
    background: #fff;
    border: 1px solid var(--border-color, #E0E0E0);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.forum-load-more-btn:hover {
    background: #f8f8f8;
    border-color: var(--text-secondary, #666);
    color: var(--text-primary, #333);
}

.forum-load-more-btn:active {
    background: #f0f0f0;
}

.forum-load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8f8f8;
}

.forum-load-more-loading i {
    margin-right: 8px;
}

@media (max-width: 767px) {
    .forum-load-more-wrapper {
        padding: 20px 0;
    }

    .forum-load-more-btn {
        padding: 10px 24px;
        font-size: 14px;
    }
}

.forum-main .row > .col-lg-4 {
    background-color: #fff;
    padding: 24px;
}

/* ========== 帖子卡片 ========== */
.forum-post {
    border-bottom: 1px solid var(--border-color, #E0E0E0);
    padding-bottom: 24px;
    margin-bottom: 24px;
}

.forum-post:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.forum-post-head {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.forum-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.forum-username {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #333);
}

.forum-follow-btn {
    color: #fff;
    font-size: 13px;
    color: #fff;
    background: #305DAD;
    padding: 0 10px;
    border: none;
    cursor: pointer;
    border-radius: 50px;
}



.forum-post-text {
    font-size: 14px;
    color: var(--text-secondary, #666);
    line-height: 1.6;
    margin: 0 0 16px 0;
}

.forum-post-media {
    margin-bottom: 16px;
}

.forum-post-media.two-images {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.forum-post-media.three-images {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 5px;
    position: relative;
}

.forum-media-item {
    display: block;
    width: 100%;
    height: 200px;
    object-position: center;
    object-fit: cover;
    min-width: 0;
    max-width: 100%;
    cursor: pointer;
    transition: opacity 0.2s ease;
    position: relative;
}

.forum-media-item:hover {
    opacity: 0.9;
}

/* 剩余图片数量提示 */
.forum-media-remaining {
    position: absolute;
    top: 0;
    right: 0;
    width: calc(33.333% - 3.33px);
    height: 200px;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.forum-media-remaining:hover {
    background: rgba(0, 0, 0, 0.6);
}

.forum-media-remaining-text {
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* 如果没有剩余图片，隐藏提示 */
.forum-post-media.three-images:not([data-total-images]) .forum-media-remaining,
.forum-post-media.three-images[data-total-images="3"] .forum-media-remaining,
.forum-post-media.three-images[data-total-images="2"] .forum-media-remaining,
.forum-post-media.three-images[data-total-images="1"] .forum-media-remaining {
    display: none;
}

.forum-post-media.single-video {
    max-width: 400px;
}

.forum-video-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 比例 */
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.forum-video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.forum-video-thumb {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 2;
}

.forum-video-wrapper.playing .forum-video-thumb {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.forum-play-btn {
    width: 56px;
    height: 56px;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    padding-left: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.forum-play-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.forum-play-icon {
    color: #fff;
}

/* 视频播放时隐藏控制栏（可选） */
.forum-video-wrapper.playing .forum-video-player::-webkit-media-controls {
    display: none;
}

.forum-post-actions {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 13px;
    color: var(--text-secondary, #666);
}

.forum-post-actions i {
    margin-right: 4px;
}

.forum-like-wrap {
    cursor: pointer;
    user-select: none;
}

.forum-like-wrap:hover {
    color: var(--primary-color, #305DAD);
}

.forum-like-wrap .forum-like-icon {
    transition: color 0.2s ease;
}

.forum-like-wrap.liked .forum-like-icon,
.forum-like-wrap.liked {
    color: #e74c3c;
}

.forum-comment-wrap.has-comments,
.forum-comment-wrap.has-comments .forum-comment-icon {
    color: var(--primary-color, #305DAD);
}

.forum-share-wrap.shared,
.forum-share-wrap.shared .forum-share-icon {
    color: var(--primary-color, #305DAD);
}

.forum-post-time {
    margin-left: auto;
}

/* 帖子下方点赞/互动用户头像行（仅点赞高亮时显示） */
.forum-post-avatars {
    display: none;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.forum-post.post-liked .forum-post-avatars {
    display: flex;
}

.forum-avatar-sm {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    display: inline-block;
}

/* ========== 评论区（仅展示） ========== */
.forum-comments {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color, #E0E0E0);
}
.forum-like-num{
    font-style: normal;
}
.forum-comment-form {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.forum-comment-input {
    flex: 1;
    min-width: 0;
    height: 40px;
    padding: 0 12px;
    font-size: 14px;
    color: var(--text-primary, #333);
    border: 1px solid var(--border-color, #E0E0E0);
    border-radius: 8px;
    background: #fff;
}

.forum-comment-input::placeholder {
    color: #999;
}

.forum-comment-send {
    flex-shrink: 0;
    height: 40px;
    padding: 0 20px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    background: #305DAD;
    border: none;
    border-radius: 8px;
    cursor: default;
}

.forum-comment-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.forum-comment-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.forum-comment-item:last-child {
    margin-bottom: 0;
}

.forum-comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
    display: block;
}

.forum-comment-body {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary, #666);
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 8px;
}

.forum-comment-user {
    font-weight: 600;
    color: var(--text-primary, #333);
}

.forum-comment-text {
    color: var(--text-secondary, #666);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.forum-comment-time {
    font-size: 12px;
    color: #999;
    margin-left: auto;
}


/* ========== HOT TOPIC ========== */
.forum-hot-topic {
    padding: 20px ;
    background-color: #fff;
    border-radius: 8px;
}

.forum-hot-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-primary, #333);
    margin: 0 0 20px 0;
    letter-spacing: 0.5px;
}

.forum-hot-list {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.forum-hot-list li {
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.4;
    padding-left: 0;
    display: flex;
    align-items: center;
}

.forum-hot-rank {
    color: #305DAD;
    font-weight: 700;
    margin-right: 10px;
    flex-shrink: 0;
}

.forum-hot-list li:nth-child(1) .forum-hot-rank { color: #ff4d4f; }
.forum-hot-list li:nth-child(2) .forum-hot-rank { color: #ff7a45; }
.forum-hot-list li:nth-child(3) .forum-hot-rank { color: #faad14; }

.forum-hot-list li:last-child {
    margin-bottom: 0;
}

.forum-hot-list a {
    color: var(--text-secondary, #666);
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    min-width: 0;
}

.forum-hot-list a:hover {
    color: var(--primary-color, #0066FF);
}

/* 悬浮按钮：发帖（滚动时固定） */
.forum-fab-post {
    position: fixed;
    right: 16px;
    bottom: 88px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: #305DAD;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    z-index: 999;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.forum-fab-post i {
    font-size: 18px;
}

.forum-fab-post:hover {
    background: #1f4485;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* 悬浮按钮：返回顶部 */
.forum-fab-top {
    position: fixed;
    right: 16px;
    bottom: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;

    border: none;
    background: #305DAD;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    z-index: 999;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.forum-fab-top i {
    font-size: 18px;
}

.forum-fab-top:hover {
    background: #1f4485;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

@media (max-width: 767px) {
    .forum-fab-post {
        right: 12px;
        bottom: 20px;
        width: 44px;
        height: 44px;
    }

    .forum-fab-top {
        right: 12px;
        bottom: 78px;
        width: 44px;
        height: 44px;
    }
}

/* ========== Responsive ========== */
@media (max-width: 991px) {
    .forum-main .container .forum-main-row {
        display: flex;
        flex-wrap: wrap;
        flex-direction: column;
    }

    /* 移动端：Hot Topic 移到帖子列表上方 */
    .forum-main-row .forum-posts-col {
        order: 2;
    }

    .forum-main-row .col-lg-4 {
        order: 1;
    }

    .forum-posts-col {
        padding: 24px 15px;
    }

    .forum-main .row > .col-lg-4 {
        padding: 24px 15px;
    }

    .forum-top-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .forum-top-carousel-area {
        width: 100%;
    }

    .forum-carousel-wrap {
        max-width: 100%;
    }

    .forum-carousel-item {
        flex: 0 0 180px;
        width: 180px;
    }
}

@media (max-width: 767px) {
    .lang-text {
        display: none;
    }

    .forum-top-section {
        padding: 20px 0 16px;
    }

    .forum-top-title {
        font-size: 26px;
    }

    .forum-top-carousel-area {
        gap: 8px;
    }

    .forum-carousel-wrap {
        max-width: 100%;
    }

    .forum-carousel-item {
        flex: 0 0 calc(100vw - 24px - 72px - 8px);
        width: calc(100vw - 24px - 72px - 8px);
        max-width: 320px;
    }

    .forum-carousel-img {
        height: 140px;
    }

    .forum-carousel-btn {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }

    .forum-main {
        padding-top: 16px;
        padding-bottom: 24px;
    }

    .forum-posts-col {
        padding: 16px 12px;
    }

    .forum-main .row > .col-lg-4 {
        padding: 16px 12px;
    }

    .forum-main .container .forum-main-row {
        margin-left: -12px;
        margin-right: -12px;
    }

    .forum-main .forum-posts-col,
    .forum-main .col-lg-4 {
        padding-left: 12px;
        padding-right: 12px;
    }

    .forum-post {
        padding-bottom: 16px;
        margin-bottom: 16px;
    }

    .forum-post-head {
        gap: 8px;
    }

    .forum-post-media.two-images,
    .forum-post-media.three-images {
        grid-template-columns: 1fr;
    }

    .forum-post-actions {
        flex-wrap: wrap;
        gap: 12px;
    }

    .forum-post-time {
        margin-left: 0;
        width: 100%;
    }

    .forum-hot-topic {
        margin-top: 0;
        margin-bottom: 16px;
    }

    .forum-hot-list a {
        white-space: normal;
        word-break: break-word;
        -webkit-line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

@media (max-width: 575px) {
    .forum-top-section {
        padding: 16px 0 12px;
    }

    .forum-top-title {
        font-size: 22px;
    }

    .forum-carousel-item {
        flex: 0 0 calc(100vw - 20px - 64px - 8px);
        width: calc(100vw - 20px - 64px - 8px);
        max-width: none;
    }

    .forum-carousel-img {
        height: 120px;
    }

    .forum-carousel-btn {
        width: 32px;
        height: 32px;
    }

    .forum-posts-col,
    .forum-main .row > .col-lg-4 {
        padding: 12px 10px;
    }

    .forum-main .forum-posts-col,
    .forum-main .col-lg-4 {
        padding-left: 10px;
        padding-right: 10px;
    }

    .forum-main .container .forum-main-row {
        margin-left: -10px;
        margin-right: -10px;
    }

    .forum-follow-btn {
        font-size: 12px;
        padding: 0 8px;
    }

    .forum-post-text {
        font-size: 13px;
    }

    .forum-post-actions {
        font-size: 12px;
        gap: 10px;
    }

    .forum-hot-title {
        font-size: 16px;
        margin-bottom: 16px;
    }

    .forum-hot-list li {
        font-size: 13px;
        margin-bottom: 10px;
    }
}

/* ========== 图片放大查看 Lightbox ========== */
.forum-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.forum-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.forum-lightbox-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.forum-lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.forum-lightbox-image-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: pan-y;
}

.forum-lightbox-img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease;
}

.forum-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 28px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.3s ease;
    z-index: 2;
}

.forum-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.forum-lightbox-prev,
.forum-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease, transform 0.3s ease;
    z-index: 2;
}

.forum-lightbox-prev {
    left: 20px;
}

.forum-lightbox-next {
    right: 20px;
}

.forum-lightbox-prev:hover,
.forum-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.forum-lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    z-index: 2;
}

.forum-lightbox-current {
    font-weight: 600;
}

@media (max-width: 767px) {
    .forum-lightbox-content {
        max-width: 100%;
        max-height: 100%;
        padding: 0;
    }

    .forum-lightbox-img {
        max-height: 100vh;
        border-radius: 0;
    }

    .forum-lightbox-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 24px;
        background: rgba(255, 255, 255, 0.3);
    }

    .forum-lightbox-prev,
    .forum-lightbox-next {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }

    .forum-lightbox-prev {
        left: 10px;
    }

    .forum-lightbox-next {
        right: 10px;
    }

    .forum-lightbox-counter {
        bottom: 10px;
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* ========== 发布帖子弹窗 ========== */
.forum-post-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.forum-post-modal.active {
    opacity: 1;
    visibility: visible;
}

.forum-post-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

.forum-post-modal-content {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.forum-post-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color, #E0E0E0);
}

.forum-post-modal-title {
    font-size: 20px;
    font-weight: bold;
    color: var(--text-primary, #333);
    margin: 0;
}

.forum-post-modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-secondary, #666);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease, color 0.2s ease;
}

.forum-post-modal-close:hover {
    background: var(--background-light, #F5F5F5);
    color: var(--text-primary, #333);
}

.forum-post-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.forum-post-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.forum-post-form-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary, #333);
}

.forum-post-textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary, #333);
    border: 1px solid var(--border-color, #E0E0E0);
    border-radius: 8px;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.forum-post-textarea:focus {
    outline: none;
    border-color: var(--primary-color, #305DAD);
}

.forum-post-textarea::placeholder {
    color: var(--text-light, #999);
}

.forum-post-upload-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.forum-post-images-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 12px;
    min-height: 0;
}

.forum-post-image-preview-item {
    position: relative;
    width: 100%;
    padding-bottom: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: var(--background-light, #F5F5F5);
    border: 1px solid var(--border-color, #E0E0E0);
}

.forum-post-image-preview-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.forum-post-image-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.forum-post-image-remove:hover {
    background: rgba(0, 0, 0, 0.8);
}

.forum-post-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    border: 2px dashed var(--border-color, #E0E0E0);
    border-radius: 8px;
    background: var(--background-light, #F5F5F5);
    color: var(--text-secondary, #666);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.forum-post-upload-btn:hover {
    border-color: var(--primary-color, #305DAD);
    background: rgba(48, 93, 173, 0.05);
    color: var(--primary-color, #305DAD);
}

.forum-post-upload-btn i {
    font-size: 18px;
}

.forum-post-upload-hint {
    font-size: 12px;
    color: var(--text-light, #999);
    margin: 0;
}

.forum-post-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color, #E0E0E0);
    background: var(--background-light, #F5F5F5);
}

.forum-post-btn-cancel,
.forum-post-btn-submit {
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.forum-post-btn-cancel {
    background: transparent;
    color: var(--text-secondary, #666);
}

.forum-post-btn-cancel:hover {
    background: var(--background-light, #F5F5F5);
    color: var(--text-primary, #333);
}

.forum-post-btn-submit {
    background: var(--primary-color, #305DAD);
    color: #fff;
}

.forum-post-btn-submit:hover {
    background: #1f4485;
}

.forum-post-btn-submit:disabled {
    background: var(--text-light, #999);
    cursor: not-allowed;
}

/* 移动端响应式样式 */
@media (max-width: 767px) {
    /* 移动端图片布局 - 保持正方形，一行3个 */
    .forum-post-media.three-images {
        gap: 3px;
        grid-template-columns: 1fr 1fr 1fr;
    }

    .forum-media-item {
        width: 100%;
        aspect-ratio: 1 / 1; /* 保持正方形 */
        height: auto;
        object-fit: cover;
        object-position: center;
    }

    .forum-media-remaining {
        /* 使用与图片相同的宽度计算方式 */
        width: calc((100% - 6px) / 3); /* 总宽度减去2个gap，再除以3 */
        /* 覆盖PC端的固定高度，让aspect-ratio控制高度 */
        height: auto !important;
        /* 高度等于宽度，保持正方形，完全匹配图片 */
        aspect-ratio: 1 / 1;
        position: absolute;
        top: 0;
        right: 0;
        /* 保持flex布局以居中文字 */
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .forum-media-remaining-text {
        font-size: 18px;
    }
    
    /* 移动端视频播放器样式 */
    .forum-post-media.single-video {
        max-width: 100%;
    }
    
    .forum-video-wrapper {
        border-radius: 4px;
    }
    
    .forum-play-btn {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }
    
    /* 移动端视频播放器样式 */
    .forum-post-media.single-video {
        max-width: 100%;
    }
    
    .forum-video-wrapper {
        border-radius: 4px;
    }
    
    .forum-play-btn {
        width: 48px;
        height: 48px;
        font-size: 20px;
    }

    .forum-post-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .forum-post-modal-header {
        padding: 16px 20px;
    }

    .forum-post-modal-title {
        font-size: 18px;
    }

    .forum-post-modal-body {
        padding: 20px;
    }

    .forum-post-images-preview {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 10px;
    }

    .forum-post-modal-footer {
        padding: 12px 20px;
        flex-direction: column-reverse;
    }

    .forum-post-btn-cancel,
    .forum-post-btn-submit {
        width: 100%;
        padding: 12px;
    }
}
