/* 初次使用教學：遮罩、spotlight、步驟卡、按鈕 */

.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 99998;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.tour-overlay.active {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}

/* 全屏暗色遮罩（可點擊穿透到「跳過」等需保留的區域由步驟卡處理） */
.tour-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

/* 當前步驟目標的高亮框（直接疊在元件上，由 JS 設定位置與尺寸） */
.tour-spotlight {
  position: absolute;
  border: 2px solid var(--accent, #d9f20b);
  border-radius: 8px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5), 0 0 20px rgba(217, 242, 11, 0.35);
  pointer-events: none;
  transition: top 0.2s ease, left 0.2s ease, width 0.2s ease, height 0.2s ease;
}

/* 步驟說明卡（顯示在目標旁，可點擊） */
.tour-card {
  position: absolute;
  min-width: 280px;
  max-width: 360px;
  background: var(--panel, #161616);
  border: 1px solid var(--border-2, #444);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
  pointer-events: auto;
  z-index: 2;
}

.tour-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--accent, #d9f20b);
  margin-bottom: 0.5rem;
}

.tour-card-body {
  font-size: 0.9rem;
  color: var(--muted-2, #ccc);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.tour-card-video-embed {
  margin-bottom: 1rem;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
}

.tour-card-video-embed iframe {
  display: block;
  width: 100%;
  max-width: 320px;
  height: 180px;
  border: none;
}

.tour-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tour-card-progress {
  font-size: 0.8rem;
  color: var(--muted, #999);
}

.tour-card-btns {
  display: flex;
  gap: 0.5rem;
}

.tour-btn {
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid var(--border-2, #444);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text, #fff);
  transition: background 0.15s, border-color 0.15s;
}

.tour-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--accent, #d9f20b);
}

.tour-btn-primary {
  background: var(--accent, #d9f20b);
  color: #0f0f0f;
  border-color: var(--accent, #d9f20b);
}

.tour-btn-primary:hover {
  filter: brightness(1.1);
}

.tour-btn-ghost {
  background: transparent;
  color: var(--muted, #999);
}

.tour-btn-ghost:hover {
  color: var(--text, #fff);
}

/* 右鍵選單（開始計算按鈕：重新搜尋、教學） */
.tour-context-menu {
  position: fixed;
  z-index: 100000;
  min-width: 140px;
  background: var(--panel, #161616);
  border: 1px solid var(--border-2, #444);
  border-radius: 8px;
  padding: 4px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.tour-context-item {
  display: block;
  width: 100%;
  padding: 0.5rem 1rem;
  border: none;
  background: none;
  color: var(--text, #fff);
  font-size: 0.9rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.1s;
}

.tour-context-item:hover {
  background: rgba(217, 242, 11, 0.15);
}
