/* 话题页面特定样式 */
.topic-content {
    background-color: var(--background-color);
    min-height: calc(100vh - 44px);
    padding-bottom: 60px;
}

/* 话题头部 */
.topic-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark-color, #1a73e8) 100%);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.topic-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

/* 头部左侧 */
.topic-header-left {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.topic-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    position: relative;
    z-index: 1;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

/* 头部中间 */
.topic-header-center {
    flex: 1;
    padding: 0 12px;
    position: relative;
    z-index: 1;
    min-width: 0;
}

.topic-name {
    font-size: 16px;
    font-weight: 600;
    color: white;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topic-description {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topic-stats {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.topic-stat-value {
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.topic-stat-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

/* 头部右侧 */
.topic-header-right {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.topic-action-button {
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.topic-action-button.primary {
    background: white;
    color: var(--primary-color);
    border-color: white;
}

.topic-action-button:hover {
    opacity: 0.9;
}

/* 内容标签 */
.topic-tabs {
    background-color: var(--card-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 44px;
    z-index: 100;
}

.topic-tab-bar {
    display: flex;
    height: 48px;
}

.topic-tab-item {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--text-secondary-color);
    font-size: 15px;
    position: relative;
    transition: all 0.3s ease;
}

.topic-tab-item.active {
    color: var(--primary-color);
    font-weight: 600;
}

.topic-tab-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

/* 话题内容列表 */
.topic-content-list {
    background-color: var(--background-color);
    padding: 0 8px;
}

/* 帖子卡片 */
.topic-content-list .post-item {
    background: var(--card-color);
    border-radius: 12px;
    margin-bottom: 8px;
    border: 1px solid var(--border-color);
}

/* 表情图片大小限制 */
.topic-content-list .post-content img[src*="emoji"] {
    max-width: 20px;
    max-height: 20px;
    vertical-align: middle;
}

/* 空状态 */
.topic-empty {
    padding: 80px 20px;
    text-align: center;
    background: var(--card-color);
    margin: 16px;
    border-radius: 12px;
}

.topic-empty-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.4;
    color: var(--text-secondary-color);
}

.topic-empty-text {
    font-size: 15px;
    color: var(--text-secondary-color);
    margin-bottom: 8px;
}

.topic-empty-subtext {
    font-size: 13px;
    color: var(--text-secondary-color);
    opacity: 0.8;
}

/* 位置卡片样式 */
.moment-location-card {
    margin: 6px 16px 6px 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 20px;
    cursor: pointer;
}

.location-pin {
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.location-pin svg {
    width: 12px;
    height: 12px;
    fill: #E53935;
    vertical-align: middle;
}

.location-text {
    font-size: 13px;
    color: #333;
}

/* 位置链接（IP定位等无精准坐标时显示） */
.moment-location-link {
    margin: 6px 16px 6px 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 20px;
    text-decoration: none;
    cursor: pointer;
}

.moment-location-link:active {
    opacity: 0.7;
}

/* 更多菜单按钮 */
.more-menu-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #999;
}

.more-menu-dropdown {
    position: absolute;
    right: 0;
    top: 35px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 120px;
    z-index: 100;
    display: none;
}

.more-menu-dropdown.show {
    display: block;
}

.more-menu-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.more-menu-item:hover {
    background: #f5f5f5;
}

.more-menu-item.topped { color: #ff9500; }
.more-menu-item.essenced { color: #ff2d55; }
.more-menu-item.danger { color: #e54d4d; }
.more-menu-item svg { margin-right: 8px; }

/* 操作按钮文字标签 */
.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    background: none;
    border: none;
    color: var(--text-secondary-color);
    padding: 8px 0;
    cursor: pointer;
    transition: color 0.3s ease;
}

.action-btn:hover {
    color: var(--primary-color);
}

.action-btn.liked {
    color: #ff4757;
}

.action-btn.favorited {
    color: #ffa502;
}

.action-icon {
    width: 20px;
    height: 20px;
    margin-bottom: 4px;
}

.action-count {
    font-size: 12px;
    margin-bottom: 2px;
}

.action-label {
    font-size: 11px;
    color: var(--text-secondary-color);
}

.action-btn:hover .action-label,
.action-btn.liked .action-label,
.action-btn.favorited .action-label {
    color: inherit;
}

/* 下拉菜单在上层 */
.more-menu-dropdown {
    z-index: 1000 !important;
}

/* 适配暗黑模式 */
@media (prefers-color-scheme: dark) {
    .topic-header,
    .topic-tabs {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    }
}

/* 响应式调整 */
@media (max-width: 320px) {
    .topic-header {
        padding: 16px 12px;
    }
    
    .topic-icon {
        width: 56px;
        height: 56px;
        font-size: 20px;
    }
    
    .topic-name {
        font-size: 16px;
    }
    
    .topic-description {
        font-size: 13px;
    }
    
    .topic-action-button {
        padding: 8px;
        font-size: 13px;
    }
}