/**
 * 任务面板样式
 */

/* 面板遮罩 */
.quest-panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1500;
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.quest-panel-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* 面板主体 - 侧边栏样式 */
.quest-panel {
  width: 100%;
  max-width: 380px;
  height: 100%;
  background: var(--color-ink-black);
  border-left: 2px solid var(--color-faded-red-dark);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.quest-panel-overlay.show .quest-panel {
  transform: translateX(0);
}

/* 面板头部 */
.panel-header {
  padding: 20px;
  background: rgba(139, 58, 58, 0.2);
  border-bottom: 1px solid var(--color-faded-red-dark);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.panel-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--color-faded-red-light);
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  color: var(--color-bone-white-dark);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.close-btn:hover {
  color: var(--color-bone-white);
  background: rgba(255, 255, 255, 0.1);
}

/* 面板内容 */
.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* 任务分区 */
.quest-section {
  margin-bottom: 25px;
}

.section-title {
  font-size: 0.85rem;
  color: var(--color-bone-white-dark);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(139, 58, 58, 0.3);
}

/* 任务项 */
.quest-item {
  background: rgba(26, 26, 26, 0.8);
  border: 1px solid var(--color-faded-red-dark);
  border-radius: 4px;
  padding: 15px;
  margin-bottom: 12px;
  transition: all var(--transition-fast);
}

.quest-item:hover {
  border-color: var(--color-faded-red);
  transform: translateX(-2px);
}

.quest-active {
  border-left: 3px solid var(--color-faded-red);
}

.quest-completed {
  border-left: 3px solid var(--color-collect);
  opacity: 0.8;
}

/* 任务头部 */
.quest-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  gap: 10px;
}

.quest-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.quest-type {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 2px;
  font-weight: 600;
}

.type-main {
  background: rgba(184, 91, 91, 0.2);
  color: var(--color-danger);
  border: 1px solid rgba(184, 91, 91, 0.3);
}

.type-side {
  background: rgba(91, 141, 184, 0.2);
  color: var(--color-examine);
  border: 1px solid rgba(91, 141, 184, 0.3);
}

.quest-name {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--color-bone-white);
  margin: 0;
  font-weight: 600;
}

.quest-completed .quest-name {
  text-decoration: line-through;
  color: var(--color-bone-white-dark);
}

/* 进度显示 */
.quest-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.progress-bar {
  width: 60px;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-faded-red), var(--color-faded-red-light));
  border-radius: 3px;
  transition: width 0.5s ease;
}

.progress-text {
  font-size: 0.75rem;
  color: var(--color-bone-white-dark);
  min-width: 35px;
  text-align: right;
}

.completed-badge {
  font-size: 0.75rem;
  color: var(--color-collect);
  background: rgba(91, 139, 91, 0.1);
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid rgba(91, 139, 91, 0.3);
}

/* 任务描述 */
.quest-description {
  font-size: 0.85rem;
  color: var(--color-bone-white-dark);
  margin: 0 0 12px 0;
  line-height: 1.6;
}

/* 任务步骤 */
.quest-steps {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(139, 58, 58, 0.3);
}

.quest-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 0.85rem;
}

.step-icon {
  font-size: 0.9rem;
  width: 20px;
  text-align: center;
}

.quest-step.completed .step-icon {
  color: var(--color-collect);
}

.quest-step.pending .step-icon {
  color: var(--color-bone-white-dark);
}

.step-text {
  color: var(--color-bone-white-dark);
}

.quest-step.completed .step-text {
  color: var(--color-bone-white);
  text-decoration: line-through;
}

.quest-step.pending .step-text {
  color: var(--color-bone-white);
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 40px 20px;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 15px;
  opacity: 0.5;
}

.empty-text {
  font-size: 1.1rem;
  color: var(--color-bone-white);
  margin-bottom: 8px;
}

.empty-hint {
  font-size: 0.85rem;
  color: var(--color-bone-white-dark);
}

/* 快捷键提示 */
.quest-hint {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.8);
  color: var(--color-bone-white-dark);
  padding: 8px 15px;
  border-radius: 4px;
  font-size: 0.8rem;
  border: 1px solid var(--color-faded-red-dark);
  z-index: 1400;
}

/* 响应式适配 */
@media (max-width: 480px) {
  .quest-panel {
    max-width: 100%;
  }
  
  .panel-body {
    padding: 15px;
  }
  
  .quest-header {
    flex-direction: column;
    gap: 8px;
  }
  
  .quest-progress {
    width: 100%;
  }
  
  .progress-bar {
    flex: 1;
  }
}
