@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@400;500;600;700&family=Rajdhani:wght@500;600;700&family=Share+Tech+Mono&display=swap');

:root {
  --cp-yellow: #fcee0a;
  --cp-yellow-glow: rgba(252, 238, 10, 0.35);
  --cp-red: #ff003c;
  --cp-red-glow: rgba(255, 0, 60, 0.4);
  --cp-cyan: #00f0ff;
  --cp-cyan-glow: rgba(0, 240, 255, 0.35);
  --cp-bg: #07090d;
  --cp-bg-alt: #0d1017;
  --cp-card-bg: rgba(16, 20, 29, 0.85);
  --cp-card-hover: rgba(24, 30, 44, 0.95);
  --cp-border: rgba(252, 238, 10, 0.2);
  --cp-border-active: #fcee0a;
  --cp-text: #f0f4fc;
  --cp-text-muted: #7c8ba1;
  --cp-text-dim: #505c6e;
  
  --font-ui: 'Rajdhani', sans-serif;
  --font-mono: 'Share Tech Mono', monospace;
  --font-display: 'Chakra Petch', sans-serif;

  --header-height: 64px;
}

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

body {
  background-color: var(--cp-bg);
  color: var(--cp-text);
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  height: 100vh;
  overflow: hidden;
  position: relative;
  user-select: none;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(252, 238, 10, 0.03) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(0, 240, 255, 0.03) 0%, transparent 40%),
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
}

/* CRT Scanline Overlay */
.scanlines {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%, 
    rgba(0, 0, 0, 0.25) 50%
  );
  background-size: 100% 4px;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.scanlines.off {
  opacity: 0;
}

/* App Grid Container */
.app-container {
  display: grid;
  grid-template-rows: var(--header-height) 1fr;
  height: 100vh;
  width: 100vw;
  position: relative;
  z-index: 1;
}

/* TOP NAVBAR */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: rgba(11, 14, 20, 0.95);
  border-bottom: 2px solid var(--cp-border);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
  position: relative;
  z-index: 100;
  gap: 12px;
}

.topbar::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 140px;
  height: 2px;
  background: var(--cp-yellow);
  box-shadow: 0 0 10px var(--cp-yellow);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.brand-badge {
  background: var(--cp-yellow);
  color: #000;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 1.2px;
  padding: 2px 6px;
  clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 5px, 100% 100%, 5px 100%, 0 calc(100% - 5px));
  line-height: 1.3;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.brand-title span {
  color: var(--cp-yellow);
  text-shadow: 0 0 10px var(--cp-yellow-glow);
}

.brand-version {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--cp-cyan);
  border: 1px solid rgba(0, 240, 255, 0.3);
  padding: 1px 5px;
  border-radius: 2px;
  text-shadow: 0 0 6px var(--cp-cyan-glow);
  white-space: nowrap;
  line-height: 1.3;
}

/* Mode Switch Group */
.mode-switch-group {
  display: flex;
  align-items: center;
  background: rgba(14, 18, 27, 0.95);
  border: 1px solid rgba(252, 238, 10, 0.3);
  border-radius: 2px;
  overflow: hidden;
  margin-left: 4px;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
  flex-shrink: 0;
}

.mode-btn {
  background: transparent;
  border: none;
  color: var(--cp-text-muted);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
  outline: none;
}

.mode-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.mode-btn.active {
  background: var(--cp-yellow);
  color: #000;
  box-shadow: 0 0 14px var(--cp-yellow-glow);
}

.mode-btn.active .mode-badge {
  background: #000;
  color: var(--cp-yellow);
}

.mode-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 6px;
  border-radius: 2px;
  color: var(--cp-cyan);
}

.mode-key-hint {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cp-yellow);
  background: rgba(252, 238, 10, 0.12);
  border: 1px solid rgba(252, 238, 10, 0.35);
  padding: 2px 7px;
  border-radius: 2px;
  margin-left: 8px;
  letter-spacing: 0.5px;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(252, 238, 10, 0.15);
  display: flex;
  align-items: center;
  user-select: none;
  animation: pulse-key-hint 3s infinite ease-in-out;
}

@keyframes pulse-key-hint {
  0%, 100% {
    border-color: rgba(252, 238, 10, 0.35);
    box-shadow: 0 0 8px rgba(252, 238, 10, 0.15);
  }
  50% {
    border-color: rgba(0, 240, 255, 0.6);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.3);
    color: var(--cp-cyan);
  }
}

/* Screen Flash when Inventory / 'I' key is triggered */
.inventory-open-flash {
  animation: cp2077-inv-surge 0.4s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

@keyframes cp2077-inv-surge {
  0% {
    filter: brightness(1.7) contrast(1.3) hue-rotate(20deg);
    transform: scale(0.998);
  }
  25% {
    filter: brightness(1.3) contrast(1.15) drop-shadow(0 0 20px rgba(252, 238, 10, 0.4));
  }
  100% {
    filter: none;
    transform: scale(1);
  }
}


/* Search Bar in Topbar */
.search-container {
  flex: 1;
  max-width: 480px;
  margin: 0 16px;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--cp-yellow);
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: rgba(16, 21, 31, 0.85);
  border: 1px solid rgba(252, 238, 10, 0.3);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 9px 42px 9px 38px;
  border-radius: 2px;
  outline: none;
  transition: all 0.25s ease;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}

.search-input:focus {
  border-color: var(--cp-yellow);
  box-shadow: 0 0 14px var(--cp-yellow-glow), inset 0 0 10px rgba(252, 238, 10, 0.1);
  background: rgba(20, 27, 40, 0.95);
}

.search-input::placeholder {
  color: var(--cp-text-muted);
}

.search-shortcut {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cp-text-muted);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 1px 5px;
  border-radius: 2px;
}

/* Actions in Topbar */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-hud {
  background: rgba(20, 25, 36, 0.8);
  border: 1px solid rgba(252, 238, 10, 0.3);
  color: var(--cp-text);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 7px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  clip-path: polygon(0 0, calc(100% - 6px) 0, 100% 6px, 100% 100%, 6px 100%, 0 calc(100% - 6px));
}

.btn-hud:hover {
  background: var(--cp-yellow);
  color: #000;
  border-color: var(--cp-yellow);
  box-shadow: 0 0 12px var(--cp-yellow-glow);
  transform: translateY(-1px);
}

.btn-hud.active {
  background: rgba(252, 238, 10, 0.15);
  border-color: var(--cp-yellow);
  color: var(--cp-yellow);
}

.btn-random {
  background: rgba(255, 0, 60, 0.15);
  border-color: rgba(255, 0, 60, 0.5);
  color: #ff4d6d;
}

.btn-random:hover {
  background: var(--cp-red);
  color: #fff;
  border-color: var(--cp-red);
  box-shadow: 0 0 14px var(--cp-red-glow);
}

/* MAIN CONTENT WORKSPACE */
.main-workspace {
  display: grid;
  grid-template-columns: 310px 420px 1fr;
  height: calc(100vh - var(--header-height));
  overflow: hidden;
  position: relative;
}

/* 1. LEFT SIDEBAR: CATEGORIES */
.sidebar-categories {
  background: rgba(9, 12, 18, 0.95);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-header {
  padding: 14px 18px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--cp-yellow);
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(14, 18, 27, 0.5);
}

.panel-counter {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cp-cyan);
}

.quick-filter-group {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(12, 16, 24, 0.3);
}

.quick-filter-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--cp-text);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  padding: 7px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s;
}

.quick-filter-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--cp-yellow);
}

.quick-filter-btn.active {
  background: rgba(252, 238, 10, 0.12);
  border-color: rgba(252, 238, 10, 0.4);
  color: var(--cp-yellow);
  border-left: 3px solid var(--cp-yellow);
}

.quick-filter-btn .badge {
  font-family: var(--font-mono);
  font-size: 11px;
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 7px;
  border-radius: 2px;
  color: var(--cp-text-muted);
}

.quick-filter-btn.active .badge {
  background: var(--cp-yellow);
  color: #000;
  font-weight: 700;
}

.categories-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--cp-text);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s ease;
  text-align: left;
}

.category-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--cp-cyan);
  border-left: 2px solid var(--cp-cyan);
  padding-left: 14px;
}

.category-item.active {
  background: rgba(0, 240, 255, 0.1);
  border-color: rgba(0, 240, 255, 0.35);
  border-left: 3px solid var(--cp-cyan);
  color: var(--cp-cyan);
}

.category-item .cat-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 210px;
}

.category-item .cat-count {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cp-text-dim);
}

.category-item.active .cat-count {
  color: var(--cp-cyan);
  font-weight: 700;
}

/* 2. MIDDLE COLUMN: SHARD LIST */
.sidebar-shards {
  background: rgba(12, 15, 22, 0.95);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.shards-toolbar {
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cp-text-muted);
}

.sort-select {
  background: rgba(18, 22, 32, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--cp-text);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 8px;
  outline: none;
  border-radius: 2px;
  cursor: pointer;
}

.sort-select option {
  background: #11141c;
  color: #fff;
}

.shards-scroll-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Shard Card */
.shard-card {
  background: var(--cp-card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.shard-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: transparent;
  transition: background 0.2s;
}

.shard-card:hover {
  background: var(--cp-card-hover);
  border-color: rgba(252, 238, 10, 0.4);
  transform: translateX(3px);
}

.shard-card:hover::before {
  background: var(--cp-yellow);
}

.shard-card.active {
  background: rgba(28, 35, 50, 0.95);
  border-color: var(--cp-yellow);
  box-shadow: 0 0 16px rgba(252, 238, 10, 0.2);
}

.shard-card.active::before {
  background: var(--cp-yellow);
}

.shard-card.read {
  opacity: 0.85;
}

.shard-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.shard-category-tag {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--cp-cyan);
  background: rgba(0, 240, 255, 0.1);
  padding: 2px 6px;
  border-radius: 2px;
}

.shard-meta-badges {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cp-yellow);
  box-shadow: 0 0 6px var(--cp-yellow);
}

.status-dot.read {
  background: var(--cp-text-dim);
  box-shadow: none;
}

.star-btn {
  background: transparent;
  border: none;
  color: var(--cp-text-dim);
  cursor: pointer;
  padding: 2px 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  outline: none;
}

.star-btn .hud-icon {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  transition: all 0.2s;
}

.star-btn:hover,
.star-btn.fav {
  color: var(--cp-yellow);
  transform: scale(1.18);
  filter: drop-shadow(0 0 6px var(--cp-yellow));
}

.star-btn.fav .hud-icon {
  fill: var(--cp-yellow);
}

.shard-card-title {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shard-card-snippet {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cp-text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* 3. RIGHT COLUMN: SHARD READER */
.reader-workspace {
  background: rgba(8, 10, 15, 0.98);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

/* Terminal Scan Header */
.reader-header {
  padding: 24px 36px 18px 36px;
  border-bottom: 2px solid var(--cp-border);
  background: rgba(14, 18, 27, 0.6);
  position: relative;
}

.reader-header::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: 0;
  width: 140px;
  height: 2px;
  background: var(--cp-cyan);
  box-shadow: 0 0 10px var(--cp-cyan);
}

.reader-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cp-cyan);
  margin-bottom: 10px;
}

.reader-breadcrumbs span {
  color: var(--cp-text-dim);
}

.reader-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.reader-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  letter-spacing: 1px;
  text-shadow: 0 0 14px rgba(255, 255, 255, 0.1);
  word-break: break-word;
}

.reader-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.reader-meta-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cp-text-muted);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.meta-item strong {
  color: var(--cp-yellow);
}

/* Reader Body (Text Canvas) */
.reader-content-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 36px 44px;
  font-family: var(--font-mono);
  font-size: 16px;
  line-height: 1.75;
  color: var(--cp-text);
  white-space: pre-wrap;
  word-wrap: break-word;
  user-select: text;
}

.reader-content-scroll.font-sm { font-size: 14px; }
.reader-content-scroll.font-md { font-size: 16px; }
.reader-content-scroll.font-lg { font-size: 19px; }

/* Empty state */
.empty-reader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--cp-text-dim);
  text-align: center;
  gap: 16px;
}

.empty-icon {
  font-size: 48px;
  color: var(--cp-yellow);
  opacity: 0.6;
}

.empty-text {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Reader Footer (Pagination) */
.reader-footer {
  padding: 12px 36px;
  background: rgba(11, 14, 21, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.reader-nav-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--cp-text);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 6px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 2px;
  transition: all 0.2s;
}

.reader-nav-btn:hover:not(:disabled) {
  background: var(--cp-yellow);
  color: #000;
  border-color: var(--cp-yellow);
}

.reader-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* Custom Cyberpunk Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(10, 12, 17, 0.8);
}

::-webkit-scrollbar-thumb {
  background: rgba(252, 238, 10, 0.3);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--cp-yellow);
  box-shadow: 0 0 10px var(--cp-yellow);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
  pointer-events: none;
}

.toast {
  background: rgba(14, 18, 27, 0.95);
  border: 1px solid var(--cp-yellow);
  color: #fff;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  padding: 10px 18px;
  box-shadow: 0 0 18px var(--cp-yellow-glow);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastIn {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .main-workspace {
    grid-template-columns: 260px 340px 1fr;
  }
}

/* =========================================
   CYBERPUNK HUD SVG ICONS SYSTEM
   ========================================= */
.hud-icon {
  width: 15px;
  height: 15px;
  display: inline-block;
  vertical-align: -2px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.2s, fill 0.2s, filter 0.2s, transform 0.2s;
}

.hud-icon-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hud-icon-star {
  width: 14px;
  height: 14px;
}

.hud-icon-warning {
  width: 34px;
  height: 34px;
  stroke: var(--cp-yellow);
  display: block;
  margin: 0 auto 12px auto;
  filter: drop-shadow(0 0 10px var(--cp-yellow-glow));
}

.empty-icon-svg {
  width: 64px;
  height: 64px;
  display: block;
  margin-bottom: 8px;
  filter: drop-shadow(0 0 12px var(--cp-yellow-glow));
  opacity: 0.85;
}

.quick-filter-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.cat-label-wrap {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cat-icon {
  width: 13px;
  height: 13px;
  stroke: var(--cp-cyan);
  opacity: 0.75;
  flex-shrink: 0;
  transition: all 0.2s;
}

.category-item:hover .cat-icon,
.category-item.active .cat-icon {
  opacity: 1;
  stroke: var(--cp-yellow);
  filter: drop-shadow(0 0 5px var(--cp-yellow-glow));
}

/* =========================================
   CYBER AMBIENT AUDIO DECK
   ========================================= */
.cyber-audio-deck {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2px;
}

.btn-ambient {
  background: rgba(14, 20, 28, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.35);
  color: var(--cp-text);
  padding: 6px 12px;
  gap: 10px;
  transition: all 0.25s ease;
}

.btn-ambient:hover {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--cp-cyan);
  color: #fff;
  box-shadow: 0 0 12px var(--cp-cyan-glow);
}

.btn-ambient.playing {
  background: rgba(0, 240, 255, 0.12);
  border-color: var(--cp-cyan);
  color: var(--cp-cyan);
  box-shadow: 0 0 14px var(--cp-cyan-glow);
}

.btn-deck-settings {
  padding: 7px 8px;
  background: rgba(14, 20, 28, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.35);
  border-left: none;
}

.btn-deck-settings:hover {
  background: rgba(0, 240, 255, 0.2);
  border-color: var(--cp-cyan);
  color: #fff;
}

.deck-title {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* EQ Animating Bars */
.deck-eq-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  width: 14px;
}

.eq-bar {
  flex: 1;
  background: var(--cp-cyan);
  height: 100%;
  transform-origin: bottom;
  transform: scaleY(0.25);
  border-radius: 1px;
  transition: transform 0.2s;
}

.btn-ambient.playing .eq-bar:nth-child(1) {
  animation: eqBounce 0.8s ease-in-out infinite alternate;
}
.btn-ambient.playing .eq-bar:nth-child(2) {
  animation: eqBounce 0.6s ease-in-out infinite alternate 0.2s;
}
.btn-ambient.playing .eq-bar:nth-child(3) {
  animation: eqBounce 0.9s ease-in-out infinite alternate 0.4s;
}
.btn-ambient.playing .eq-bar:nth-child(4) {
  animation: eqBounce 0.7s ease-in-out infinite alternate 0.1s;
}

@keyframes eqBounce {
  0% { transform: scaleY(0.2); }
  50% { transform: scaleY(1); }
  100% { transform: scaleY(0.35); }
}

/* Popover Console */
.deck-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 390px;
  background: rgba(10, 14, 22, 0.98);
  border: 1px solid var(--cp-cyan);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.85), 0 0 15px rgba(0, 240, 255, 0.2);
  backdrop-filter: blur(14px);
  z-index: 1000;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  display: none;
  animation: toastIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.deck-popover.open {
  display: block;
}

.popover-header {
  padding: 10px 14px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--cp-cyan);
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 240, 255, 0.05);
}

.popover-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  background: rgba(0, 240, 255, 0.15);
  color: var(--cp-cyan);
  padding: 1px 6px;
  border-radius: 2px;
}

.popover-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.deck-source-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
}

.deck-tab {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--cp-text-muted);
  font-family: var(--font-display);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 7px 4px;
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.deck-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.deck-tab.active {
  background: var(--cp-cyan);
  color: #000;
  border-color: var(--cp-cyan);
  box-shadow: 0 0 10px var(--cp-cyan-glow);
}

.deck-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* CP2077 Authentic SFX Soundboard Grid */
.sfx-soundboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 4px;
}

.sfx-soundboard-grid::-webkit-scrollbar {
  width: 4px;
}

.sfx-soundboard-grid::-webkit-scrollbar-thumb {
  background: var(--cp-cyan);
  border-radius: 2px;
}

.sfx-chip-btn {
  background: rgba(18, 24, 35, 0.85);
  border: 1px solid rgba(0, 240, 255, 0.2);
  color: var(--cp-text);
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 6px 8px;
  border-radius: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
  text-align: left;
}

.sfx-chip-btn:hover {
  background: rgba(0, 240, 255, 0.15);
  border-color: var(--cp-cyan);
  color: #fff;
  transform: translateX(2px);
  box-shadow: 0 0 8px rgba(0, 240, 255, 0.25);
}

.sfx-chip-btn:active {
  background: var(--cp-yellow);
  color: #000;
  border-color: var(--cp-yellow);
  box-shadow: 0 0 12px var(--cp-yellow-glow);
}

.sfx-chip-icon {
  width: 12px;
  height: 12px;
  color: var(--cp-yellow);
  flex-shrink: 0;
}

.deck-row-label {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--cp-text-muted);
  letter-spacing: 1px;
}

.deck-select {
  width: 100%;
  background: rgba(16, 21, 31, 0.9);
  border: 1px solid rgba(0, 240, 255, 0.3);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.deck-select:focus {
  border-color: var(--cp-cyan);
}

.local-track-name {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cp-text-dim);
  padding: 6px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 2px;
  word-break: break-all;
}

.deck-slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.slider-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cp-text-muted);
}

.cp-slider {
  flex: 1;
  accent-color: var(--cp-cyan);
  cursor: pointer;
}

.slider-val {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--cp-cyan);
  width: 32px;
  text-align: right;
}

/* Responsive Topbar & Brand Adjustments */
@media (max-width: 1200px) {
  .search-container {
    max-width: 340px;
    margin: 0 10px;
  }
}

@media (max-width: 992px) {
  .brand-badge {
    display: none;
  }
  .search-container {
    max-width: 260px;
  }
}


