/* friend_links.css */

/* ——— 全局容器 ——— */
.butterfly-container {
    max-width: 960px;
    margin: 0 auto;
    padding: 40px 20px;
  }
  
  /* ——— 页面头部 ——— */
  .bf-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
  }
  .bf-title {
    font-size: 2.5rem;
    color: var(--text-color, #333);
  }
  .bf-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: background .3s;
  }
  .bf-btn-primary {
    background: var(--gp-primary, #667eea);
    color: #fff;
  }
  .bf-btn-primary:hover {
    background: var(--gp-primary-dark, #5a6bd8);
  }
  .bf-btn-secondary {
    background: #f0f0f0;
    color: #666;
  }
  .bf-btn-secondary:hover {
    background: #e0e0e0;
  }
  
  /* ——— 卡片基础 ——— */
  .bf-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    padding: 24px;
    margin-bottom: 30px;
  }
  .bf-card-note h2 {
    font-size: 1.4rem;
    margin-bottom: 12px;
  }
  .bf-list {
    list-style: none;
    padding-left: 0;
  }
  .bf-list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 8px;
  }
  .bf-list li::before {
    content: "✔";
    position: absolute;
    left: 0; top: 0;
    color: var(--gp-primary, #667eea);
  }
  
  /* ——— 网格友链 ——— */
  .bf-card-grid {
    padding: 16px;
  }
  .bf-grid-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
  }
  .bf-grid-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: transform .3s, box-shadow .3s;
    border-left: 4px solid var(--gp-primary, #667eea);
  }
  .bf-grid-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
  }
  .bf-grid-item a {
    display: flex;
    align-items: center;
    padding: 16px;
    text-decoration: none;
    color: var(--text-color, #333);
  }
  .bf-avatar {
    flex-shrink: 0;
    width: 50px; height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 12px;
    background: #f7f8fa;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform .6s;
  }
  .bf-grid-item:hover .bf-avatar {
    transform: rotate(360deg);
  }
  .bf-avatar img {
    width: 100%; height: 100%;
    object-fit: cover;
  }
  .bf-meta {
    flex: 1;
  }
  .bf-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
  }
  .bf-desc {
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
    max-height: 2.8em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }
  
  /* ——— 空状态 ——— */
  .bf-empty {
    text-align: center;
    color: #999;
    font-size: 1rem;
    padding: 40px 0;
  }
  
  /* ——— 模态框 （可复用 Hexo Butterfly 样式） ——— */
  .bf-modal {
    position: fixed; inset: 0;
    display: none;
    background: rgba(0,0,0,0.5);
    align-items: center; justify-content: center;
    z-index: 1050;
  }
  .bf-modal.show { display: flex; }
  .bf-modal-dialog {
    background: #fff;
    border-radius: 8px;
    max-width: 480px;
    width: 100%;
    overflow: hidden;
    animation: fadeInDown .4s;
  }
  .bf-modal-header,
  .bf-modal-footer {
    padding: 16px 24px;
    border-bottom: 1px solid #eee;
  }
  .bf-modal-header { border-bottom: none; }
  .bf-modal-body { padding: 16px 24px; }
  .bf-modal-close {
    background: none; border: none;
    font-size: 1.5rem; line-height: 1;
    position: absolute; top: 12px; right: 16px;
    cursor: pointer;
  }
  @keyframes fadeInDown {
    from { transform: translateY(-20px); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
  }
  
  /* 标签基础样式 */
/* 标签基础样式 - 紧贴右上角 + 透明背景 + 边框 + 阴影 + 动态效果 */
.link-tag {
  position: absolute;
  top: 0; /* <<-- 紧贴顶部 -->> */
  right: 0; /* <<-- 紧贴右侧 -->> */

  /* transform: translate(0, 0); /* 可以确保没有额外的偏移 */

  background-color: transparent; /* 透明背景 */
  border: 1px solid; /* 细边框 */
  /* border-radius: 4px; /* 如果想让所有角都有圆角 */
  /* <<-- 为了贴边，通常只保留左下角的圆角或全部直角 -->> */
  border-top-right-radius: 0; /* <<-- 右上角直角 -->> */
  border-top-left-radius: 0; /* 可选：左上角直角 */
  border-bottom-right-radius: 0; /* 可选：右下角直角 */
  border-bottom-left-radius: 4px; /* <<-- 只保留左下角圆角，像个小旗帜或角标 -->> */

  box-shadow: 0 1px 3px rgba(0,0,0,0.15); /* 细微阴影 */

  /* --- 内容样式 (表情包) --- */
  color: initial; /* 让表情包显示其自带颜色 */
  padding: 0.1em 0.4em; /* 内边距 */
  font-size: 0.9em; /* 字体大小 */
  font-weight: bold;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;

  /* --- 动态效果设置 --- */
  cursor: pointer;
  display: inline-block;
  /* 悬停时的 transform 可能需要调整，因为基点变了 */
  /* transition: all 0.3s ease; /* 保持过渡 */
   transition: border-width 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease; /* 更精确地指定过渡属性 */

  z-index: 10; /* 确保标签在卡片其他内容之上 */
}

/* 悬停时的动态效果 */
.link-tag:hover {
  /* 方案 1: 放大并轻微抬起（相对于新的位置） */
  /* transform-origin: top right; /* 设置旋转/缩放的基点为右上角 */
  /* transform: scale(1.1); /* 放大 */
  /* 如果希望悬停时稍微向外突出一点 */
  /* transform: scale(1.1) translate(2px, -2px); /* 放大并向右上角移动 */
  /* 更简单的悬停效果：只变粗边框和阴影 */
  transform: none; /* 不进行位置或缩放变换 */
  border-width: 2px; /* 悬停时边框变粗 */
  box-shadow: 0 2px 5px rgba(0,0,0,0.2); /* 悬停时阴影更明显 */
  /* background-color: rgba(255, 255, 255, 0.2); /* 可选：悬停时出现一点点背景 */
}


/* 根据 settings.py 中 TAG_CHOICES 定义的值来添加对应的边框颜色 */
/* 这些样式主要控制边框颜色 */
/* ... (这些特定标签的样式保持不变，只设置 border-color 和可选 color) ... */
.link-tag.tag-featured { border-color: #28a745; }
.link-tag.tag-new { border-color: #007bff; }
.link-tag.tag-partner { border-color: #fd7e14; }
.link-tag.tag-hot { border-color: #dc3545; }
.link-tag.tag-top { border-color: #6f42c1; }
.link-tag.tag-updated { border-color: #17a2b8; }
.link-tag.tag-popular { border-color: #ffc107; color: #333; } /* Keep color for popular */
.link-tag.tag-vip { border-color: #e83e8c; }
.link-tag.tag-master { border-color: #667eea; }
.link-tag.tag-default { border-color: #6c757d; }
/* ... 其他特定标签样式 ... */

.bf-grid-item .d-flex {

  padding-top: 25px; /* 顶部留出标签的高度空间 */
  padding-right: 35px; /* 右侧留出标签的宽度空间 */

}


/* D:\Nextcloud\blog\static\css\friend_links.css */

/* ... 弹幕文件中原有的其他 CSS 规则 (标签样式等) ... */

.danmaku-line {
  position: fixed; /* 固定在视口 */
  /* top 由 JS 随机设置 */
  /* right/left/animation 将由 @keyframes 控制初始和结束位置 */

  white-space: nowrap; /* 内容不换行 */
  font-size: 18px; /* 字体大小 */
  color: #444; /* 文字颜色 */
  padding: 6px 12px; /* 内边距 */
  background: rgba(255, 255, 255, 0.85); /* 半透明白色背景 */
  border-radius: 18px; /* 较大的圆角 */
  box-shadow: 0 2px 6px rgba(0,0,0,0.1); /* 阴影 */

  animation: danmakuMove linear forwards; /* 应用动画：动画名 匀速 结束后保持最终状态 */

  z-index: 9999; /* 确保在绝大多数元素之上 */

  /* <<-- 添加 pointer-events: none; 确保可以点击穿透 -->> */
  pointer-events: none;
  /* <<-- 添加 will-change: transform, right; 提示浏览器会改变这些属性，优化性能 -->> */
  will-change: transform, right;

  /* 初始透明度为 1 */
  opacity: 1;

  /* <<-- 移除或注释掉边框样式 -->> */
  /* border: 2px solid transparent; */
}

/* 弹幕滚动动画 */
@keyframes danmakuMove {
  /* 从屏幕右侧外面开始，右边距 -200px */
  0% { right: -200px; }
  /* 移动到左侧，直到右边距达到 100vw */
  100% { right: 100vw; }
}

/* <<-- 移除或注释掉所有 .danmaku-line.tag-xxx 边框颜色样式 -->> */
/* 例如： */
/* .danmaku-line.tag-featured { border-color: #28a745; } */
/* .danmaku-line.tag-new { border-color: #007bff; } */
/* ... 其他 tag-xxx 样式 ... */


/* (Optional) 如果你需要一个专门的弹幕容器，不常用 fixed 定位时 */
/* .danmaku-container {
    position: relative;
    width: 100%;
    height: 0;
    pointer-events: none;
} */