/* 活动窗口样式 */
.activity-window {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.activity-window.show {
    opacity: 1;
    visibility: visible;
}

.activity-window-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 600px;
    max-height: 80%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.activity-window.show .activity-window-container {
    transform: translateY(0);
}

.activity-window-header {
    padding: 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.activity-window-title {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.activity-window-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: color 0.2s ease;
}

.activity-window-close:hover {
    color: #333;
}

.activity-window-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.activity-window-content {
    display: flex;
    flex-direction: column;
}

.activity-window-content {
    line-height: 1.6;
    color: #555;
}

.activity-window-footer {
    padding: 15px 20px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
    min-height: 0;
}

.activity-window-footer:empty {
    display: none;
}

.activity-window-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
    margin-left: 10px;
    transition: all 0.2s ease;
}

.activity-window-btn:hover {
    background-color: #f8f9fa;
}

.activity-window-btn.primary {
    background-color: #4c97e7;
    color: white;
    border-color: #4c97e7;
}

.activity-window-btn.primary:hover {
    background-color: #4282c7;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .activity-window-container {
        width: 95%;
        max-height: 90%;
    }
    
    .activity-window-header {
        padding: 15px;
    }
    
    .activity-window-title {
        font-size: 18px;
    }
    
    .activity-window-body {
        padding: 15px;
    }
    
    .activity-window-footer {
        padding: 10px 15px;
    }
}

/* 全局提示样式 */
.global-copy-tip {
  position: fixed;
  bottom: 250px; /* 提示位置距离底部 100px，原来是150px，可调整 */
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.75);
  color: #fff;
  padding: 6px 14px;
  border-radius: 12px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.25s ease;
}
/* 全局提示样式 */

/* ==============================
   侧边工具栏 - 三个功能按钮
   返回顶部 / 收藏 / 下载APP
   ============================== */
.side-toolbar {
  position: fixed;
  right: -60px;           /* 默认隐藏在屏幕外 */
  bottom: 12%;            /* 整体高度，可调整 */
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden; 
  background: rgba(245,245,245,0.85); /* 低调科技风 */
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  z-index: 2000;
  /* 初始动画状态 */
  opacity: 0;
  transform: translateX(30px); /* 向右偏移 */
  transition: right 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
  /* 仅在移动端显示 */
  display: none;
}

/* 在移动端显示 */
@media (max-width: 1023px) {
  .side-toolbar {
    display: flex;
  }
}

/* 在PC端隐藏 */
@media (min-width: 1024px) {
  .side-toolbar {
    display: none !important;
  }
}
.side-toolbar.show {
  right: 3px;           /* 滑出时距屏幕右侧的距离 3px */
  opacity: 1;            /* 淡入 */
  transform: translateX(0); /* 滑入到正常位置 */
}
/* 单个按钮样式 */
.tool-btn {
  width: 35px;
  height: 38px;
  border: none;
  background: transparent;      /* 背景由容器提供 */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #999;
  font-size: 22px;             /* 图标大小 */
  transition: all 0.2s ease;
}
/* 按钮之间分隔线 */
.tool-btn:not(:last-child) {
  border-bottom: 1px solid rgba(200,200,200,0.3);
}
/* 悬停效果 */
.tool-btn:hover {
  color: #1783d1;
  transform: translateY(-2px);
}
/* 可选：图标光滑渲染 */
.tool-btn i {
  display: block;
}
/* ==============================
   侧边工具栏 - 三个功能按钮
   返回顶部 / 收藏 / 下载APP
   ============================== */

/* ==============================
   新的PC端侧边栏
   仅限PC端显示
   ============================== */
.pc-sidebar {
  position: fixed;
  right: 10px;
  top: 45%;
  transform: translateY(-50%);
  z-index: 1999;
}

.pc-sidebar-content {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(8px);
  padding: 10px;
  gap: 10px;
  width: 48px;
  transition: width 0.3s ease;
}

/* 展开态：左侧导航 + 右侧内容面板 */
.pc-sidebar-content.expanded {
  flex-direction: row;
  align-items: stretch;
  width: auto;
  min-width: 200px;
  max-width: 500px;
  padding: 12px;
  gap: 12px;
}

/* 侧边栏导航容器 */
.pc-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
}

.pc-sidebar-panel {
  display: none;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.pc-sidebar-content.expanded .pc-sidebar-panel {
  display: flex;
  flex-direction: column;
}

.pc-sidebar-panel-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px 10px 12px;
  border-radius: 10px;
  background: rgba(245, 247, 250, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.06);
  max-height: 420px;
  overflow: auto;
}

.pc-sidebar-user {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
}

.pc-sidebar-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(23, 131, 209, 0.18), rgba(23, 131, 209, 0.06));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #1783d1;
  user-select: none;
}

.pc-sidebar-user-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pc-sidebar-user-title {
  font-size: 14px;
  font-weight: 600;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pc-sidebar-user-subtitle {
  font-size: 12px;
  color: #667085;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pc-sidebar-kv {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.pc-sidebar-kv .k {
  color: #667085;
}

.pc-sidebar-kv .v {
  color: #111;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pc-sidebar-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.pc-sidebar-btn-secondary,
.pc-sidebar-btn-danger {
  height: 34px;
  border-radius: 10px;
  padding: 0 12px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.18s ease;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.85);
  color: #334155;
}

.pc-sidebar-btn-secondary:hover {
  border-color: rgba(23, 131, 209, 0.25);
  background: rgba(23, 131, 209, 0.06);
  color: #1783d1;
}

.pc-sidebar-btn-danger {
  margin-left: auto;
  border-color: rgba(239, 68, 68, 0.25);
  color: #b42318;
  background: rgba(255, 255, 255, 0.85);
}

.pc-sidebar-btn-danger:hover {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.08);
}

.pc-sidebar-empty {
  font-size: 12px;
  color: #667085;
  line-height: 1.5;
}

.pc-sidebar-btn {
  width: 48px;
  height: 48px;
  border: none;
  background: transparent;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #666;
  font-size: 24px;
  transition: all 0.2s ease;
}

.pc-sidebar-btn:hover {
  background: rgba(23, 131, 209, 0.1);
  color: #1783d1;
  transform: scale(1.1);
}

.pc-sidebar-btn:hover svg {
  fill: #1783d1;
  transition: fill 0.2s ease;
}


/* ==============================
   新的PC端侧边栏
   仅限PC端显示
   ============================== */
   
   
/*//////// 公告和搜索结果样式一致  开始 ////////*/
.result-item.announcement {
  display: flex;
  align-items: flex-start;
  padding: 5px 8px;
  border-bottom: 1px solid #eee;
  background: #fff;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.result-item.announcement .result-icon {
  margin-right: 12px;
  font-size: 18px;
  line-height: 1.2;
}

.result-item.announcement .result-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.result-item.announcement .result-title {
  font-weight: 600;
  font-size: 16px;
  color: #222;
  line-height: 1.4;
}

.result-item.announcement .result-desc {
  font-size: 14px;
  color: #666;
  line-height: 1.4;
}

/* 关键字高亮 */
.highlight {
  color: #e94b3c;
  font-weight: 600;
}
/*//////// 公告和搜索结果样式一致   结束 ////////*/

/* ====== 标签页样式 ====== */
.tab-container {
  width: 100%;
}

.tab-header {
  display: flex;
  border-bottom: 2px solid #e0e0e0;
  margin-bottom: 15px;
}

.tab-btn {
  background: none;
  border: none;
  padding: 10px 20px;
  font-size: 16px;
  color: #9aaec2;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.3s ease;
  margin-right: 5px;
}

.tab-btn:hover {
  color: #2b9be6;
}

.tab-btn.active {
  color: #2b9be6;
  border-bottom-color: #2b9be6;
  font-weight: bold;
}

/* 资源数量红色标签样式 */
.resource-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #d00;
  color: white;
  border-radius: 50%;
  font-size: 12px;
  font-weight: bold;
  width: 20px;
  height: 20px;
  margin-left: 6px;
  line-height: 1;
  padding: 0;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* 加载状态 */
.loading {
  padding: 40px 20px;
  text-align: center;
  color: #9aaec2;
}



/* 登录注册表单样式 */
#loginForm, #registerForm {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#loginForm label, #registerForm label {
  display: block;
  margin-bottom: 3px;
  font-size: 12px;
  color: #666;
}

#loginForm input, #registerForm input {
  width: 100%;
  padding: 6px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 12px;
}

#loginForm button, #registerForm button {
  width: 100%;
  padding: 8px;
  background: #1783d1;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  transition: background 0.2s ease;
}

#loginForm button:hover, #registerForm button:hover {
  background: #136bb3;
}

#loginForm p, #registerForm p {
  margin-top: 10px;
  font-size: 12px;
  text-align: center;
}

#loginForm a, #registerForm a {
  color: #1783d1;
  text-decoration: none;
}

#loginForm a:hover, #registerForm a:hover {
  text-decoration: underline;
}