/* ============================================================
   emoji.css - 灵符表情面板（仙侠风格）
   ============================================================ */

/* ---------- 表情触发按钮 ---------- */
.emoji-trigger {
  position: absolute;
  right: 12px;
  bottom: 14px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(212, 168, 67, 0.08);
  border: 1px solid rgba(180, 140, 80, 0.15);
  color: #c5a028;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: all 0.25s;
  line-height: 1;
}
.emoji-trigger:hover {
  background: rgba(212, 168, 67, 0.15);
  border-color: rgba(200, 160, 40, 0.35);
  box-shadow: 0 0 16px rgba(200, 160, 40, 0.15);
  transform: scale(1.05);
}
.emoji-trigger:active {
  transform: scale(0.93);
}

/* 评论区表情按钮 — 内联样式 */
.emoji-trigger-inline {
  position: static;
  margin-left: 8px;
  flex-shrink: 0;
}

/* ---------- 表情面板浮层 ---------- */
.emoji-panel {
  position: absolute;
  bottom: 100%;
  right: 0;
  margin-bottom: 8px;
  width: 300px;
  max-height: 260px;
  background: linear-gradient(180deg, #1a0f2a 0%, #0f0a1f 100%);
  border: 1px solid rgba(180, 140, 80, 0.2);
  border-radius: 14px;
  overflow: hidden;
  z-index: 300;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 40px rgba(80, 40, 160, 0.15),
    0 0 80px rgba(40, 20, 100, 0.1);
  animation: emojiSlideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@keyframes emojiSlideUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 评论区面板 — 定位适配 */
.comment-input-bar .emoji-panel {
  right: auto;
  left: 0;
  bottom: 48px;
}

/* ---------- 面板头部 ---------- */
.emoji-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(180, 140, 80, 0.12);
  background: rgba(180, 140, 80, 0.04);
}
.emoji-panel-title {
  font-size: 13px;
  color: #c5a028;
  font-weight: 600;
}
.emoji-panel-close {
  background: none;
  border: none;
  color: #6b5e8a;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 0 2px;
  transition: color 0.2s;
}
.emoji-panel-close:hover {
  color: #f0c060;
}

/* ---------- 面板内容 — 表情网格 ---------- */
.emoji-panel-body {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  padding: 10px 10px 12px;
  max-height: 200px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(180, 140, 80, 0.2) transparent;
}
.emoji-panel-body::-webkit-scrollbar {
  width: 4px;
}
.emoji-panel-body::-webkit-scrollbar-thumb {
  background: rgba(180, 140, 80, 0.25);
  border-radius: 2px;
}
.emoji-panel-body::-webkit-scrollbar-track {
  background: transparent;
}

/* ---------- 单个表情项 ---------- */
.emoji-item {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
  background: transparent;
  border: none;
  color: inherit;
  line-height: 1;
  padding: 0;
}
.emoji-item:hover {
  background: rgba(212, 168, 67, 0.12);
  transform: scale(1.15);
  box-shadow: 0 0 10px rgba(200, 160, 40, 0.2);
}
.emoji-item:active {
  transform: scale(0.85);
  transition: transform 0.08s;
}
