@charset "UTF-8";

/* 自訂字體與全域微調 */
:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans TC', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, Monaco, monospace;
}

body {
  font-family: var(--font-sans);
  background-color: #ffffff;
  color: #0f172a;
}

code, pre, .font-mono {
  font-family: var(--font-mono);
}

/* 自訂精緻滾動條 (亮色系) */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* 函式卡片邊框與特效 (圓弧邊框 + 黑色細線) */
.api-card {
  background-color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.22);
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.api-card:hover {
  border-color: rgba(0, 0, 0, 0.5);
  box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
}

/* 分類標籤按鈕 Active 樣式 */
.filter-btn.active {
  background-color: #2563eb !important;
  color: #ffffff !important;
  border-color: #2563eb !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3) !important;
}

/* 語法高亮樣式 (UEFI C Syntax Highlighting) */
/* d. function 的註解用綠色 */
.code-comment {
  color: #15803d !important; /* Vivid green */
  font-style: italic;
  font-weight: 500;
}

/* e. function 內的數字用紅色 */
.code-number {
  color: #dc2626 !important; /* Vivid red */
  font-weight: 600;
  font-family: var(--font-mono);
}

/* f. function 的運算元, 運算子用紫色 */
.code-operator {
  color: #7e22ce !important; /* Vivid purple */
  font-weight: 700;
}

/* c. 重要文字用黑色粗體 (專有名詞, 關鍵型別, 函式名稱) */
.code-keyword {
  color: #000000 !important;
  font-weight: 700;
}

.code-func {
  color: #000000 !important;
  font-weight: 800;
}

.code-string {
  color: #b45309 !important; /* Amber-700 */
}

/* 向量流程圖互動節點 */
.flow-node {
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.flow-node:hover rect {
  filter: drop-shadow(0 0 8px rgba(37, 99, 235, 0.5));
  stroke-width: 3px;
}

.flow-node:hover text {
  font-weight: 800;
}

/* 呼吸光暈動畫 */
@keyframes pulseGlow {
  0%, 100% {
    filter: drop-shadow(0 0 4px rgba(37, 99, 235, 0.3));
  }
  50% {
    filter: drop-shadow(0 0 12px rgba(37, 99, 235, 0.7));
  }
}

.flow-node.highlight rect {
  animation: pulseGlow 3s infinite ease-in-out;
}

/* Modal 遮罩漸層效果 */
.modal-backdrop {
  backdrop-filter: blur(6px);
  background-color: rgba(15, 23, 42, 0.6);
}

/* 程式碼區塊陰影與選取 */
pre code {
  user-select: text;
}

pre {
  position: relative;
}

/* PCIe 暫存器高亮互動 */
.pcie-row {
  transition: all 0.15s ease;
}

.pcie-row:hover {
  background-color: rgba(37, 99, 235, 0.08);
}

/* 專題導覽按鈕特效 */
.topic-btn {
  transition: all 0.2s ease;
}

.topic-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.phase-btn {
  transition: all 0.2s ease;
}

.phase-btn:hover {
  transform: translateY(-1px);
  filter: brightness(0.96);
}

/* ==========================================
 * Buy Me a Coffee 贊助樣式 (學習自 japantraveltop3search)
 * ========================================== */
.bmc-btn {
  background-color: #FFDD00;
  color: #000000;
  font-family: var(--font-sans);
  font-weight: 700;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(255, 221, 0, 0.4);
}

.bmc-btn:hover {
  background-color: #ffe536;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255, 221, 0, 0.6);
}

.bmc-floating-btn {
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.35);
  animation: bmcFloat 3s ease-in-out infinite;
}

@keyframes bmcFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.bmc-floating-btn:hover {
  animation: none;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.5);
}



