/* ========== 话题详情页 - 小红书/Ins 风格专业极简设计 ========== */

:root {
    --primary: #ff2442; /* 小红书红，用于核心交互和点赞 */
    --primary-light: #fee2e2;
    --text-main: #333333; /* 极致的深灰黑，非纯黑，更柔和 */
    --text-body: #333333;
    --text-muted: #999999;
    --border-color: #ebebeb;
    --bg-page: #f4f4f4; /* 页面底色改为浅灰，才能衬托出白色的内容卡片 */
    --bg-body: #ffffff;
    --bg-gray: #f8f8f8;
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px; /* 加大卡片圆角 */
    --radius-full: 9999px;
    
    --shadow-float: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

body {
    background-color: var(--bg-page) !important;
}

.island-topic-page {
    background-color: transparent !important;
    color: var(--text-body);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", STHeiti, "Microsoft Yahei", Tahoma, Simsun, sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* 隐藏无关元素 */
.island-topic-actions-rail { display: none !important; }
.island-topic-sidebar { display: none !important; }

/* ========== 移动端顶部导航 (沉浸式返回) ========== */
.island-topic-nav-right {
    width: 32px;
}
.island-topic-nav-mobile {
    display: none;
}

@media (max-width: 1023px) {
    .island-topic-nav-mobile {
        display: flex;
        align-items: center;
        justify-content: flex-start; /* 改为靠左排列 */
        height: 52px;
        padding: 0 16px;
        position: sticky;
        top: 0;
        background: rgba(255, 255, 255, 0.98);
        z-index: 100;
        border-bottom: 1px solid var(--border-color);
        box-sizing: border-box;
        width: 100%;
        gap: 12px; /* 元素间距 */
    }
    
    .island-topic-back {
        color: var(--text-main);
        font-size: 22px;
        text-decoration: none;
        display: flex;
        align-items: center;
        margin-left: -4px;
        flex-shrink: 0;
    }
    
    .island-topic-nav-author {
        display: flex;
        align-items: center;
        gap: 8px;
        text-decoration: none;
        color: var(--text-main);
        min-width: 0; /* 允许文本截断 */
        flex-shrink: 1; /* 允许名字长时挤压 */
    }
    
    .island-topic-nav-author .nav-avatar {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        object-fit: cover;
        flex-shrink: 0;
    }
    
    .island-topic-nav-author .nav-name {
        font-size: 15px;
        font-weight: 500;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis; /* 名字过长时显示省略号 */
    }

    .island-topic-nav-mobile .nav-follow-btn {
        padding: 4px 14px;
        font-size: 13px;
        font-weight: 500;
        color: #059669; /* 清新绿色文字 */
        background: #ecfdf5; /* 浅绿色背景 */
        border: 1px solid transparent;
        border-radius: 100px;
        cursor: pointer;
        flex-shrink: 0; /* 防止关注按钮变形 */
        white-space: nowrap;
        margin-left: 0; /* 紧跟在名字后面 */
    }
    .island-topic-nav-mobile .nav-follow-btn.following {
        color: var(--text-muted);
        background: var(--bg-gray);
        border-color: transparent;
    }
}

/* ========== 桌面端顶部导航 ========== */
.island-topic-nav-desktop {
    display: none;
}

@media (min-width: 1024px) {
    .island-topic-nav-desktop {
        display: block;
        position: absolute;
        top: 16px;
        right: 16px;
        z-index: 20;
        width: auto;
        padding: 0;
    }
    
    .desktop-back-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: #f8f8f8;
        box-shadow: none;
        color: var(--text-muted);
        text-decoration: none;
        transition: all 0.2s;
        border: 1px solid transparent;
    }
    
    .desktop-back-btn span {
        display: none;
    }
    
    .desktop-back-btn i {
        font-size: 18px;
    }
    
    .desktop-back-btn:hover {
        transform: scale(1.05);
        background: #fff;
        color: var(--text-main);
        border-color: #ebebeb;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    }
}

/* ========== 主容器 (分栏设计) ========== */
.island-topic-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0;
    display: block;
}

.island-topic-main {
    display: flex;
    flex-direction: column;
}

/* ========== 无图状态的样式调整 ========== */
.island-topic-main.no-media-main {
    box-shadow: none !important;
    background: transparent !important;
    height: auto;
    min-height: auto;
    max-height: none;
    align-items: flex-start;
    padding-bottom: 60px; /* 底部留白 */
}

.island-topic-content-container.no-media {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    border-left: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08) !important; /* 添加阴影使其像卡片 */
    background: #fff !important; /* 确保背景是白色 */
}

/* ========== 针对各种屏幕的分栏设计宽度微调 ========== */
@media (min-width: 1024px) {
    body {
        background-color: #f4f4f4 !important; /* 强制整个页面变成浅灰底，这样白色的卡片才会凸显出来 */
    }
    .island-topic-page {
        padding: 0;
        max-width: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start; /* 靠上排列 */
        height: auto; 
        min-height: 100vh; /* 保证至少占满一屏 */
        position: relative;
    }
    .island-topic-main {
        flex-direction: row;
        gap: 0;
        padding: 0; 
        align-items: stretch;
        justify-content: center;
        background: transparent; /* 移除外层强制白底 */
        border-radius: var(--radius-lg);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08); /* 明显的阴影，让卡片悬浮 */
        margin: 24px 0 60px 0; /* 优化一下距离顶部导航的距离 */
        width: 1080px; /* 固定大卡片的宽度，不要太大 */
        height: calc(100vh - 120px); /* 减去顶部和底部的空间，让卡片不要贴底 */
        min-height: 500px;
        max-height: 900px;
    }
    
    .island-topic-main.no-media-main {
        box-shadow: none !important;
        background: transparent !important;
        height: auto;
        min-height: auto;
        max-height: none;
        align-items: flex-start;
        padding-bottom: 60px; /* 底部留白 */
    }
    .island-topic-main.no-media-main .island-topic-content-container {
        width: 100%;
        max-width: 800px;
        margin: 0 auto;
        border-radius: var(--radius-lg);
        border-left: none;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08) !important; /* 添加阴影使其像卡片 */
        background: #fff !important; /* 确保背景是白色 */
        min-height: 500px;
        position: relative;
    }
}
@media (min-width: 1280px) {
    .island-topic-page {
        max-width: none;
    }
    .island-topic-main {
        width: 1180px; /* 超大屏同步放大，但保持紧凑 */
    }
    .island-topic-content-container {
        width: 420px; /* 大屏时右侧可以略微放宽 */
    }
}

/* ========== 左侧：媒体展示区 ========== */
.island-topic-media-container {
    width: 100%;
}
.island-topic-media-container.no-media {
    display: none;
}

/* 针对不同屏幕调整媒体区最大宽度 */
@media (min-width: 1024px) {
    .island-topic-media-container {
        flex: 1; /* 左侧自适应撑满剩余空间 */
        position: relative; /* 移除 sticky，因为现在是大卡片内部分割 */
        top: 0;
        max-width: none; 
        background: #000; /* 小红书左侧媒体区通常是黑底/深灰底，为了衬托各种尺寸的图 */
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: var(--radius-lg) 0 0 var(--radius-lg); /* 继承外层圆角 */
        overflow: hidden; /* 防止图片溢出黑底 */
    }
}
@media (min-width: 1280px) {
    .island-topic-media-container {
        max-width: none;
    }
}

.island-topic-carousel {
    position: relative;
    width: 100%;
    background: #000; /* 兜底黑色背景 */
    overflow: hidden;
    z-index: 1;
    height: 100%; /* 桌面端撑满左侧高度 */
}

.island-topic-track {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    scroll-behavior: smooth;
}
.island-topic-track::-webkit-scrollbar {
    display: none; /* Safari/Chrome */
}

.island-topic-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000; /* 图片背景必须是黑色 */
    max-height: 85vh; /* 移动端限制 */
    position: relative;
    z-index: 1;
}

@media (min-width: 1024px) {
    .island-topic-slide {
        max-height: none; /* 桌面端取消 max-height 限制，由 flex 布局控制 */
    }
    .island-topic-carousel {
        border-radius: 0; /* 圆角由最外层的 main 容器控制 */
    }
}

.island-topic-slide img,
.island-topic-slide video {
    max-width: 100%;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0;
}

@media (min-width: 1024px) {
    .island-topic-slide img,
    .island-topic-slide video {
        border-radius: 0;
        box-shadow: none;
        width: 100%;
        height: 100%; /* 充满父容器 */
        object-fit: contain; /* 桌面端黑底背景下，用 contain 保证图片不被裁切，周围留黑，完全符合小红书桌面端设计 */
        max-height: none;
    }
}

/* ========== 小红书风格的媒体指示器/切换按钮 ========== */
.island-topic-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2); /* 半透明白底，适合深色背景 */
    border: none;
    border-radius: 50%;
    color: #fff; /* 白色箭头 */
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    backdrop-filter: blur(4px); /* 增加毛玻璃效果 */
}
.island-topic-arrow:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.05);
}
.island-topic-arrow i {
    font-size: 18px;
    font-weight: bold;
}
.island-topic-arrow.prev { left: 16px; }
.island-topic-arrow.next { right: 16px; }

@media (max-width: 1023px) {
    /* 移动端不显示左右切换箭头，只显示小圆点和依靠滑动 */
    .island-topic-arrow {
        display: none;
    }
}

.island-topic-dots {
    position: absolute;
    bottom: 32px; /* 抬高一点，防止被下方白色卡片圆角遮挡 */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.island-topic-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: none;
    padding: 0;
    transition: all 0.3s;
    cursor: pointer;
}

.island-topic-dot.active {
    background: #fff;
    width: 16px;
    border-radius: 4px;
}

/* ========== 移动端内容区卡片化重叠 ========== */
.island-topic-content-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 20px 20px 0 0;
    position: relative;
    top: -20px;
    padding-top: 16px;
    z-index: 2;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
}

@media (min-width: 1024px) {
    .island-topic-content-container {
        width: 380px; /* 减小右侧固定宽度 */
        flex-shrink: 0;
        height: 100%; /* 桌面端右侧内容区撑满整个大卡片高度 */
        background: #fff;
        border: none; /* 移除内部边框，因为大卡片已经有了 */
        border-radius: 0 var(--radius-lg) var(--radius-lg) 0; /* 右侧内容区负责右边的圆角 */
        overflow: hidden;
        display: flex;
        flex-direction: column;
        position: relative; /* 改为 relative，用来定位右上角返回按钮 */
        top: 0; 
        padding-top: 0; /* 桌面端取消 padding 和 top 偏移 */
        z-index: auto;
        box-shadow: none; /* 桌面端取消移动端的顶部阴影 */
    }
}
@media (min-width: 1280px) {
    .island-topic-content-container {
        width: 480px; /* 大屏时右侧再宽一些 */
    }
}
    
/* 如果没有媒体，让内容区居中并放宽 */
.island-topic-media-container.no-media + .island-topic-content-container {
    top: 0;
    padding-top: 0;
}

@media (min-width: 1024px) {
    .island-topic-media-container.no-media + .island-topic-content-container {
        width: 100%;
        max-width: 680px;
        margin: 0 auto;
        height: auto;
        min-height: calc(100vh - 120px);
        border: none;
        border-radius: 0;
        background: transparent;
        position: static; /* 移除 sticky */
    }
    .island-topic-media-container.no-media + .island-topic-content-container .island-topic-scroll-area {
        overflow-y: visible; /* 无媒体时无需内部滚动，跟随页面滚动 */
        padding: 0;
    }
    .island-topic-media-container.no-media + .island-topic-content-container .island-topic-author-header.desktop-only {
        padding: 16px 0;
    }
    .island-topic-media-container.no-media + .island-topic-content-container .island-topic-interaction-bar {
        border: none;
        background: transparent;
        padding-left: 0;
        padding-right: 0;
    }
    .island-topic-media-container.no-media + .island-topic-content-container .section-divider {
        margin: 20px 0;
    }
    
    /* 无媒体时，桌面端点赞栏需要粘性吸附在底部或取消边界 */
    .island-topic-media-container.no-media + .island-topic-content-container .island-topic-interaction-bar {
        position: relative;
        bottom: 0;
        background: var(--bg-body); /* 需要底色防止滚动透出 */
        border-top: 1px solid var(--border-color); /* 恢复顶边 */
        padding: 12px 20px;
        z-index: 10;
        margin: 0 -20px;
    }
}

/* ========== 作者头部 ========== */
.island-topic-author-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 16px 20px;
}

.island-topic-author-header.desktop-only { display: none; }
.island-topic-author-header.mobile-only { display: flex; }

@media (min-width: 1024px) {
    .island-topic-author-header.desktop-only { 
        display: flex; 
        border-bottom: 1px solid var(--border-color);
        padding: 16px 60px 16px 20px; /* 右侧留出空间给返回按钮 */
    }
    .island-topic-author-header.mobile-only { display: none; }
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.author-info .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.author-info .name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
}

.follow-btn {
    padding: 4px 14px; /* 稍微缩小一点内边距 */
    font-size: 13px; /* 保持精巧 */
    font-weight: 500; /* 去掉过重的粗体 */
    color: #059669; /* 清新绿色文字 */
    background: #ecfdf5; /* 浅绿色背景 */
    border: 1px solid transparent;
    border-radius: 100px;
    cursor: pointer;
    flex-shrink: 0; /* 防止被挤压 */
}

.follow-btn.following {
    color: var(--text-muted);
    background: var(--bg-gray);
    border-color: transparent;
}

/* 滚动区 (桌面端) */
.island-topic-scroll-area {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px;
    -webkit-overflow-scrolling: touch;
}

.island-topic-scroll-area::-webkit-scrollbar {
    display: none;
}

/* 文章正文 */
.island-topic-article {
    padding: 0 0 16px;
}

/* 解决内容中图片和视频可能溢出的问题 */
.island-topic-article .content img,
.island-topic-article .content video,
.island-topic-article .content iframe {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 4px 0 16px 0;
    box-shadow: none; /* 覆盖可能产生的阴影 */
}

.island-topic-article .title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-main);
    margin: 16px 0;
}

.island-topic-article .content {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-body);
    word-break: break-word;
}

/* 取消原版中的部分默认边距 */
.island-topic-article .content p { 
    margin: 0 0 1.2em; 
}
.island-topic-article .content img { 
    max-width: 100%; 
    border-radius: var(--radius-md);
    margin: 12px 0;
}

.island-topic-article .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 24px 0;
}

.island-topic-article .tags a {
    color: #005bb5 !important;
    font-size: 15px !important;
    text-decoration: none !important;
    background: transparent !important;
    padding: 0 !important;
}
.island-topic-article .tags a::before {
    content: "#" !important;
    margin-right: 2px !important;
}

/* 所属岛屿标签 */
.island-source {
    margin-top: 8px;
    margin-bottom: 24px;
}

.island-source a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: #f0f0f0; /* 灰底 */
    color: var(--text-main);
    font-size: 13px;
    font-weight: 500;
    border-radius: 100px;
    text-decoration: none;
    transition: background 0.2s;
}

.island-source a i {
    color: #059669; /* 图标使用和关注一致的绿色，更有生机 */
}

.island-source a:hover {
    background: #e4e4e4;
}

/* 小红书风格的发表时间与交互数据区 */
.island-topic-article .publish-time {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 16px;
    padding-bottom: 12px;
}

/* 分割线 */
.section-divider {
    height: 1px;
    background: var(--border-color);
    margin: 20px -20px;
}

/* 评论区 */
.island-topic-comments {
    padding: 24px 0;
}

.comments-header {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

/* 评论列表简化版排版 */
.island-topic-comment-list .comment-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
}

.island-topic-comment-list .comment-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.island-topic-comment-list .comment-body {
    flex: 1;
}

.island-topic-comment-list .comment-user {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.island-topic-comment-list .comment-content {
    font-size: 14px;
    color: var(--text-main);
    line-height: 1.5;
}

.island-topic-comment-list .comment-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ========== 小红书风格的底部互动操作区 ========== */
.island-topic-interaction-bar {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background: #fff;
    border-top: 1px solid var(--border-color);
    gap: 12px;
}

/* 移动端固定底部 */
@media (max-width: 1023px) {
    /* 隐藏页脚，因为详情页移动端有专属底部交互栏 */
    body > footer,
    body > .footer,
    body > .container:last-of-type,
    footer, 
    .footer {
        display: none !important;
    }
    
    .island-topic-interaction-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 100;
        padding-bottom: calc(16px + env(safe-area-inset-bottom)); /* 增加底部高度防遮挡 */
        padding-top: 12px;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
    }
    
    .island-topic-page {
        padding-bottom: 90px;
    }
}

.interaction-input {
    flex: 1;
    min-width: 0; /* 防止子元素撑开导致 flex 布局失效 */
    max-width: 100%;
}

.fake-input {
    height: 38px;
    background: var(--bg-gray);
    border-radius: 100px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    color: var(--text-muted);
    font-size: 14px;
    cursor: pointer;
}

.comment-input-wrapper {
    display: flex;
    align-items: center;
    height: 38px;
    background: var(--bg-gray);
    border-radius: 100px;
    padding: 0 16px 0 20px; /* 左侧增加一点内边距替代图标位置 */
    width: 100%;
    box-sizing: border-box;
}

.comment-input-wrapper input,
.comment-input-wrapper textarea {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    outline: none;
    color: var(--text-main);
    font-family: inherit;
}

.comment-input-wrapper .send-btn {
    border: none;
    background: transparent;
    color: #135cb6;
    font-weight: 600;
    font-size: 14px;
    padding: 0 0 0 12px;
    cursor: pointer;
}

.interaction-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-main);
    font-size: 14px;
    font-weight: 500;
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: none;
    padding: 0;
}

.action-btn i {
    font-size: 20px; /* 减小图标尺寸，显得更精致 */
}
.action-btn span {
    font-size: 13px; /* 数据文字大小适中 */
    font-weight: 500;
}

.action-btn.active {
    color: var(--primary); /* 激活时变红 */
}

/* ================= 评论区补充样式 ================= */

.island-topic-comments {
    padding: 0 0 40px;
}

.comments-header {
    font-size: 15px; /* 加大一点 */
    color: var(--text-muted);
    margin-bottom: 16px;
    font-weight: 500;
}

.island-topic-comment-list .comment-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.island-topic-comment-list .comment-item:last-child {
    border-bottom: none;
}

.island-topic-comment-list .comment-avatar img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.island-topic-comment-list .comment-body {
    flex: 1;
}

.island-topic-comment-list .comment-header {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    gap: 6px;
    flex-wrap: wrap;
}

.island-topic-comment-list .comment-header .comment-user {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted); /* 小红书评论用户名偏淡 */
}

/* 作者标签样式优化 */
.island-topic-comment-list .comment-header span.bg-blue-50 {
    background-color: var(--bg-gray);
    color: var(--text-muted);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: normal;
    line-height: 1;
}

/* 评论点赞按钮 */
.island-topic-comment-list .comment-user .like-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
}

.island-topic-comment-list .comment-user .like-btn i {
    font-size: 16px;
}

.island-topic-comment-list .comment-content {
    font-size: 16px;
    color: var(--text-main);
    line-height: 1.5;
    margin-bottom: 6px;
    word-break: break-word;
}

.island-topic-comment-list .comment-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.island-topic-comment-list .comment-actions {
    margin-top: 8px;
    display: flex;
    gap: 16px;
}

.island-topic-comment-list .comment-action-btn {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    text-decoration: none;
}
.island-topic-comment-list .comment-action-btn:hover {
    color: var(--text-main);
}

/* 隐藏旧版评论回复输入框 */
.comment-reply-form {
    display: none !important;
}

/* ========== 统一回复/评论弹窗 ========== */
.island-reply-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1000;
    display: none;
    align-items: flex-end;
}
.island-reply-modal.active {
    display: flex;
}
.island-reply-mask {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1;
}
.island-reply-dialog {
    position: relative;
    z-index: 2;
    background: #fff;
    width: 100%;
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.island-reply-modal.active .island-reply-dialog {
    transform: translateY(0);
}
.island-reply-body {
    display: flex;
    align-items: flex-end; /* 让输入框和按钮底部对齐，方便多行输入 */
    background: var(--bg-gray);
    border-radius: 20px;
    padding: 8px 16px;
    min-height: 40px;
}
#island-reply-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    outline: none;
    color: var(--text-main);
    resize: none;
    max-height: 100px;
    padding: 4px 0;
    line-height: 20px;
}
#island-reply-submit {
    background: transparent;
    border: none;
    color: #059669; /* 绿色按钮 */
    font-weight: 500;
    font-size: 15px;
    padding: 4px 0 4px 12px;
    cursor: pointer;
    flex-shrink: 0;
    pointer-events: auto; /* 保证可以点击 */
}
.island-reply-header { display: none; }

@media (min-width: 1024px) {
    .island-reply-modal {
        align-items: center;
        justify-content: center;
    }
    .island-reply-dialog {
        width: 480px;
        border-radius: var(--radius-lg);
        padding: 24px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.15);
        transform: scale(0.95);
        opacity: 0;
        transition: all 0.2s;
        padding-bottom: 24px;
    }
    .island-reply-modal.active .island-reply-dialog {
        transform: scale(1);
        opacity: 1;
    }
    .island-reply-header.desktop-only {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 16px;
        font-size: 16px;
        font-weight: 600;
    }
    .island-reply-header .close-btn {
        background: transparent;
        border: none;
        font-size: 20px;
        color: var(--text-muted);
        cursor: pointer;
    }
}

/* 小红书风格的点赞心形动画支持 (可选) */
@keyframes heart-burst {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

.action-btn.active i.bi-heart-fill {
    animation: heart-burst 0.3s ease-out;
}
.action-btn.active i.bi-star-fill {
    animation: heart-burst 0.3s ease-out;
    color: #eab308; /* 收藏使用黄色，而不是统一的主题红，更符合直觉 */
}

/* ================= 全屏图片查看器 ================= */
.island-topic-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.island-topic-viewer.active {
    opacity: 1;
    pointer-events: auto;
}

.island-topic-viewer img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.island-topic-viewer .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.island-topic-viewer .nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.island-topic-viewer .nav-btn.prev { left: 20px; }
.island-topic-viewer .nav-btn.next { right: 20px; }

.island-topic-viewer .viewer-count {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 15px;
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 16px;
    border-radius: 20px;
}