/* ========================================================
   Copilot Prompt Hub — Main Stylesheet
   Modern, Thai-friendly, GitHub Pages ready
   ======================================================== */

/* ---------- CSS Variables ---------- */
:root {
  --ms-blue: #0078D4;
  --ms-blue-dark: #005A9E;
  --ms-blue-light: #50E6FF;
  --ms-purple: #7B61FF;
  --ms-teal: #00B4D8;
  --ms-green: #06D6A0;
  --ms-orange: #F77F00;
  --ms-red: #FF6B6B;

  --bg-primary: #0A0E1A;
  --bg-secondary: #0F1628;
  --bg-card: #141B2D;
  --bg-card-hover: #1A2340;
  --bg-input: #1A2340;

  --text-primary: #F0F4FF;
  --text-secondary: #8B9AC7;
  --text-muted: #4A5680;

  --border-color: rgba(255,255,255,0.06);
  --border-hover: rgba(0,120,212,0.4);

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.4);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 40px rgba(0,120,212,0.15);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --font-thai: 'Noto Sans Thai', sans-serif;
  --font-en: 'Inter', sans-serif;

  --header-h: 64px;
  --container-max: 1280px;

  --transition: 0.2s ease;
  --transition-slow: 0.35s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
  font-family: var(--font-thai);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul { list-style: none; }
input, textarea, select { font-family: inherit; }

/* ---------- Container ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-thai);
  font-weight: 700;
  line-height: 1.3;
}

.gradient-text {
  background: linear-gradient(135deg, var(--ms-blue-light) 0%, var(--ms-blue) 50%, var(--ms-purple) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================
   HEADER
   ============================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(10, 14, 26, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
}

.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon { display: flex; }

.logo-text {
  font-size: 1rem;
  color: var(--text-secondary);
  white-space: nowrap;
}
.logo-text strong { color: var(--text-primary); font-weight: 700; }

.header-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav-link {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: all var(--transition);
  white-space: nowrap;
}
.nav-link:hover { color: var(--text-primary); background: var(--bg-card); }

.nav-github {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}
.nav-github:hover { border-color: var(--ms-blue); color: var(--ms-blue-light); }

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  margin-left: auto;
}
.mobile-menu-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all var(--transition);
}

.mobile-nav {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 24px;
  z-index: 99;
  flex-direction: column;
  gap: 4px;
}
.mobile-nav.open { display: flex; }
.mobile-nav-link {
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--text-secondary);
  transition: all var(--transition);
}
.mobile-nav-link:hover { color: var(--text-primary); background: var(--bg-card); }

/* ============================
   HERO
   ============================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 100px 24px 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 64px;
  max-width: var(--container-max);
  margin: 0 auto;
  min-height: 620px;
}

.hero-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.12;
}
.shape-1 {
  width: 600px; height: 600px;
  background: var(--ms-blue);
  top: -200px; left: -200px;
}
.shape-2 {
  width: 400px; height: 400px;
  background: var(--ms-purple);
  top: 100px; right: -100px;
}
.shape-3 {
  width: 300px; height: 300px;
  background: var(--ms-teal);
  bottom: -100px; left: 40%;
}

.hero-content {
  flex: 1;
  max-width: 600px;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,120,212,0.12);
  border: 1px solid rgba(0,120,212,0.3);
  color: var(--ms-blue-light);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 24px;
  letter-spacing: 0.02em;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.hero-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  line-height: 1.8;
}
.hero-desc strong { color: var(--text-primary); font-weight: 600; }

/* Search */
.hero-search { margin-bottom: 40px; }
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 16px;
  color: var(--text-muted);
  pointer-events: none;
  flex-shrink: 0;
}

.search-input {
  width: 100%;
  padding: 14px 48px 14px 48px;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all var(--transition);
  outline: none;
}
.search-input::placeholder { color: var(--text-muted); }
.search-input:focus {
  border-color: var(--ms-blue);
  box-shadow: 0 0 0 3px rgba(0,120,212,0.15), var(--shadow-glow);
  background: var(--bg-card);
}

.search-clear {
  position: absolute;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  color: var(--text-muted);
  transition: all var(--transition);
}
.search-clear:hover { background: var(--bg-card-hover); color: var(--text-primary); }

.search-results-count {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-left: 4px;
}

/* Stats */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-num {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--ms-blue-light), var(--ms-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 2px;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}
.stat-num--official { color: var(--ms-blue-light); }
.stat-divider {
  width: 1px; height: 40px;
  background: var(--border-color);
}

/* Hero Visual */
.hero-visual {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.copilot-card-preview {
  width: 340px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}
.preview-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.preview-dot.red { background: #FF5F57; }
.preview-dot.yellow { background: #FEBC2E; }
.preview-dot.green { background: #28C840; }
.preview-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 6px;
}

.preview-body { padding: 16px; display: flex; flex-direction: column; gap: 12px; }

.preview-msg {
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.5;
}
.preview-msg.user {
  background: rgba(0,120,212,0.15);
  border: 1px solid rgba(0,120,212,0.2);
  color: var(--ms-blue-light);
  align-self: flex-end;
  max-width: 90%;
}
.preview-msg.bot {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
}
.bot-icon {
  flex-shrink: 0;
  width: 24px; height: 24px;
  background: rgba(0,120,212,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.bot-text { font-size: 0.8rem; }
.bot-text strong { color: var(--text-primary); display: block; margin-bottom: 4px; }

/* Typing dots animation */
.typing-dots { display: inline-flex; gap: 3px; align-items: center; }
.typing-dots span {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--ms-blue);
  animation: typing 1.4s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing {
  0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

/* ============================
   FILTER SECTION
   ============================ */
.filter-section {
  padding: 48px 0 0;
  position: sticky;
  top: var(--header-h);
  z-index: 50;
  background: var(--bg-primary);
}

.filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.view-toggle {
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  padding: 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}
.view-btn {
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: var(--text-muted);
  transition: all var(--transition);
}
.view-btn:hover { color: var(--text-primary); }
.view-btn.active {
  background: rgba(0,120,212,0.15);
  color: var(--ms-blue-light);
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  border: 1.5px solid var(--border-color);
  color: var(--text-secondary);
  background: var(--bg-card);
  transition: all var(--transition);
  white-space: nowrap;
}
.pill:hover {
  border-color: var(--ms-blue);
  color: var(--text-primary);
  background: rgba(0,120,212,0.08);
}
.pill.active {
  background: rgba(0,120,212,0.15);
  border-color: rgba(0,120,212,0.5);
  color: var(--ms-blue-light);
}
.pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 100px;
  background: rgba(255,255,255,0.08);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
}

/* ============================
   PROMPTS GRID
   ============================ */
.prompts-section { padding: 32px 0 80px; }

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

.prompts-grid.list-view {
  grid-template-columns: 1fr;
}

/* Prompt Card */
.prompt-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  cursor: pointer;
  transition: all var(--transition-slow);
  position: relative;
  overflow: hidden;
}
.prompt-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0,120,212,0.03) 0%, transparent 60%);
  opacity: 0;
  transition: opacity var(--transition-slow);
}
.prompt-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.prompt-card:hover::before { opacity: 1; }

.card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

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

.card-meta {
  flex: 1;
  min-width: 0;
}

.card-category {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 4px;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-prompt-preview {
  background: rgba(0,0,0,0.25);
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-family: var(--font-en);
  line-height: 1.5;
  position: relative;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.tag {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255,255,255,0.05);
}

.card-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.btn-icon {
  width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--text-muted);
  transition: all var(--transition);
  background: transparent;
}
.btn-icon:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text-primary);
}
.btn-icon.copy:hover { color: var(--ms-blue-light); }
.btn-icon.expand:hover { color: var(--ms-teal); }

.card-difficulty {
  display: flex;
  align-items: center;
  gap: 3px;
}
.diff-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--text-muted);
}
.diff-dot.filled { background: var(--ms-blue); }

/* List view card */
.prompts-grid.list-view .prompt-card {
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
}
.prompts-grid.list-view .card-top { flex-shrink: 0; width: 280px; }
.prompts-grid.list-view .card-prompt-preview { flex: 1; }
.prompts-grid.list-view .card-footer { flex-direction: column; align-items: flex-end; }

/* No Results */
.no-results {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-muted);
}
.no-results svg { margin: 0 auto 16px; opacity: 0.3; }
.no-results h3 { font-size: 1.1rem; color: var(--text-secondary); margin-bottom: 8px; }
.no-results p { font-size: 0.9rem; margin-bottom: 20px; }
.btn-reset {
  padding: 8px 20px;
  background: rgba(0,120,212,0.15);
  border: 1px solid rgba(0,120,212,0.3);
  border-radius: var(--radius-sm);
  color: var(--ms-blue-light);
  font-size: 0.875rem;
  transition: all var(--transition);
}
.btn-reset:hover { background: rgba(0,120,212,0.25); }

/* ============================
   SECTION SHARED
   ============================ */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(123,97,255,0.1);
  border: 1px solid rgba(123,97,255,0.25);
  color: #A78BFA;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 16px;
  letter-spacing: 0.04em;
}
.section-desc {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-top: 12px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ============================
   AGENTS SECTION
   ============================ */
.agents-section {
  padding: 80px 0;
  background: var(--bg-secondary);
}

.agents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 24px;
}

.agent-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-slow);
  cursor: pointer;
}
.agent-card:hover {
  border-color: rgba(123,97,255,0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(123,97,255,0.1);
}

.agent-card-header {
  padding: 20px 24px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 1px solid var(--border-color);
}

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

.agent-name {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.agent-role {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.agent-card-body { padding: 16px 24px 20px; }

.agent-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 14px;
}

.agent-instruction-preview {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(123,97,255,0.1);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-en);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  position: relative;
}

.agent-card-footer {
  padding: 12px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.agent-capabilities {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.capability-tag {
  font-size: 0.7rem;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(123,97,255,0.08);
  color: #A78BFA;
  border: 1px solid rgba(123,97,255,0.15);
}

/* ============================
   TIPS SECTION
   ============================ */
.tips-section {
  padding: 80px 0;
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.tip-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition-slow);
}
.tip-card:hover {
  border-color: rgba(255,255,255,0.1);
  background: var(--bg-card-hover);
}

.tip-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--tip-color) 12%, transparent);
  color: var(--tip-color);
  margin-bottom: 16px;
}

.tip-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.tip-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}

.tip-example {
  background: rgba(0,0,0,0.25);
  border-radius: var(--radius-sm);
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.04);
}
.tip-ex-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.tip-example code {
  font-size: 0.8rem;
  color: var(--ms-blue-light);
  font-family: var(--font-en);
  line-height: 1.5;
}

/* ============================
   CTA SECTION
   ============================ */
.cta-section { padding: 0 0 80px; }

.cta-card {
  background: linear-gradient(135deg, #0a1628 0%, #0d1a38 50%, #0f1f40 100%);
  border: 1px solid rgba(0,120,212,0.2);
  border-radius: var(--radius-xl);
  padding: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  position: relative;
  overflow: hidden;
}
.cta-bg-shape {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 20% 50%, rgba(0,120,212,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.cta-content { position: relative; flex: 1; }
.cta-content h2 { font-size: 1.75rem; margin-bottom: 12px; }
.cta-content p { color: var(--text-secondary); font-size: 1rem; margin-bottom: 28px; }

.cta-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--ms-blue);
  color: white;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
}
.btn-primary:hover { background: var(--ms-blue-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,120,212,0.4); }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: transparent;
  color: var(--text-secondary);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
}
.btn-secondary:hover { border-color: var(--text-secondary); color: var(--text-primary); }

.cta-illustration { flex-shrink: 0; }

/* ============================
   FOOTER
   ============================ */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-tagline {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 12px 0 20px;
  line-height: 1.6;
}

.footer-social { display: flex; gap: 8px; }
.social-link {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: all var(--transition);
}
.social-link:hover { border-color: var(--ms-blue); color: var(--ms-blue-light); }

.footer-links h4 {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.footer-links ul { display: flex; flex-direction: column; gap: 8px; }
.footer-links li a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-links li a:hover { color: var(--text-primary); }

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.footer-disclaimer { opacity: 0.6; }
.footer-contributor { opacity: 0.8; font-size: 0.85rem; margin-top: 4px; }
.footer-contributor a { color: inherit; text-decoration: underline; }
.footer-contributor a:hover { opacity: 0.7; }

/* ============================
   COMPARE PLANS SECTION
   ============================ */
.compare-section {
  padding: 80px 0;
  background: var(--bg-secondary);
}

.compare-tabs {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.compare-tab {
  padding: 10px 22px;
  border-radius: 50px;
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.compare-tab:hover { border-color: var(--accent); color: var(--accent); }
.compare-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.compare-table-wrap {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.compare-table thead th {
  padding: 0;
  background: var(--bg-card);
  border-bottom: 2px solid var(--border);
  vertical-align: top;
}

.compare-table .feat-col {
  width: 38%;
  padding: 16px 20px;
  text-align: left;
  font-size: 0.82rem;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.plan-hd {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 20px;
  gap: 4px;
  position: relative;
}

.plan-hd.popular { background: rgba(0,120,212,0.06); }

.popular-badge {
  position: absolute;
  top: -1px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 0 0 8px 8px;
  letter-spacing: 0.05em;
}

.plan-icon-big { font-size: 1.8rem; margin-bottom: 4px; }
.plan-name { font-size: 0.95rem; font-weight: 700; color: var(--text-primary); }
.plan-price { font-size: 0.8rem; color: var(--text-secondary); margin-top: 2px; }
.plan-link {
  margin-top: 8px;
  font-size: 0.78rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.plan-link:hover { text-decoration: underline; }

.compare-table tbody tr { transition: background 0.15s; }
.compare-table tbody tr:hover { background: var(--bg-hover); }

.compare-table tbody td {
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-primary);
}

.feat-group td {
  background: var(--bg-secondary);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
}

.compare-table .v {
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
}
.compare-table .v.yes { color: #22c55e; }
.compare-table .v.no { color: var(--text-muted); opacity: 0.4; }
.compare-table .v.partial { color: #f59e0b; }

/* highlight column when tab is active */
.compare-table .plan-col { transition: background 0.2s; }
.compare-table.focus-free .plan-paid,
.compare-table.focus-free .plan-studio { opacity: 0.35; }
.compare-table.focus-paid .plan-free,
.compare-table.focus-paid .plan-studio { opacity: 0.35; }
.compare-table.focus-studio .plan-free,
.compare-table.focus-studio .plan-paid { opacity: 0.35; }

.compare-table td[data-plan],
.compare-table th[data-plan] { transition: opacity 0.2s; }
.compare-table.focus-free td[data-plan="paid"],
.compare-table.focus-free td[data-plan="studio"],
.compare-table.focus-free th[data-plan="paid"],
.compare-table.focus-free th[data-plan="studio"] { opacity: 0.3; }
.compare-table.focus-paid td[data-plan="free"],
.compare-table.focus-paid td[data-plan="studio"],
.compare-table.focus-paid th[data-plan="free"],
.compare-table.focus-paid th[data-plan="studio"] { opacity: 0.3; }
.compare-table.focus-studio td[data-plan="free"],
.compare-table.focus-studio td[data-plan="paid"],
.compare-table.focus-studio th[data-plan="free"],
.compare-table.focus-studio th[data-plan="paid"] { opacity: 0.3; }

.compare-note {
  margin-top: 20px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  opacity: 0.75;
}

/* ============================
   MODAL
   ============================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(6px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.open { display: flex; }

.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 680px;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  animation: modalIn var(--transition-slow) ease;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
  position: sticky;
  top: 16px;
  float: right;
  margin: 16px 16px 0 0;
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
  transition: all var(--transition);
  z-index: 1;
}
.modal-close:hover { background: rgba(255,255,255,0.12); color: var(--text-primary); }

.modal-content { padding: 32px; clear: both; }

.modal-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.modal-desc {
  font-size: 0.925rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  line-height: 1.7;
}

.modal-section { margin-bottom: 24px; }
.modal-section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.modal-prompt-box {
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--text-primary);
  white-space: pre-wrap;
  position: relative;
}

.modal-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: rgba(0,120,212,0.15);
  border: 1px solid rgba(0,120,212,0.3);
  border-radius: var(--radius-sm);
  color: var(--ms-blue-light);
  font-size: 0.83rem;
  font-weight: 600;
  margin-top: 10px;
  transition: all var(--transition);
  width: 100%;
  justify-content: center;
}
.modal-copy-btn:hover { background: rgba(0,120,212,0.25); }
.modal-copy-btn.copied { background: rgba(6,214,160,0.15); border-color: rgba(6,214,160,0.3); color: var(--ms-green); }

.modal-output-box {
  background: rgba(6,214,160,0.04);
  border: 1px solid rgba(6,214,160,0.12);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 0.88rem;
  line-height: 1.75;
  color: var(--text-secondary);
  white-space: pre-wrap;
}

.modal-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.modal-tag {
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  color: var(--text-secondary);
  border: 1px solid rgba(255,255,255,0.06);
}

.modal-difficulty {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.difficulty-bar {
  display: flex;
  gap: 3px;
}
.difficulty-seg {
  width: 20px; height: 6px;
  border-radius: 3px;
  background: var(--bg-secondary);
}
.difficulty-seg.filled { background: var(--ms-blue); }

/* ============================
   TOAST
   ============================ */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--ms-green);
  color: #003d2e;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 100px;
  font-size: 0.875rem;
  font-weight: 600;
  z-index: 1000;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(6,214,160,0.3);
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ============================
   BACK TO TOP
   ============================ */
.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px; height: 44px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition);
  z-index: 50;
}
.back-to-top.visible { opacity: 1; pointer-events: all; }
.back-to-top:hover { background: var(--bg-card-hover); color: var(--text-primary); border-color: var(--ms-blue); }

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 1024px) {
  .hero { flex-direction: column; text-align: center; padding: 80px 24px 60px; gap: 40px; }
  .hero-stats { justify-content: center; }
  .hero-visual { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta-card { flex-direction: column; text-align: center; padding: 48px; }
  .cta-illustration { display: none; }
  .cta-buttons { justify-content: center; }
  .agents-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .header-nav { display: none; }
  .mobile-menu-btn { display: flex; }
  .prompts-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .tips-grid { grid-template-columns: 1fr; }
  .filter-section { position: static; }
  .cta-card { padding: 32px 24px; }
  .modal-content { padding: 24px; }
  .prompts-grid.list-view .prompt-card { flex-direction: column; }
  .prompts-grid.list-view .card-top { width: 100%; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 1.75rem; }
  .category-pills { gap: 6px; }
  .pill { padding: 5px 12px; font-size: 0.8rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

/* ============================
   SOURCE BADGE
   ============================ */
.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 4px;
  line-height: 1.4;
}
.source-badge.official {
  background: rgba(0,120,212,0.12);
  color: var(--ms-blue-light);
  border: 1px solid rgba(0,120,212,0.25);
}
.source-badge.official svg { color: var(--ms-blue-light); }

/* Official card highlight */
.prompt-card.is-official {
  border-color: rgba(0,120,212,0.15);
}
.prompt-card.is-official:hover {
  border-color: rgba(0,120,212,0.45);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(0,120,212,0.12);
}

/* Official strip at top of card */
.card-official-strip {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--ms-blue), var(--ms-blue-light));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* Source section in modal */
.modal-source-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(0,120,212,0.06);
  border: 1px solid rgba(0,120,212,0.12);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}
.modal-source-row a {
  font-size: 0.8rem;
  color: var(--ms-blue-light);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.modal-source-row a:hover { color: white; }

/* ============================
   SCROLLBAR
   ============================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.12); }

/* ============================
   SELECTION
   ============================ */
::selection { background: rgba(0,120,212,0.3); color: white; }

/* ============================
   FOCUS VISIBLE
   ============================ */
:focus-visible {
  outline: 2px solid var(--ms-blue);
  outline-offset: 2px;
}
