:root {
  --gold-1: #f4c84a;
  --gold-2: #d4a017;
  --gold-3: #b8860b;
  --gold-deep: #8b6914;
  --bg: #0a0a0a;
  --card-bg: #15110a;
  --card-border: rgba(212, 160, 23, 0.15);
  --card-hover: rgba(244, 200, 74, 0.4);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  background: radial-gradient(ellipse at top, #1a0f00 0%, #000 60%);
}

/* 金色文字漸層 */
.gold-text {
  background: linear-gradient(135deg, #fff5d4 0%, #f4c84a 50%, #b8860b 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 40px rgba(244, 200, 74, 0.3);
}

/* Run 按鈕 */
.gold-btn {
  background: linear-gradient(135deg, #f4c84a 0%, #d4a017 50%, #b8860b 100%);
  color: #1a0f00;
  font-weight: 700;
  padding: 12px 32px;
  border-radius: 8px;
  border: 1px solid rgba(244, 200, 74, 0.4);
  box-shadow:
    0 4px 20px rgba(212, 160, 23, 0.3),
    inset 0 1px 0 rgba(255, 245, 212, 0.4);
  transition: all 0.2s;
  letter-spacing: 0.05em;
  cursor: pointer;
}
.gold-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow:
    0 6px 28px rgba(212, 160, 23, 0.5),
    inset 0 1px 0 rgba(255, 245, 212, 0.6);
}
.gold-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 區塊標題 */
.section-title {
  color: var(--gold-1);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 8px;
}

/* 卡片 */
.card {
  background: linear-gradient(135deg, rgba(30, 22, 8, 0.8) 0%, rgba(20, 15, 5, 0.6) 100%);
  border: 1px solid var(--card-border);
  padding: 12px;
  border-radius: 8px;
  transition: all 0.2s;
  backdrop-filter: blur(10px);
}
.card:hover {
  border-color: var(--card-hover);
  background: linear-gradient(135deg, rgba(40, 28, 10, 0.9) 0%, rgba(28, 20, 7, 0.7) 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(212, 160, 23, 0.15);
}

/* token symbol */
.token-symbol {
  color: #fff5d4;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.token-name {
  color: rgba(244, 200, 74, 0.5);
  font-size: 0.75rem;
}

/* 價格 */
.token-price {
  color: var(--gold-1);
  font-weight: 600;
}

/* 漲跌色 */
.pct-up { color: #4ade80; font-weight: 600; }
.pct-down { color: #f87171; font-weight: 600; }
.pct-na { color: rgba(244, 200, 74, 0.4); }

/* 排名 / 標記 */
.rank-badge {
  color: var(--gold-2);
  font-size: 0.75rem;
  font-weight: 600;
}

/* 共識計數徽章（出現在多少個源）*/
.consensus-badge {
  display: inline-block;
  background: linear-gradient(135deg, rgba(244, 200, 74, 0.2), rgba(184, 134, 11, 0.3));
  color: var(--gold-1);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  border: 1px solid rgba(244, 200, 74, 0.3);
  letter-spacing: 0.03em;
}
.consensus-badge.strong {
  background: linear-gradient(135deg, var(--gold-1), var(--gold-2));
  color: #1a0f00;
  border-color: var(--gold-1);
  box-shadow: 0 0 8px rgba(244, 200, 74, 0.4);
}

/* 骨架屏 */
.skeleton {
  background: linear-gradient(90deg,
    rgba(30, 22, 8, 0.4) 25%,
    rgba(60, 44, 16, 0.5) 50%,
    rgba(30, 22, 8, 0.4) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  height: 60px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 滾動條 */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold-2), var(--gold-deep));
  border-radius: 4px;
}

/* === Guide 頁面樣式 === */

.section-h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--gold-1);
  margin-bottom: 1.25rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(244, 200, 74, 0.2);
}

.toc-link {
  color: rgba(244, 200, 74, 0.75);
  padding: 6px 10px;
  border-radius: 4px;
  transition: all 0.15s;
  text-decoration: none;
}
.toc-link:hover {
  color: var(--gold-1);
  background: rgba(244, 200, 74, 0.08);
}

.tag-card {
  background: linear-gradient(135deg, rgba(30, 22, 8, 0.7), rgba(20, 15, 5, 0.5));
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 18px;
  transition: all 0.2s;
}
.tag-card:hover {
  border-color: rgba(244, 200, 74, 0.4);
  transform: translateX(4px);
}

.tag-card.highlight-card {
  border-color: rgba(244, 200, 74, 0.5);
  background: linear-gradient(135deg, rgba(60, 44, 16, 0.6), rgba(30, 22, 8, 0.4));
  box-shadow: 0 0 20px rgba(244, 200, 74, 0.15);
}

.tag-card.warning-card {
  border-color: rgba(251, 191, 36, 0.3);
  background: linear-gradient(135deg, rgba(60, 30, 10, 0.5), rgba(30, 15, 5, 0.4));
}

.tag-card.warning-card-critical {
  border-color: rgba(248, 113, 113, 0.4);
  background: linear-gradient(135deg, rgba(60, 15, 15, 0.5), rgba(30, 8, 8, 0.4));
  box-shadow: 0 0 16px rgba(248, 113, 113, 0.15);
}

.tag-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.tag-emoji { font-size: 1.5rem; }

.tag-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff5d4;
}

.accuracy {
  margin-left: auto;
  font-size: 0.85rem;
}
.stars-5 { color: #f4c84a; }
.stars-4 { color: #d4a017; }
.stars-3 { color: #b8860b; }

.badge-best {
  background: linear-gradient(135deg, var(--gold-1), var(--gold-2));
  color: #1a0f00;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: 0.05em;
}

.action-text {
  margin-left: auto;
  font-size: 0.85rem;
  color: #fbbf24;
  font-weight: 600;
}
.action-text.danger {
  color: #f87171;
}

.tag-detail {
  font-size: 0.9rem;
  color: rgba(244, 200, 74, 0.85);
  line-height: 1.7;
}
.tag-detail > div {
  margin-bottom: 4px;
}

.warning {
  margin-top: 8px;
  padding: 8px 12px;
  background: rgba(251, 191, 36, 0.08);
  border-left: 3px solid #fbbf24;
  border-radius: 4px;
  color: #fbbf24;
  font-size: 0.85rem;
}

.highlight-tip {
  margin-top: 12px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(244, 200, 74, 0.12), rgba(244, 200, 74, 0.05));
  border-left: 3px solid var(--gold-1);
  border-radius: 4px;
  color: #fff5d4;
  font-size: 0.9rem;
  font-weight: 500;
}

.warning-tip {
  margin-top: 12px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.1), rgba(248, 113, 113, 0.04));
  border-left: 3px solid #f87171;
  border-radius: 4px;
  color: #fff5d4;
  font-size: 0.9rem;
}

/* 組合卡片 */
.combo-card {
  border-radius: 10px;
  padding: 18px;
  border: 1px solid var(--card-border);
  background: linear-gradient(135deg, rgba(30, 22, 8, 0.7), rgba(20, 15, 5, 0.5));
}
.combo-card.good {
  border-color: rgba(74, 222, 128, 0.25);
  background: linear-gradient(135deg, rgba(15, 35, 20, 0.5), rgba(20, 15, 5, 0.5));
}
.combo-card.bad {
  border-color: rgba(248, 113, 113, 0.3);
  background: linear-gradient(135deg, rgba(35, 15, 15, 0.5), rgba(20, 8, 8, 0.5));
}

.combo-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gold-1);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.combo-tags {
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 6px;
  font-size: 0.9rem;
  color: #fff5d4;
  margin-bottom: 10px;
  font-weight: 500;
}

.combo-meaning {
  font-size: 0.9rem;
  color: rgba(244, 200, 74, 0.85);
  line-height: 1.6;
}

.danger-label {
  margin-left: auto;
  background: rgba(248, 113, 113, 0.2);
  color: #f87171;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  border: 1px solid rgba(248, 113, 113, 0.3);
}

/* 速判法步驟 */
.step-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  border: 1px solid var(--card-border);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-2));
  color: #1a0f00;
  font-weight: 700;
  border-radius: 50%;
  flex-shrink: 0;
}
.step-q {
  flex: 1;
  font-size: 0.9rem;
  color: #fff5d4;
}
.step-a {
  font-size: 0.85rem;
  color: #fbbf24;
  font-weight: 600;
}
.step-a.good {
  color: #4ade80;
}

/* === 板塊輪動 === */

.sector-card {
  background: linear-gradient(135deg, rgba(30, 22, 8, 0.7), rgba(20, 15, 5, 0.5));
  border: 1px solid var(--card-border);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s;
}
.sector-card:hover {
  border-color: rgba(244, 200, 74, 0.35);
}
.sector-card[open] {
  background: linear-gradient(135deg, rgba(40, 28, 10, 0.85), rgba(28, 20, 7, 0.7));
  border-color: rgba(244, 200, 74, 0.5);
  box-shadow: 0 4px 16px rgba(212, 160, 23, 0.15);
}

.sector-summary {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.sector-summary::-webkit-details-marker {
  display: none;
}
.sector-summary::after {
  content: '▼';
  color: rgba(244, 200, 74, 0.4);
  font-size: 0.7rem;
  margin-left: 4px;
  transition: transform 0.2s;
}
.sector-card[open] .sector-summary::after {
  transform: rotate(180deg);
}

.sector-medal {
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
  color: var(--gold-1);
}

.sector-name {
  font-weight: 600;
  color: #fff5d4;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sector-meta {
  font-size: 0.7rem;
  color: rgba(244, 200, 74, 0.4);
  white-space: nowrap;
}

.sector-change {
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}

.sector-tokens {
  border-top: 1px solid var(--card-border);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sector-token {
  display: grid;
  grid-template-columns: minmax(50px, auto) 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.25);
  text-decoration: none;
  transition: all 0.15s;
  font-size: 0.85rem;
}
.sector-token:hover {
  background: rgba(244, 200, 74, 0.08);
  transform: translateX(2px);
}

.sector-token-symbol {
  font-weight: 700;
  color: #fff5d4;
}

.sector-token-name {
  font-size: 0.75rem;
  color: rgba(244, 200, 74, 0.5);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sector-token-price {
  color: var(--gold-1);
  font-weight: 600;
  white-space: nowrap;
  font-size: 0.8rem;
}


/* === 頂部 Tab 切換 === */
.tab-link {
  padding: 6px 14px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  border-radius: 6px;
  color: rgba(244, 200, 74, 0.5);
  transition: all 0.2s;
  text-decoration: none;
}
.tab-link:hover {
  color: var(--gold-1);
  background: rgba(244, 200, 74, 0.06);
}
.tab-link.active {
  background: linear-gradient(135deg, var(--gold-1), var(--gold-2));
  color: #1a0f00;
  box-shadow: 0 2px 8px rgba(212, 160, 23, 0.3);
}
