/**
 * RolePilot 年度目标管理 - 演示页面样式
 */

/* ========== 演示面板 ========== */
.yearly-demo-panel {
  background: var(--doc-panel-bg);
  border: 1px solid var(--doc-border);
  border-radius: 8px;
  overflow: hidden;
  height: calc(100vh - 180px);
  min-height: 500px;
  display: flex;
  flex-direction: column;
}

/* ========== 面板标题 ========== */
.yearly-panel-header {
  padding: 14px 16px;
  background: var(--doc-sidebar-bg);
  border-bottom: 1px solid var(--doc-border);
}

.yearly-panel-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--doc-text);
}

/* ========== 目标列表 ========== */
.yearly-goals {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ========== 目标卡片 ========== */
.goal-card {
  background: var(--doc-sidebar-bg);
  border: 1px solid var(--doc-border);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s;
}

.goal-card:hover {
  border-color: rgba(0, 243, 255, 0.3);
  box-shadow: 0 0 15px rgba(0, 243, 255, 0.1);
}

.goal-card.completed {
  opacity: 0.7;
}

.goal-card.completed .goal-title {
  text-decoration: line-through;
  color: var(--doc-text-dim);
}

/* 目标头部 */
.goal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--doc-border);
}

.goal-role {
  padding: 3px 10px;
  background: rgba(var(--role-color), 0.15);
  background: color-mix(in srgb, var(--role-color) 15%, transparent);
  border: 1px solid var(--role-color);
  border-radius: 12px;
  font-size: 11px;
  color: var(--role-color);
  white-space: nowrap;
}

.goal-title {
  flex: 1;
  font-size: 14px;
  color: var(--doc-text);
  font-weight: 500;
}

.goal-link-btn {
  width: 28px;
  height: 28px;
  background: none;
  border: 1px solid var(--doc-border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.goal-link-btn:hover {
  border-color: var(--doc-primary);
  background: rgba(0, 243, 255, 0.1);
}

/* 进度条 */
.goal-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.2);
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--doc-border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--doc-accent), #2ea043);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 11px;
  color: var(--doc-text-dim);
  min-width: 36px;
  text-align: right;
}

/* 关联任务列表 */
.goal-tasks {
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.goal-task {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 4px;
  transition: background 0.2s;
}

.goal-task:hover {
  background: rgba(255, 255, 255, 0.03);
}

.goal-task input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--doc-primary);
  cursor: pointer;
}

.goal-task label {
  flex: 1;
  font-size: 13px;
  color: var(--doc-text);
  cursor: pointer;
  transition: color 0.2s;
}

.goal-task input:checked + label {
  color: var(--doc-text-dim);
  text-decoration: line-through;
}

/* 任务类型标签 */
.task-type {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.task-type.project {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.4);
}

.task-type.ability {
  background: rgba(168, 85, 247, 0.2);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.4);
}

.task-type.cardbox {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

/* ========== 新建按钮 ========== */
.new-goal-btn {
  padding: 14px;
  background: transparent;
  border: 2px dashed var(--doc-border);
  border-radius: 8px;
  color: var(--doc-text-dim);
  font-family: var(--doc-font);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: auto;
}

.new-goal-btn:hover {
  border-color: var(--doc-primary);
  color: var(--doc-primary);
  background: rgba(0, 243, 255, 0.05);
}

/* ========== 右侧说明 - 类型列表 ========== */
.type-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.type-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  background: var(--doc-sidebar-bg);
  border-radius: 6px;
}

.type-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.type-name {
  font-size: 13px;
  color: var(--doc-text);
  font-weight: 500;
}

.type-desc {
  font-size: 11px;
  color: var(--doc-text-dim);
}

/* ========== 烟花效果 ========== */
.firework {
  position: fixed;
  pointer-events: none;
  z-index: 9999;
}

.firework-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  animation: firework-explode 1s ease-out forwards;
}

@keyframes firework-explode {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) scale(0);
    opacity: 0;
  }
}

/* ========== 空状态 ========== */
.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--doc-text-dim);
  padding: 40px;
}

.empty-icon {
  font-size: 48px;
  opacity: 0.5;
}

.empty-text {
  font-size: 14px;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .yearly-demo-panel {
    height: auto;
    min-height: 400px;
  }
  
  .yearly-tab {
    padding: 10px 8px;
    font-size: 12px;
  }
  
  .goal-header {
    flex-wrap: wrap;
  }
  
  .goal-role {
    order: -1;
  }
}
