/* ==============================================================================
   WinCMD - Ultra High-Performance Pure Black Design System
   Engineered for 1GB RAM & low-spec machines (Zero GPU blur overhead, 60fps)
   ============================================================================== */

:root {
  /* True Pure Black Theme */
  --bg-pure-black: #000000;
  --bg-header: #08090d;
  --bg-card: #0c0d12;
  --bg-card-hover: #13151d;
  --bg-input: #101117;
  --bg-pill: #101117;
  --bg-pill-hover: #191b24;
  
  /* Borders (Solid, High-Contrast, Zero-Blur) */
  --border-subtle: #1c1e27;
  --border-card: #1f212c;
  --border-card-hover: rgba(96, 205, 255, 0.45);
  
  /* Typography Colors */
  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  
  /* Windows 11 Signature Accents */
  --win-blue: #0078d4;
  --win-blue-hover: #0086f0;
  --win-cyan: #60cdff;
  --win-green: #10b981;
  
  /* Keyboard Keys */
  --kbd-bg: #14161f;
  --kbd-border: #2a2d3d;
  --kbd-text: #60cdff;
  
  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-pill: 9999px;
  
  /* Fonts */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Base Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-pure-black);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-pure-black);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom Sleek Dark Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #000000;
}
::-webkit-scrollbar-thumb {
  background: #27272a;
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: #3f3f46;
}

/* ==============================================================================
   Header (Lightweight Solid Dark Acrylic)
   ============================================================================== */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.9);
  padding: 1.6rem 1.5rem 1.25rem;
}

.header-container {
  max-width: 1050px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.logo-area {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.45rem;
}

/* Authentic Windows Logo Container */
.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #0078d4, #00bcf2);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(0, 120, 212, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand h1 {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  background: linear-gradient(135deg, #ffffff 40%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge {
  font-size: 0.74rem;
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: 500;
  background: rgba(0, 120, 212, 0.16);
  color: #60cdff;
  border: 1px solid rgba(0, 120, 212, 0.35);
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
}

.subtitle {
  color: var(--text-secondary);
  font-size: 0.94rem;
  max-width: 680px;
  margin: 0 auto 1.15rem;
}

/* ==============================================================================
   Search & Deterministic Agent Input Box
   ============================================================================== */
.search-wrapper {
  position: relative;
  max-width: 680px;
  margin: 0 auto 0.75rem;
}

.search-icon {
  position: absolute;
  left: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

#search {
  width: 100%;
  padding: 0.85rem 3rem 0.85rem 3.2rem;
  font-size: 0.98rem;
  background-color: var(--bg-input);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

#search::placeholder {
  color: #52525b;
}

#search:focus {
  border-color: var(--win-cyan);
  background-color: #14161f;
  box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.25);
}

.clear-btn {
  position: absolute;
  right: 1.15rem;
  top: 50%;
  transform: translateY(-50%);
  background: #1f212d;
  border: 1px solid #2d3040;
  color: var(--text-secondary);
  font-size: 0.85rem;
  cursor: pointer;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
}

.clear-btn:hover {
  background: #2d3040;
  color: #ffffff;
}

/* Quick Ask Chips (Deterministic Agent shortcuts) */
.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin-bottom: 1.15rem;
}

.prompts-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-right: 0.2rem;
}

.prompt-chip {
  background: #11131a;
  border: 1px solid #232634;
  color: #94a3b8;
  font-size: 0.76rem;
  padding: 0.22rem 0.65rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.12s ease;
}

.prompt-chip:hover {
  background: #1c202c;
  border-color: var(--win-cyan);
  color: #ffffff;
}

/* ==============================================================================
   Category Filter Tabs
   ============================================================================== */
.categories {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
}

.cat-pill {
  background-color: var(--bg-pill);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.12s ease;
}

.pill-icon {
  display: inline-block;
  flex-shrink: 0;
  stroke: currentColor;
}

.cat-pill:hover {
  background-color: var(--bg-pill-hover);
  color: #ffffff;
  border-color: #2e3242;
}

/* Saved Pill */
.cat-pill.fav-pill {
  border-color: rgba(96, 205, 255, 0.25);
  background: rgba(0, 120, 212, 0.1);
  color: #60cdff;
}

.cat-pill.fav-pill:hover {
  background: rgba(0, 120, 212, 0.2);
  color: #ffffff;
}

.cat-pill.fav-pill.active {
  background: #0078d4;
  color: #ffffff;
  border-color: #60cdff;
}

/* Highlighted Tabs */
.cat-pill.highlight-pill {
  border-color: rgba(0, 188, 242, 0.25);
  background: rgba(0, 120, 212, 0.08);
  color: #7dd3fc;
}

.cat-pill.highlight-pill:hover {
  background: rgba(0, 120, 212, 0.18);
  color: #ffffff;
}

.cat-pill.active {
  background: #0078d4;
  color: #ffffff;
  border-color: #60cdff;
  font-weight: 600;
}

/* ==============================================================================
   Main Content & Status Bar
   ============================================================================== */
.main-container {
  max-width: 1050px;
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 3rem;
  flex: 1;
  position: relative;
  z-index: 1;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.15rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #181920;
}

#result-count {
  font-weight: 500;
  color: var(--text-secondary);
}

.hint {
  display: none;
}
@media (min-width: 640px) {
  .hint {
    display: inline;
  }
}

/* ==============================================================================
   Deterministic Agent Direct Response Card
   ============================================================================== */
.agent-panel {
  background: #0d0f16;
  border: 1px solid rgba(0, 188, 242, 0.4);
  border-radius: var(--radius-md);
  padding: 1.2rem 1.35rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
  position: relative;
}

.agent-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.agent-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--win-cyan);
  background: rgba(0, 120, 212, 0.16);
  border: 1px solid rgba(0, 188, 242, 0.3);
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
}

.agent-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.agent-close-btn:hover {
  color: #ffffff;
}

.agent-intent {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.4rem;
}

.agent-explanation {
  font-size: 0.88rem;
  color: #cbd5e1;
  line-height: 1.48;
  margin-bottom: 0.85rem;
}

.agent-command-box {
  background: #06070a;
  border: 1px solid #202434;
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.agent-code {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--win-cyan);
  word-break: break-all;
}

.agent-note {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ==============================================================================
   Command Grid & High-Speed Cards (Zero GPU Lag, 60fps)
   ============================================================================== */
.command-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 0.95rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.05rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  cursor: pointer;
  content-visibility: auto;
  contain-intrinsic-size: 0 145px;
  transition: transform 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}

.card:hover {
  transform: translateY(-2px);
  background: var(--bg-card-hover);
  border-color: var(--border-card-hover);
}

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

.card-cat {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--win-cyan);
  background: rgba(0, 120, 212, 0.14);
  border: 1px solid rgba(0, 188, 242, 0.22);
  padding: 0.16rem 0.5rem;
  border-radius: var(--radius-sm);
}

/* Card Actions (Bookmark & Copy) */
.card-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.action-btn {
  background-color: #161822;
  color: #d4d4d8;
  border: 1px solid #272a3b;
  padding: 0.3rem 0.65rem;
  font-size: 0.76rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.12s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.action-btn:hover {
  background-color: var(--win-blue);
  color: #ffffff;
  border-color: var(--win-cyan);
}

/* Bookmark Button */
.bookmark-btn {
  padding: 0.3rem 0.42rem;
  color: #71717a;
}

.bookmark-btn:hover {
  background-color: rgba(0, 120, 212, 0.25);
  color: var(--win-cyan);
  border-color: rgba(96, 205, 255, 0.4);
}

.bookmark-btn.bookmarked {
  background-color: rgba(0, 120, 212, 0.25);
  color: var(--win-cyan);
  border-color: rgba(96, 205, 255, 0.5);
}

.bookmark-btn.bookmarked svg {
  fill: currentColor;
}

/* Copy Button */
.copy-btn.copied {
  background-color: var(--win-green);
  color: #ffffff;
  border-color: #34d399;
}

/* Command Display */
.command-code {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 600;
  word-break: break-word;
  color: var(--win-cyan);
  margin-bottom: 0.55rem;
}

.command-code code {
  font-family: inherit;
  color: inherit;
  background: transparent;
}

/* Keycaps (<kbd>) */
.kbd-key {
  display: inline-block;
  padding: 0.18rem 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--kbd-text);
  background: var(--kbd-bg);
  border: 1px solid var(--kbd-border);
  border-radius: 4px;
  margin: 0 0.15rem;
}

.shortcut-sep {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin: 0 0.15rem;
}

.card-desc {
  color: #cbd5e1;
  font-size: 0.86rem;
  line-height: 1.45;
  margin-bottom: 0.75rem;
}

.card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.55rem;
  border-top: 1px solid #181a24;
}

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

.tag {
  font-size: 0.68rem;
  color: var(--text-muted);
  background-color: #12141c;
  border: 1px solid #202330;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.tag:hover {
  background-color: rgba(0, 120, 212, 0.35);
  border-color: rgba(96, 205, 255, 0.4);
  color: #ffffff;
}

/* Highlight search text */
mark {
  background-color: rgba(234, 179, 8, 0.25);
  color: #fef08a;
  padding: 0 0.15rem;
  border-radius: 2px;
}

/* Scroll Sentinel */
.scroll-sentinel {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Empty State */
.no-results {
  text-align: center;
  padding: 4.5rem 1rem;
  color: var(--text-secondary);
}

.no-results-icon {
  margin-bottom: 1.25rem;
  display: flex;
  justify-content: center;
  color: var(--text-muted);
}

.no-results-icon svg {
  stroke: var(--text-muted);
}

.no-results h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 0.45rem;
}

.no-results code {
  background-color: #12141c;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  color: var(--win-cyan);
  font-family: var(--font-mono);
  border: 1px solid #202330;
}

.hidden {
  display: none !important;
}

/* Footer */
.footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.85rem;
  color: var(--text-muted);
  background-color: var(--bg-header);
  position: relative;
  z-index: 1;
}
