/**
 * 拾光主题 · B站视频卡样式
 */

.sg-bili{
  position: relative;
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 16 / 9;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* 封面层 */
.sg-bili-cover{
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  transition: opacity .4s var(--sg-ease);
}

.sg-bili-cover.hidden{
  opacity: 0;
  pointer-events: none;
}

.sg-bili-cover img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sg-bili-cover-placeholder{
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255,255,255,.28), transparent 55%),
    linear-gradient(135deg, #f472b6 0%, #a855f7 50%, #6366f1 100%);
}

.sg-bili-cover::after{
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.1) 0%, rgba(0,0,0,.5) 100%);
  pointer-events: none;
}

/* 时长 */
.sg-bili-duration{
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 3;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, .55);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-radius: 6px;
  letter-spacing: .02em;
}

/* B站徽章 */
.sg-bili-source{
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 10.5px;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, .4);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 100px;
}

.sg-bili-live{
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #30d158;
  box-shadow: 0 0 6px #30d158;
}

/* 播放按钮 */
.sg-bili-play{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .25);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1.5px solid rgba(255, 255, 255, .5);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  transition: transform .3s var(--sg-ease), background .3s var(--sg-ease);
}

.sg-bili-cover:hover .sg-bili-play{
  transform: translate(-50%, -50%) scale(1.1);
  background: rgba(255, 255, 255, .35);
}

.sg-bili-cover:active .sg-bili-play{
  transform: translate(-50%, -50%) scale(.95);
}

/* 标题 + 作者 */
.sg-bili-meta{
  position: absolute;
  left: 16px;
  right: 70px;
  bottom: 14px;
  z-index: 3;
  color: #fff;
  pointer-events: none;
}

.sg-bili-title{
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
  letter-spacing: -.01em;
  text-shadow: 0 1px 4px rgba(0,0,0,.6);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 2px;
}

.sg-bili-author{
  font-size: 11.5px;
  font-weight: 500;
  color: rgba(255,255,255,.75);
  text-shadow: 0 1px 4px rgba(0,0,0,.6);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 播放层 */
.sg-bili-frame{
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #000;
  display: none;
}

.sg-bili-frame.active{
  display: block;
}

.sg-bili-frame iframe{
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ============================================================
   Card 布局（首页精选）
   ============================================================ */

.sg-bili-card{
  min-height: 250px;
}

/* ============================================================
   Inline 布局（文章内嵌）
   ============================================================ */

.sg-bili-inline{
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(0,0,0,.12);
  margin: 32px 0;
}

/* ============================================================
   响应式
   ============================================================ */

@media (max-width: 768px){
  .sg-bili-play{
    width: 46px;
    height: 46px;
  }

  .sg-bili-play svg{
    width: 13px;
    height: 13px;
  }

  .sg-bili-title{
    font-size: 13px;
  }

  .sg-bili-author{
    font-size: 11px;
  }

  .sg-bili-source{
    font-size: 10px;
    padding: 3px 8px;
  }

  .sg-bili-duration{
    font-size: 10.5px;
    padding: 2px 7px;
  }
}