/* 华夏文明 - 第六期功能样式 */

/* 人物大全面板 */
.figure-encyclopedia-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #faf6ee;
  border: 1px solid #c9b896;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
  z-index: 9999;
  width: 560px;
  max-width: 94vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  font-family: 'Noto Serif SC', serif;
}

.fep-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #e0d5c0;
  font-size: 16px;
  font-weight: 600;
  color: #4a3728;
  background: linear-gradient(135deg, #f5ede0, #ede0cc);
  flex-shrink: 0;
}

.fep-search {
  padding: 12px 20px;
  border-bottom: 1px solid #e8e0d0;
}

#fep-search-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #c9b896;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  outline: none;
}

#fep-search-input:focus {
  border-color: #8b6914;
  box-shadow: 0 0 0 3px rgba(139, 105, 20, 0.1);
}

.fep-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 20px;
  border-bottom: 1px solid #e8e0d0;
  flex-wrap: wrap;
}

.fep-tab {
  padding: 6px 14px;
  background: #fff;
  border: 1px solid #e0d5c0;
  border-radius: 16px;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
  color: #6b5344;
  transition: all 0.2s;
}

.fep-tab:hover {
  border-color: #c9a96e;
  background: #f5ede0;
}

.fep-tab.active {
  background: linear-gradient(135deg, #8b6914, #6b4423);
  color: #f3eee4;
  border-color: #6b4423;
}

.fep-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
}

.fep-item {
  padding: 12px 14px;
  margin-bottom: 8px;
  background: #fff;
  border: 1px solid #e8e0d0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.fep-item:hover {
  border-color: #c9a96e;
  background: #f5ede0;
  transform: translateX(4px);
}

.fep-item-name {
  font-size: 15px;
  font-weight: 700;
  color: #4a3728;
  margin-bottom: 2px;
}

.fep-item-title {
  font-size: 13px;
  color: #8b6914;
  margin-bottom: 4px;
}

.fep-item-meta {
  font-size: 12px;
  color: #8b7355;
}

.fep-empty {
  text-align: center;
  padding: 40px 20px;
  color: #8b7355;
  font-size: 14px;
}

/* 近现代大事年表面板 */
.modern-timeline-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #faf6ee;
  border: 1px solid #c9b896;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
  z-index: 9999;
  width: 520px;
  max-width: 94vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  font-family: 'Noto Serif SC', serif;
}

.mtp-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid #e0d5c0;
  font-size: 16px;
  font-weight: 600;
  color: #4a3728;
  background: linear-gradient(135deg, #f5ede0, #ede0cc);
  flex-shrink: 0;
}

.mtp-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

.mtp-item {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #e8e0d0;
  cursor: pointer;
  transition: background 0.2s;
}

.mtp-item:hover {
  background: #f5ede0;
  padding-left: 8px;
  margin-left: -8px;
  margin-right: -8px;
  padding-right: 8px;
}

.mtp-item:last-child {
  border-bottom: none;
}

.mtp-year {
  flex-shrink: 0;
  width: 70px;
  font-size: 14px;
  font-weight: 700;
  color: #8b4513;
  padding-top: 2px;
}

.mtp-content {
  flex: 1;
}

.mtp-title {
  font-size: 14px;
  font-weight: 700;
  color: #4a3728;
  margin-bottom: 4px;
}

.mtp-desc {
  font-size: 12px;
  line-height: 1.6;
  color: #6b5344;
  margin-bottom: 4px;
}

.mtp-place {
  font-size: 11px;
  color: #8b7355;
}

/* 面板关闭按钮通用 */
.panel-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #8b7355;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s;
}

.panel-close:hover {
  background: #e0d5c0;
  color: #4a3728;
}

/* 移动端适配 */
@media (max-width: 768px) {
  .figure-encyclopedia-panel,
  .modern-timeline-panel {
    width: 96vw;
    max-height: 90vh;
  }
  .fep-tabs {
    gap: 4px;
  }
  .fep-tab {
    padding: 5px 10px;
    font-size: 11px;
  }
}
