/* ===================================================================
   Google Gemini 於 K-12 中小學教育的 100+ 種應用指南 - 專用樣式表
   設計風格：新粗獷潮流風 (Neo-Brutalism & Playful EdTech)
   =================================================================== */

:root {
  /* Neo-Brutalism Palette (Light Theme) */
  --bg-main: #FEF9C3; /* 活力溫潤的檸檬奶油黃 */
  --bg-card: #FFFFFF;
  --bg-surface: #F3F4F6;
  --bg-glass: rgba(254, 249, 195, 0.96);
  --border-subtle: #000000;
  --border-card: #000000;
  
  --text-main: #000000;
  --text-muted: #18181B;
  --text-subtle: #3F3F46;
  --text-inverse: #FFFFFF;

  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-light: #DBEAFE;
  --primary-glow: rgba(37, 99, 235, 0.25);

  --gemini-purple: #7C3AED;
  --gemini-purple-light: #EDE9FE;
  --gemini-glow: rgba(124, 58, 237, 0.2);

  --accent-teal: #059669;
  --accent-teal-light: #D1FAE5;

  --accent-amber: #D97706;
  --accent-amber-light: #FEF3C7;

  --accent-coral: #DC2626;
  --accent-coral-light: #FEE2E2;

  /* Badges & Highlights */
  --highlight-bg: #FEF08A;
  --highlight-border: #000000;
  --highlight-text: #000000;

  /* Hard Drop Shadows (Neo-Brutalism 特色純黑立體硬陰影) */
  --shadow-sm: 2px 2px 0px #000000;
  --shadow-md: 4px 4px 0px #000000;
  --shadow-lg: 6px 6px 0px #000000;
  --shadow-xl: 8px 8px 0px #000000;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-pill: 9999px;

  /* Transitions */
  --transition-fast: 0.12s ease;
  --transition-normal: 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Dark Theme Variables (Dark Neo-Brutalism) */
[data-theme="dark"] {
  --bg-main: #0C0A09;
  --bg-card: #1C1917;
  --bg-surface: #292524;
  --bg-glass: rgba(12, 10, 9, 0.96);
  --border-subtle: #FAFAFA;
  --border-card: #FAFAFA;
  
  --text-main: #FAFAFA;
  --text-muted: #D6D3D1;
  --text-subtle: #A8A29E;
  --text-inverse: #0C0A09;

  --primary: #FDE047;
  --primary-hover: #FEF08A;
  --primary-light: rgba(253, 224, 71, 0.15);
  --primary-glow: rgba(253, 224, 71, 0.25);

  --gemini-purple: #C084FC;
  --gemini-purple-light: rgba(192, 132, 252, 0.15);
  --gemini-glow: rgba(192, 132, 252, 0.25);

  --accent-teal: #34D399;
  --accent-teal-light: rgba(52, 211, 153, 0.15);

  --accent-amber: #FBBF24;
  --accent-amber-light: rgba(251, 191, 36, 0.15);

  --accent-coral: #F87171;
  --accent-coral-light: rgba(248, 113, 113, 0.15);

  --highlight-bg: rgba(253, 224, 71, 0.2);
  --highlight-border: #FAFAFA;
  --highlight-text: #FEF08A;

  --shadow-sm: 2px 2px 0px #FAFAFA;
  --shadow-md: 4px 4px 0px #FAFAFA;
  --shadow-lg: 6px 6px 0px #FAFAFA;
  --shadow-xl: 8px 8px 0px #FAFAFA;
}

/* Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text-main);
  background-color: var(--bg-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.25;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-hover);
}

code, kbd {
  font-family: 'Roboto Mono', 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.9em;
  background: var(--bg-surface);
  color: var(--gemini-purple);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

/* Glassmorphism Navigation Bar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: all var(--transition-normal);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  cursor: pointer;
}

.nav-logo-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--primary);
  border: 2px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 2px 2px 0px var(--border-subtle);
}

.nav-brand-text {
  display: flex;
  flex-direction: column;
}

.nav-brand-title {
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--primary);
}

.nav-brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Quick Search in Navbar */
.nav-search-wrap {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.nav-search-input {
  width: 100%;
  padding: 0.55rem 1rem 0.55rem 2.6rem;
  border-radius: var(--radius-pill);
  border: 2px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-main);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 2px 2px 0px var(--border-subtle);
  outline: none;
  transition: all var(--transition-fast);
}

.nav-search-input:focus {
  border-color: var(--primary);
  box-shadow: 3px 3px 0px var(--border-subtle);
  background: var(--bg-card);
}

.nav-search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  width: 16px;
  height: 16px;
}

.nav-search-kbd {
  position: absolute;
  right: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  color: var(--text-main);
  border-radius: 4px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  pointer-events: none;
}

/* Nav Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav-btn {
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  box-shadow: 2px 2px 0px var(--border-subtle);
  color: var(--text-main);
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.nav-btn:hover {
  background: var(--primary-light);
  color: var(--text-main);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px var(--border-subtle);
}

.nav-btn.primary {
  background: var(--primary);
  border-color: var(--border-subtle);
  color: white;
}

.nav-btn.primary:hover {
  background: var(--primary-hover);
}

.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--border-subtle);
  box-shadow: 2px 2px 0px var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  background: var(--primary-light);
  transform: translate(-1px, -1px) rotate(15deg);
  box-shadow: 3px 3px 0px var(--border-subtle);
}

/* Secondary Tabbed Subnav (Neo-Brutalism 潮流導覽列) */
.subnav-bar {
  background: var(--bg-card);
  border-bottom: 2.5px solid var(--border-subtle);
  width: 100%;
  position: sticky;
  top: 65px;
  z-index: 90;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all var(--transition-normal);
}

.subnav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.35rem 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap; /* 嚴格單列，絕不折成兩行 */
  gap: 0.32rem;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.subnav-container::-webkit-scrollbar {
  display: none;
}

.subnav-btn {
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  box-shadow: 2px 2px 0px var(--border-subtle);
  color: var(--text-main);
  padding: 0.24rem 0.46rem; /* 精緻縮小內距，確保10個選單項目一口氣水平單列排開 */
  border-radius: var(--radius-pill);
  font-size: 0.74rem; /* 精準微調字體 */
  font-weight: 700;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.subnav-btn:hover {
  background: var(--primary-light);
  color: var(--text-main);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px var(--border-subtle);
}

.subnav-btn.active {
  color: #000000;
  background: #FDE047; /* 醒目活力的黃色亮點按鈕 */
  border: 2px solid var(--border-subtle);
  box-shadow: 3px 3px 0px var(--border-subtle);
  font-weight: 800;
}

.subnav-btn .badge-num {
  font-size: 0.65rem;
  padding: 0.05rem 0.35rem;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  color: var(--text-main);
  font-weight: 800;
  transition: all var(--transition-fast);
}

.subnav-btn.active .badge-num {
  background: #000000;
  color: #FFFFFF;
  border-color: #000000;
}

/* Tab View Container for Single Page / Focused View Switching */
.tab-view {
  display: none;
  animation: fadeInTabView 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-view.active {
  display: block;
}

@keyframes fadeInTabView {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================================
   CURRICULUM ARCHITECTURE ROADMAP SECTION (5 PILLARS + APPENDIX)
   ======================================================== */
.roadmap-section {
  max-width: 1300px;
  margin: 0 auto 2.5rem auto;
}

.roadmap-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 2.2rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

[data-theme="dark"] .roadmap-card {
  background: linear-gradient(180deg, rgba(19, 27, 46, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.45);
}

.roadmap-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #1a73e8, #7c3aed, #12b5cb, #0d904f, #f29900, #ea4335);
}

.roadmap-header {
  margin-bottom: 2rem;
}

.roadmap-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  background: var(--primary-light);
  border: 1px solid var(--primary-glow);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.roadmap-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary);
  animation: pulse-glow 2s infinite ease-in-out;
}

.roadmap-title {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.roadmap-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  max-width: 950px;
}

.roadmap-ascii-box {
  margin-top: 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.35rem;
  overflow-x: auto;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .roadmap-ascii-box {
  background: rgba(11, 15, 25, 0.85);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.4);
}

.roadmap-ascii-pre {
  margin: 0;
  font-family: 'Roboto Mono', Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.65;
  color: #1a73e8;
}

[data-theme="dark"] .roadmap-ascii-pre {
  color: #67e8f9;
}

.roadmap-ascii-pre code {
  background: transparent;
  border: none;
  padding: 0;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
}

.roadmap-tree-container {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  position: relative;
}

.roadmap-tree-container::before {
  content: '';
  position: absolute;
  top: 32px;
  bottom: 32px;
  left: 27px;
  width: 2px;
  background: linear-gradient(180deg, #7c3aed 0%, #12b5cb 25%, #1a73e8 50%, #0d904f 75%, #ea4335 100%);
  z-index: 1;
}

@media (max-width: 768px) {
  .roadmap-tree-container::before {
    display: none;
  }
}

.roadmap-node {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  position: relative;
  z-index: 2;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  transition: all var(--transition-normal);
}

.roadmap-node:hover {
  background: var(--bg-card);
  border-color: var(--primary);
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .roadmap-node {
  background: rgba(30, 41, 59, 0.55);
}

[data-theme="dark"] .roadmap-node:hover {
  background: rgba(30, 41, 59, 0.95);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 20px -4px rgba(0, 0, 0, 0.35);
}

.node-left {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.node-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-card);
  border: 2px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-fast);
}

.roadmap-node:hover .node-icon {
  transform: scale(1.08);
}

.roadmap-node.pillar-1 .node-icon { border-color: #7c3aed; background: rgba(124, 58, 237, 0.1); }
.roadmap-node.pillar-2 .node-icon { border-color: #12b5cb; background: rgba(18, 181, 203, 0.1); }
.roadmap-node.pillar-3 .node-icon { border-color: #1a73e8; background: rgba(26, 115, 232, 0.1); }
.roadmap-node.pillar-4 .node-icon { border-color: #0d904f; background: rgba(13, 144, 79, 0.1); }
.roadmap-node.pillar-5 .node-icon { border-color: #f29900; background: rgba(242, 153, 0, 0.1); }
.roadmap-node.pillar-appendix .node-icon { border-color: #ea4335; background: rgba(234, 67, 53, 0.1); }

.node-body {
  flex: 1;
  min-width: 0;
}

.node-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.node-pillar-tag {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.roadmap-node.pillar-1 .node-pillar-tag { background: rgba(124, 58, 237, 0.12); color: #7c3aed; border: 1px solid rgba(124, 58, 237, 0.3); }
.roadmap-node.pillar-2 .node-pillar-tag { background: rgba(18, 181, 203, 0.12); color: #0891b2; border: 1px solid rgba(18, 181, 203, 0.3); }
.roadmap-node.pillar-3 .node-pillar-tag { background: rgba(26, 115, 232, 0.12); color: #1a73e8; border: 1px solid rgba(26, 115, 232, 0.3); }
.roadmap-node.pillar-4 .node-pillar-tag { background: rgba(13, 144, 79, 0.12); color: #0d904f; border: 1px solid rgba(13, 144, 79, 0.3); }
.roadmap-node.pillar-5 .node-pillar-tag { background: rgba(242, 153, 0, 0.12); color: #d97706; border: 1px solid rgba(242, 153, 0, 0.3); }
.node-pillar-tag.appendix { background: rgba(234, 67, 53, 0.12); color: #dc2626; border: 1px solid rgba(234, 67, 53, 0.3); }

[data-theme="dark"] .roadmap-node.pillar-1 .node-pillar-tag { background: rgba(124, 58, 237, 0.2); color: #c4b5fd; border: 1px solid rgba(124, 58, 237, 0.4); }
[data-theme="dark"] .roadmap-node.pillar-2 .node-pillar-tag { background: rgba(18, 181, 203, 0.2); color: #67e8f9; border: 1px solid rgba(18, 181, 203, 0.4); }
[data-theme="dark"] .roadmap-node.pillar-3 .node-pillar-tag { background: rgba(26, 115, 232, 0.2); color: #93c5fd; border: 1px solid rgba(26, 115, 232, 0.4); }
[data-theme="dark"] .roadmap-node.pillar-4 .node-pillar-tag { background: rgba(13, 144, 79, 0.2); color: #6ee7b7; border: 1px solid rgba(13, 144, 79, 0.4); }
[data-theme="dark"] .roadmap-node.pillar-5 .node-pillar-tag { background: rgba(242, 153, 0, 0.2); color: #fde047; border: 1px solid rgba(242, 153, 0, 0.4); }
[data-theme="dark"] .node-pillar-tag.appendix { background: rgba(234, 67, 53, 0.2); color: #fca5a5; border: 1px solid rgba(234, 67, 53, 0.4); }

.node-pages-badge {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

.node-pages-badge.highlight {
  background: rgba(234, 67, 53, 0.1);
  border-color: rgba(234, 67, 53, 0.3);
  color: #dc2626;
}

[data-theme="dark"] .node-pages-badge.highlight {
  background: rgba(234, 67, 53, 0.2);
  border-color: rgba(234, 67, 53, 0.4);
  color: #fca5a5;
}

.node-status-chip {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
}

.node-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: var(--text-main);
}

.node-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 0.85rem;
}

.node-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.node-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.35rem 0.8rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
}

.node-chip:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 10px var(--primary-glow);
}

.node-chip.primary {
  background: var(--primary-light);
  border-color: rgba(26, 115, 232, 0.3);
  color: var(--primary);
}

.node-chip.primary:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.node-chip.highlight {
  background: rgba(234, 67, 53, 0.1);
  border-color: rgba(234, 67, 53, 0.3);
  color: #dc2626;
}

[data-theme="dark"] .node-chip.highlight {
  background: rgba(234, 67, 53, 0.2);
  color: #fca5a5;
}

.node-chip.highlight:hover {
  background: #ea4335;
  border-color: #ea4335;
  color: #ffffff;
  box-shadow: 0 4px 10px rgba(234, 67, 53, 0.35);
}

/* Portal Matrix Cards in Overview Tab */
.portal-matrix-section {
  margin-top: 1.5rem;
}

.portal-matrix-head {
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.portal-matrix-title {
  font-size: 1.35rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
}

.portal-matrix-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.15rem;
}

.portal-nav-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.portal-nav-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-gradient, var(--primary));
  opacity: 0.8;
}

.portal-nav-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
  background: var(--bg-surface);
}

.portal-card-top {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.portal-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.portal-card-meta {
  flex: 1;
}

.portal-card-title {
  font-size: 1.05rem;
  font-weight: 750;
  color: var(--text-main);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.portal-card-badge {
  font-size: 0.72rem;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-pill);
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}

.portal-card-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.portal-card-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 0.25rem;
  transition: transform var(--transition-fast);
}

.portal-nav-card:hover .portal-card-action {
  transform: translateX(4px);
}

/* Main Layout */
.main-wrapper {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* Hero Section (Neo-Brutalism 純淨實體白底卡片，無雜質漸層) */
.hero-section {
  position: relative;
  background: var(--bg-card);
  border: 2.5px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 3rem 2.5rem;
  overflow: hidden;
  box-shadow: 4px 4px 0px var(--border-subtle);
}

.hero-glow-blob {
  display: none !important; /* 依指示完全移除紫色髒髒模糊光斑 */
}

.hero-header {
  position: relative;
  z-index: 1;
  max-width: 860px;
}

.hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-pill);
  background: #FEF08A;
  border: 2px solid var(--border-subtle);
  font-size: 0.8rem;
  font-weight: 700;
  color: #000000;
  margin-bottom: 1.25rem;
  box-shadow: 2px 2px 0px var(--border-subtle);
}

.hero-title {
  font-size: 2.5rem;
  line-height: 1.2;
  font-weight: 850;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.hero-title span.gradient-text {
  background: linear-gradient(120deg, #1a73e8 20%, #7c3aed 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 1.75rem;
}

.hero-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

.stat-number span.stat-unit {
  font-size: 1rem;
  color: var(--primary);
  margin-left: 0.2rem;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-subtle);
  margin-top: 0.2rem;
}

.hero-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Action Chips (Neo-Brutalism 立體硬陰影風格) */
.action-chip {
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  color: var(--text-main);
  box-shadow: 2px 2px 0px var(--border-subtle);
}

.action-chip:hover {
  border-color: var(--border-subtle);
  background: var(--primary-light);
  color: var(--text-main);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0px var(--border-subtle);
}

.action-chip:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px var(--border-subtle);
}

.action-chip.featured {
  background: var(--primary);
  color: #FFFFFF;
  border: 2px solid var(--border-subtle);
  box-shadow: 2px 2px 0px var(--border-subtle);
}

.action-chip.featured:hover {
  background: var(--primary-hover);
  color: #FFFFFF;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0px var(--border-subtle);
}

/* SECTION CONTAINER */
.section-block {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  scroll-margin-top: 5rem;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 2px solid var(--border-subtle);
  padding-bottom: 0.85rem;
}

.section-head-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.section-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.3rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.section-tag-badge {
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--border-subtle);
}

/* GOOGLE CLASSROOM SECTION (HIGHLIGHT) */
.classroom-banner-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.classroom-tabs-bar {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  scrollbar-width: none;
}

.classroom-tabs-bar::-webkit-scrollbar {
  display: none;
}

.c-tab-btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.c-tab-btn:hover {
  background: var(--bg-surface);
  color: var(--text-main);
}

.c-tab-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 2px 8px var(--primary-glow);
}

/* Scaffolded Tools Grid */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.tool-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  position: relative;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

.tool-card-head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.tool-icon-box {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.tool-card-titles {
  flex: 1;
}

.tool-card-title {
  font-size: 1.15rem;
  font-weight: 750;
  color: var(--text-main);
  line-height: 1.3;
}

.tool-card-en {
  font-size: 0.8rem;
  color: var(--text-subtle);
}

.tool-category-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  color: var(--text-muted);
}

.tool-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.tool-input-guide {
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  border-left: 3px solid var(--primary);
}

.tool-input-guide-title {
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* Prompt Box inside Card */
.prompt-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  position: relative;
  font-size: 0.88rem;
  line-height: 1.6;
}

.prompt-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px dashed var(--border-subtle);
  font-size: 0.75rem;
  color: var(--text-subtle);
  font-weight: 700;
  text-transform: uppercase;
}

.prompt-text {
  color: var(--text-main);
  white-space: pre-wrap;
  word-break: break-word;
}

.prompt-text mark, .prompt-text .variable-tag {
  background: var(--highlight-bg);
  border: 1px solid var(--highlight-border);
  color: var(--highlight-text);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  font-weight: 600;
  font-family: inherit;
}

.prompt-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.65rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-subtle);
}

.copy-btn {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--border-subtle);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all var(--transition-fast);
}

.copy-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.copy-btn.copied {
  background: var(--accent-teal);
  color: white;
  border-color: var(--accent-teal);
}

.toggle-en-btn {
  background: transparent;
  border: none;
  color: var(--text-subtle);
  font-size: 0.8rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.toggle-en-btn:hover {
  color: var(--primary);
  text-decoration: underline;
}

.tool-card-tip {
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--highlight-bg);
  border: 1px solid var(--highlight-border);
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}

/* PARTS FRAMEWORK SECTION */
.parts-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.part-element-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
}

.part-element-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--gemini-purple);
}

.part-letter-badge {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--gemini-purple));
  color: white;
  font-size: 1.6rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px var(--gemini-glow);
}

.part-card-title {
  font-size: 1.2rem;
  font-weight: 750;
  color: var(--text-main);
}

.part-card-what {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
}

.part-card-why {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.part-card-example {
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  font-size: 0.82rem;
  color: var(--text-main);
  border-left: 3px solid var(--gemini-purple);
  margin-top: auto;
}

/* PARTS Evolution Comparison Card */
.evolution-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  box-shadow: var(--shadow-md);
}

.evolution-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.evolution-header h3 {
  font-size: 1.3rem;
  font-weight: 800;
}

.evolution-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.evo-col {
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.evo-col.best {
  border-color: var(--primary);
  background: linear-gradient(180deg, var(--primary-light) 0%, var(--bg-card) 100%);
  box-shadow: var(--shadow-md);
  position: relative;
}

.evo-level-badge {
  font-size: 0.8rem;
  font-weight: 800;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  display: inline-flex;
  width: fit-content;
}

.evo-col:nth-child(1) .evo-level-badge {
  background: #fee2e2;
  color: #b91c1c;
}

.evo-col:nth-child(2) .evo-level-badge {
  background: #fef3c7;
  color: #b45309;
}

.evo-col.best .evo-level-badge {
  background: #dbeafe;
  color: #1d4ed8;
}

.evo-prompt-quote {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.5;
  padding: 0.6rem;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.evo-critique {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* INTERACTIVE PROMPT BUILDER */
.builder-box {
  background: var(--bg-card);
  border: 2px solid var(--gemini-purple);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: 0 10px 25px var(--gemini-glow);
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.builder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.builder-head-left h3 {
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.builder-inputs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.builder-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.builder-field label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.builder-field input, .builder-field select {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  transition: all var(--transition-fast);
}

.builder-field input:focus, .builder-field select:focus {
  border-color: var(--gemini-purple);
  box-shadow: 0 0 0 3px var(--gemini-glow);
  background: var(--bg-card);
}

.builder-result-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.builder-result-text {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-main);
  white-space: pre-wrap;
  font-weight: 500;
}

/* PROMPT CATALOG FILTERING & CARDS */
.catalog-toolbar {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.filter-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-subtle);
  margin-right: 0.5rem;
  text-transform: uppercase;
}

.filter-chip {
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-chip:hover {
  background: var(--bg-surface);
  color: var(--text-main);
}

.filter-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
  box-shadow: 0 2px 6px var(--primary-glow);
}

.prompts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.5rem;
}

.prompt-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  position: relative;
}

.prompt-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.prompt-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.prompt-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.badge-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.badge-pill.slide-ref {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.fav-btn {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-subtle);
  transition: all var(--transition-fast);
  padding: 0;
  flex-shrink: 0;
}

.fav-btn:hover {
  background: var(--bg-card);
  border-color: var(--accent-coral);
  color: var(--accent-coral);
  transform: scale(1.1);
}

.fav-btn .heart-svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.fav-btn.active {
  background: var(--accent-coral-light);
  border-color: var(--accent-coral);
  color: var(--accent-coral);
  box-shadow: 0 2px 8px rgba(234, 67, 53, 0.25);
}

.fav-btn.active .heart-svg {
  fill: var(--accent-coral);
  stroke: var(--accent-coral);
  transform: scale(1.15);
  filter: drop-shadow(0 2px 4px rgba(234, 67, 53, 0.4));
}

.prompt-card-title {
  font-size: 1.15rem;
  font-weight: 750;
  line-height: 1.35;
  color: var(--text-main);
}

.prompt-card-scenario {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* PARTS Breakdown Badges in Prompt Card */
.parts-breakdown-details {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.8rem;
  border: 1px solid var(--border-subtle);
}

.parts-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.4;
}

.parts-badge {
  font-weight: 800;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  color: white;
  font-size: 0.7rem;
  flex-shrink: 0;
}

.parts-badge.p { background: #1a73e8; }
.parts-badge.a { background: #9334e6; }
.parts-badge.r { background: #0d904f; }
.parts-badge.t { background: #e37400; }
.parts-badge.s { background: #ea4335; }

/* SLIDE BY SLIDE READER SECTION */
.deck-reader-container {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  box-shadow: var(--shadow-md);
}

.deck-controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-subtle);
}

.slide-jump-select {
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.9rem;
  outline: none;
  max-width: 380px;
}

.deck-stage {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.slide-canvas-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.slide-num-tag {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--primary);
  text-transform: uppercase;
}

.slide-canvas-title {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.3;
}

.slide-canvas-summary {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.slide-canvas-points {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.slide-point-item {
  font-size: 0.92rem;
  color: var(--text-main);
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  line-height: 1.5;
}

.slide-media-preview-box {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.slide-img-frame {
  background: #000000;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-img-frame img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

/* GEMS SHOWCASE */
.gems-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.gem-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  border-top: 4px solid var(--gemini-purple);
}

.gem-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.gem-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.gem-card-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--gemini-purple-light);
  color: var(--gemini-purple);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

/* Modal Dialogs (Favorites, Quick View, Full Image) */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  max-width: 760px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  transform: scale(0.95);
  transition: transform var(--transition-smooth);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 800;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--text-subtle);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  background: var(--bg-surface);
  color: var(--text-main);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Toast Notification */
.toast-notice {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 3000;
  background: #0f172a;
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-pill);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all var(--transition-normal);
}

.toast-notice.show {
  opacity: 1;
  transform: translateY(0);
}

/* Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-card);
  padding: 3rem 1.5rem;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-left {
  max-width: 900px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-brand-title {
  font-weight: 850;
  font-size: 1.2rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-credits {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 0.5rem;
  padding: 1.2rem 1.4rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  font-size: 0.88rem;
  line-height: 1.65;
}

.footer-credit-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.credit-icon {
  font-size: 1.05rem;
  flex-shrink: 0;
  line-height: 1.5;
}

.credit-body {
  flex: 1;
}

.footer-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--primary-hover);
}

.curator-tag {
  color: var(--primary);
  font-weight: 750;
  background: var(--primary-light);
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-pill);
  display: inline-block;
}

.curator-note {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.footer-email-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.1rem 0.55rem;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.footer-email-link:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.footer-right {
  display: flex;
  align-items: center;
}

.back-to-top-btn {
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}

.back-to-top-btn:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .hero-title {
    font-size: 2.1rem;
  }
  .deck-stage {
    grid-template-columns: 1fr;
  }
  .nav-search-wrap {
    max-width: 260px;
  }
}

@media (max-width: 768px) {
  .hero-section {
    padding: 2rem 1.5rem;
  }
  .hero-title {
    font-size: 1.75rem;
  }
  .hero-desc {
    font-size: 1rem;
  }
  .nav-search-wrap {
    display: none;
  }
  .tools-grid, .prompts-grid {
    grid-template-columns: 1fr;
  }
}

/* ===================================================================
   🎨 新粗獷潮流風 核心精髓規範 (NEO-BRUTALISM SYSTEM ENFORCEMENT)
   =================================================================== */

/* 1. 全局卡片與區塊 2.5px 黑色硬邊框與 4px 硬陰影 */
.prompt-card,
.tool-card,
.gem-card,
.portal-nav-card,
.hero-section,
.overview-card,
.roadmap-card,
.builder-box,
.deck-card,
.curriculum-col,
.parts-step,
.detail-card {
  border: 2.5px solid var(--border-subtle) !important;
  box-shadow: 4px 4px 0px var(--border-subtle) !important;
  transition: all var(--transition-fast) !important;
}

.prompt-card:hover,
.tool-card:hover,
.gem-card:hover,
.portal-nav-card:hover,
.deck-card:hover,
.curriculum-col:hover {
  transform: translate(-2px, -2px) !important;
  box-shadow: 6px 6px 0px var(--border-subtle) !important;
}

/* 2. 互動按鈕、標籤與切換器 2px 邊框與 2px 硬陰影 */
.action-chip,
.subnav-btn,
.nav-btn,
.copy-btn,
.theme-toggle-btn,
.btn-primary,
.btn-secondary,
.filter-btn {
  border: 2px solid var(--border-subtle) !important;
  box-shadow: 2px 2px 0px var(--border-subtle) !important;
  font-weight: 700 !important;
}

.action-chip:hover,
.subnav-btn:hover,
.nav-btn:hover,
.copy-btn:hover,
.filter-btn:hover {
  transform: translate(-1px, -1px) !important;
  box-shadow: 4px 4px 0px var(--border-subtle) !important;
}

.action-chip:active,
.copy-btn:active,
.subnav-btn:active {
  transform: translate(1px, 1px) !important;
  box-shadow: 1px 1px 0px var(--border-subtle) !important;
}

/* 3. 標籤膠囊 (Badges) */
.badge-pill,
.category-badge,
.pill-badge {
  border: 1.5px solid var(--border-subtle) !important;
  box-shadow: 1.5px 1.5px 0px var(--border-subtle) !important;
  font-weight: 700 !important;
}

/* 4. 頂部與次選單導覽列厚實底線 */
.navbar,
.subnav-bar {
  border-bottom: 2.5px solid var(--border-subtle) !important;
}

/* 5. 深色主題 Neo-Brutalism (純黑白線硬陰影) */
[data-theme="dark"] .prompt-card,
[data-theme="dark"] .tool-card,
[data-theme="dark"] .gem-card,
[data-theme="dark"] .portal-nav-card,
[data-theme="dark"] .hero-section,
[data-theme="dark"] .overview-card,
[data-theme="dark"] .roadmap-card,
[data-theme="dark"] .builder-box,
[data-theme="dark"] .deck-card,
[data-theme="dark"] .curriculum-col {
  border-color: #FAFAFA !important;
  box-shadow: 4px 4px 0px #FAFAFA !important;
}

[data-theme="dark"] .prompt-card:hover,
[data-theme="dark"] .tool-card:hover,
[data-theme="dark"] .gem-card:hover,
[data-theme="dark"] .portal-nav-card:hover,
[data-theme="dark"] .deck-card:hover {
  box-shadow: 6px 6px 0px #FAFAFA !important;
}

[data-theme="dark"] .action-chip,
[data-theme="dark"] .subnav-btn,
[data-theme="dark"] .nav-btn,
[data-theme="dark"] .copy-btn,
[data-theme="dark"] .theme-toggle-btn {
  border-color: #FAFAFA !important;
  box-shadow: 2px 2px 0px #FAFAFA !important;
}

[data-theme="dark"] .badge-pill {
  border-color: #FAFAFA !important;
  box-shadow: 1.5px 1.5px 0px #FAFAFA !important;
}

/* ===================================================================
   GOOGLE 官方現成 25 款 AI 提示詞專區 (OFFICIAL PROMPTS SECTION)
   =================================================================== */
.official-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  box-shadow: 1.5px 1.5px 0px var(--border-subtle);
}

.official-src-link {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s;
}

.official-src-link:hover {
  opacity: 0.8;
}

.official-tabs-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin: 1.5rem 0 1.75rem;
  padding-bottom: 0.85rem;
  border-bottom: 2px solid var(--border-subtle);
}

.official-tab-btn {
  background: var(--bg-card);
  border: 2px solid var(--border-subtle);
  box-shadow: 2px 2px 0px var(--border-subtle);
  color: var(--text-main);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.official-tab-btn:hover {
  background: var(--primary-light);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px var(--border-subtle);
}

.official-tab-btn.active {
  background: #FDE047;
  color: #000000;
  border: 2px solid var(--border-subtle);
  box-shadow: 3px 3px 0px var(--border-subtle);
  font-weight: 800;
}

.official-tab-btn .count-pill {
  font-size: 0.72rem;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  color: var(--text-main);
  font-weight: 800;
  line-height: 1.2;
}

.official-tab-btn.active .count-pill {
  background: #000000;
  color: #ffffff;
  border-color: #000000;
}

.official-prompts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.official-card {
  background: var(--bg-card);
  border: 2.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 4px 4px 0px var(--border-subtle);
  padding: 1.35rem 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-fast);
  position: relative;
}

.official-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--border-subtle);
  border-color: var(--primary);
}

.official-card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.official-cat-badge {
  font-size: 0.74rem;
  font-weight: 800;
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.official-cat-badge.planning {
  background: #e0f2fe;
  color: #0369a1;
}

.official-cat-badge.materials {
  background: #fef3c7;
  color: #b45309;
}

.official-cat-badge.assessment {
  background: #dcfce7;
  color: #15803d;
}

.official-cat-badge.admin {
  background: #f3e8ff;
  color: #7e22ce;
}

[data-theme="dark"] .official-cat-badge.planning {
  background: rgba(3, 105, 161, 0.25);
  color: #38bdf8;
}

[data-theme="dark"] .official-cat-badge.materials {
  background: rgba(180, 83, 9, 0.25);
  color: #fbbf24;
}

[data-theme="dark"] .official-cat-badge.assessment {
  background: rgba(21, 128, 61, 0.25);
  color: #4ade80;
}

[data-theme="dark"] .official-cat-badge.admin {
  background: rgba(126, 34, 206, 0.25);
  color: #c084fc;
}

.official-fav-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.2rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.official-fav-btn:hover {
  color: #ea4335;
  transform: scale(1.15);
}

.official-fav-btn.active {
  color: #ea4335;
}

.official-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.4;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}

.official-card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex: 1;
}

.official-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1.5px dashed var(--border-subtle);
}

.btn-copy-official {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  box-shadow: 1.5px 1.5px 0px var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 0.38rem 0.72rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-copy-official:hover {
  background: var(--bg-surface);
  color: var(--text-main);
  border-color: var(--text-main);
  transform: translate(-1px, -1px);
}

.btn-ask-gemini {
  background: #1a73e8;
  color: #ffffff !important;
  border: 2px solid var(--border-subtle);
  box-shadow: 2px 2px 0px var(--border-subtle);
  border-radius: var(--radius-pill);
  padding: 0.45rem 0.95rem;
  font-size: 0.85rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-ask-gemini:hover {
  background: #1557b0;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px var(--border-subtle);
  color: #ffffff;
}

.official-pro-tip-box {
  background: var(--bg-card);
  border: 2.5px solid var(--border-subtle);
  box-shadow: 4px 4px 0px var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.6rem;
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  margin-top: 2rem;
}

.official-pro-tip-box .tip-icon {
  font-size: 1.75rem;
  line-height: 1;
}

.official-pro-tip-box h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.official-pro-tip-box p {
  font-size: 0.88rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin: 0;
}

/* Dark Theme Overrides for Official Section */
[data-theme="dark"] .official-card,
[data-theme="dark"] .official-pro-tip-box {
  border-color: #FAFAFA !important;
  box-shadow: 4px 4px 0px #FAFAFA !important;
}

[data-theme="dark"] .official-card:hover {
  box-shadow: 6px 6px 0px #FAFAFA !important;
}

[data-theme="dark"] .official-tab-btn,
[data-theme="dark"] .btn-ask-gemini,
[data-theme="dark"] .btn-copy-official,
[data-theme="dark"] .official-source-badge {
  border-color: #FAFAFA !important;
  box-shadow: 2px 2px 0px #FAFAFA !important;
}

[data-theme="dark"] .official-tab-btn.active {
  background: #FDE047 !important;
  color: #000000 !important;
}



