* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
}

svg {
  max-width: 100%;
  overflow: hidden;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
    sans-serif;
  margin: 0;
  padding: 0;
  background: #f5f5f5;
  color: #333;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  width: 100%;
  overflow: hidden;
}

header {
  background: #2c3e50;
  color: white;
  padding: 16px 20px;
  margin-bottom: 20px;
  overflow: hidden;
  width: 100%;
}

header .container {
  display: flex;
  align-items: center;
  max-width: 100%;
  overflow: hidden;
}

header .header-content {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 1 0%;
  min-width: 0;
  overflow: hidden;
}

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

header .nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  font-size: 0.9em;
  transition: background 0.2s;
}

header .nav-item:hover {
  background: rgba(255, 255, 255, 0.2);
}

header .nav-item.active {
  background: rgba(255, 255, 255, 0.25);
}

header .nav-item.nav-link {
  text-decoration: none;
}

header .nav-badge {
  background: #4caf50;
  color: white;
  padding: 2px 7px;
  border-radius: 10px;
  font-size: 0.75em;
  font-weight: bold;
}

header .nav-badge.running {
  background: #2196f3;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

header .logo {
  width: 63px;
  height: 63px;
  border-radius: 10px;
  object-fit: contain;
  cursor: pointer;
  transition: transform 0.15s ease;
}

header .logo:hover {
  transform: scale(1.05);
}

.read-only-badge {
  background: #ff9800;
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.75em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

header h1 {
  margin: 0;
  font-size: 1.6em;
  font-weight: 600;
  letter-spacing: -0.5px;
}

.layout {
  display: flex;
  gap: 20px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.sidebar {
  width: 280px;
  min-width: 280px;
  max-width: 280px;
  flex: 0 0 280px;
}

.main {
  flex: 1 1 0%;
  min-width: 0;
  max-width: calc(100% - 300px);
  overflow: hidden;
}

@media (max-width: 700px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    flex: 0 0 auto;
  }

  .main {
    max-width: 100%;
  }
}

/* Home Page Styles */
.home-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
}

.home-hero {
  text-align: center;
  margin-bottom: 50px;
}

.home-logo {
  width: 120px;
  height: 120px;
  margin-bottom: 20px;
  border-radius: 10px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.15));
}

.home-title {
  font-size: 2.5em;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 10px 0;
  letter-spacing: -1px;
}

.home-tagline {
  font-size: 1.1em;
  color: #666;
  margin: 0;
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  width: 100%;
  max-width: 900px;
  margin-bottom: 40px;
}

.stat-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 24px 20px;
  text-align: center;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.stat-value {
  font-size: 2.2em;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.95em;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.stat-languages {
  font-size: 0.8em;
  color: #888;
  margin-top: 8px;
  line-height: 1.4;
}

.home-hint {
  text-align: center;
  color: #666;
  font-size: 1em;
  background: white;
  padding: 20px 30px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.home-hint p {
  margin: 0;
}

@media (max-width: 800px) {
  .home-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .home-stats {
    grid-template-columns: 1fr;
  }

  .home-logo {
    width: 80px;
    height: 80px;
  }

  .home-title {
    font-size: 1.8em;
  }
}

.card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 16px;
  margin-bottom: 16px;
}

.card h2 {
  margin-top: 0;
  font-size: 1.2em;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.project-item {
  padding: 10px;
  border-radius: 4px;
  cursor: pointer;
  margin-bottom: 8px;
  border: 1px solid #e0e0e0;
}

.project-item:hover {
  background: #f0f7ff;
}

.project-item.active {
  background: #e3f2fd;
  border-color: #2196f3;
}

.project-name {
  font-weight: bold;
  margin-bottom: 4px;
}

.project-meta {
  font-size: 0.85em;
  color: #666;
}

.search-box {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.search-box input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.search-box button {
  padding: 10px 20px;
  background: #2196f3;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.search-box button:hover {
  background: #1976d2;
}

.function-list {
  max-height: 400px;
  overflow-y: auto;
}

.function-item {
  padding: 10px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
}

.function-item:hover {
  background: #f5f5f5;
}

.function-item:last-child {
  border-bottom: none;
}

.function-name {
  font-family: monospace;
  font-weight: bold;
  color: #1976d2;
  display: flex;
  align-items: center;
  gap: 8px;
}

.entity-type-badge {
  display: inline-block;
  padding: 2px 6px;
  font-size: 0.7em;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 3px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.entity-type-badge.type-function {
  background: #e3f2fd;
  color: #1565c0;
}

.entity-type-badge.type-class {
  background: #f3e5f5;
  color: #7b1fa2;
}

.entity-type-badge.type-struct {
  background: #fff3e0;
  color: #e65100;
}

.entity-type-badge.type-interface {
  background: #e8f5e9;
  color: #2e7d32;
}

.entity-type-badge.type-enum {
  background: #fce4ec;
  color: #c2185b;
}

.language-badge {
  display: inline-block;
  padding: 1px 5px;
  font-size: 0.75em;
  font-weight: 500;
  text-transform: lowercase;
  border-radius: 3px;
  margin-right: 6px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f5f5f5;
  color: #616161;
}

.language-badge.lang-javascript,
.language-badge.lang-js {
  background: #fff8e1;
  color: #f57c00;
}

.language-badge.lang-typescript,
.language-badge.lang-ts {
  background: #e3f2fd;
  color: #1976d2;
}

.language-badge.lang-python,
.language-badge.lang-py {
  background: #e8f5e9;
  color: #388e3c;
}

.language-badge.lang-java {
  background: #ffebee;
  color: #d32f2f;
}

.language-badge.lang-go {
  background: #e0f7fa;
  color: #00838f;
}

.language-badge.lang-rust {
  background: #fff3e0;
  color: #e65100;
}

.language-badge.lang-c {
  background: #eceff1;
  color: #455a64;
}

.language-badge.lang-cpp,
.language-badge.lang-c\+\+ {
  background: #e8eaf6;
  color: #3949ab;
}

.language-badge.lang-ruby {
  background: #fce4ec;
  color: #c2185b;
}

.language-badge.lang-php {
  background: #ede7f6;
  color: #5e35b1;
}

.function-location {
  font-size: 0.85em;
  color: #666;
  margin-top: 4px;
}

.class-members-list {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
}

.class-members-list .member-item {
  border-bottom: 1px solid #f0f0f0;
}

.class-members-list .member-item:last-child {
  border-bottom: none;
}

.member-return-type {
  color: #7b1fa2;
  font-family: monospace;
  margin-left: 8px;
}

.detail-section {
  margin-bottom: 16px;
}

.detail-section h3 {
  margin: 0 0 10px 0;
  font-size: 1em;
  color: #555;
}

.code-block {
  background: #263238;
  color: #aed581;
  padding: 16px;
  border-radius: 4px;
  overflow-x: auto;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.code-block-wrapper {
  border-radius: 4px;
  overflow: hidden;
}

.code-block-wrapper pre {
  margin: 0;
  padding: 0;
}

.code-block-wrapper code {
  display: block;
  padding: 16px;
  overflow-x: auto;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 13px;
  line-height: 1.5;
  tab-size: 4;
}

/* Override highlight.js background to ensure consistency */
.code-block-wrapper code.hljs {
  padding: 16px;
}

.comment-block {
  background: #fff8e1;
  padding: 12px;
  border-radius: 4px;
  border-left: 4px solid #ffc107;
  font-style: italic;
  white-space: pre-wrap;
}

.caller-callee-item {
  padding: 8px;
  border-bottom: 1px solid #eee;
  font-family: monospace;
  font-size: 0.9em;
  cursor: pointer;
}

.caller-callee-item:hover {
  background: #f5f5f5;
}

.caller-callee-item:last-child {
  border-bottom: none;
}

.tabs {
  display: flex;
  border-bottom: 2px solid #e0e0e0;
  margin-bottom: 16px;
}

.tab {
  padding: 10px 20px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  color: #666;
}

.tab:hover {
  color: #333;
}

.tab.active {
  border-bottom-color: #2196f3;
  color: #2196f3;
  font-weight: bold;
}

.file-list {
  max-height: 400px;
  overflow-y: auto;
}

.file-item {
  padding: 10px;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.file-item:hover {
  background: #f5f5f5;
}

.file-item.active {
  background: #e3f2fd;
}

.file-item:last-child {
  border-bottom: none;
}

.file-item.directory-item {
  background: #fafafa;
}

.file-item.directory-item:hover {
  background: #f0f0f0;
}

.folder-icon {
  margin-right: 6px;
}

.directory-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: #f5f5f5;
  border-radius: 4px;
  font-size: 0.9em;
  flex-wrap: wrap;
}

.directory-breadcrumb .breadcrumb-item.clickable {
  color: #1976d2;
  cursor: pointer;
}

.directory-breadcrumb .breadcrumb-item.clickable:hover {
  text-decoration: underline;
}

.directory-breadcrumb .breadcrumb-separator {
  color: #999;
}

.file-list-more {
  padding: 15px;
  text-align: center;
  border-top: 1px solid #eee;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.file-list-more .btn-link {
  background: none;
  border: none;
  color: #1976d2;
  cursor: pointer;
  padding: 8px 16px;
}

.file-list-more .btn-link:hover {
  text-decoration: underline;
}

.badge {
  background: #e3f2fd;
  color: #1976d2;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.85em;
}

.empty-state {
  text-align: center;
  padding: 40px;
  color: #999;
}

.loading {
  text-align: center;
  padding: 20px;
  color: #666;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 0.9em;
}

.breadcrumb-item {
  color: #1976d2;
  cursor: pointer;
}

.breadcrumb-item:hover {
  text-decoration: underline;
}

.breadcrumb-separator {
  color: #999;
}

.breadcrumb-current {
  color: #666;
}

.btn-secondary {
  padding: 8px 16px;
  background: #f5f5f5;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  margin-right: 8px;
}

.btn-secondary:hover {
  background: #e0e0e0;
}

.btn-primary {
  padding: 8px 16px;
  background: #2196f3;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  margin-right: 8px;
}

.btn-primary:hover {
  background: #1976d2;
}

.action-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

/* Call Graph Styles */
.graph-container {
  width: 100%;
  height: 600px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: #fafafa;
  position: relative;
  overflow: hidden;
}

.graph-svg {
  width: 100%;
  height: 100%;
}

.graph-node {
  cursor: pointer;
}

.graph-node circle {
  stroke-width: 2px;
  transition: all 0.2s;
}

.graph-node:hover circle {
  stroke-width: 3px;
  filter: brightness(1.1);
}

.graph-node.root circle {
  stroke: #e91e63;
  fill: #fce4ec;
}

.graph-node.selected circle {
  stroke: #ff5722;
  stroke-width: 4px;
}

.graph-node text {
  font-family: monospace;
  font-size: 11px;
  pointer-events: none;
}

.graph-link {
  fill: none;
  stroke: #999;
  stroke-opacity: 0.6;
  stroke-width: 1.5px;
}

.graph-link.highlighted {
  stroke: #2196f3;
  stroke-opacity: 1;
  stroke-width: 2.5px;
}

.graph-arrow {
  fill: #999;
}

.node-info-panel {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 320px;
  max-height: calc(100% - 20px);
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  z-index: 10;
}

.node-info-header {
  background: #2c3e50;
  color: white;
  padding: 12px 16px;
  font-weight: bold;
  font-family: monospace;
}

.node-info-body {
  padding: 16px;
  max-height: 400px;
  overflow-y: auto;
}

.node-info-row {
  margin-bottom: 12px;
}

.node-info-label {
  font-size: 0.8em;
  color: #666;
  margin-bottom: 4px;
}

.node-info-value {
  font-family: monospace;
  font-size: 0.9em;
}

.node-info-source {
  background: #263238;
  color: #aed581;
  padding: 10px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 11px;
  max-height: 150px;
  overflow: auto;
  white-space: pre-wrap;
}

.graph-controls {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 8px;
  z-index: 10;
}

.graph-controls button {
  padding: 6px 12px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.graph-controls button:hover {
  background: #f5f5f5;
}

.graph-controls .fullscreen-btn {
  margin-left: auto;
  background: #1976d2;
  color: white;
  border-color: #1976d2;
}

.graph-controls .fullscreen-btn:hover {
  background: #1565c0;
}

/* Fullscreen mode for graph containers */
.graph-container.fullscreen,
.flowchart-container.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  border-radius: 0;
  border: none;
  background: white;
}

.graph-container.fullscreen .graph-controls,
.flowchart-container.fullscreen .graph-controls {
  top: 20px;
  left: 20px;
  right: 20px;
  justify-content: flex-start;
}

.graph-container.fullscreen .fullscreen-btn,
.flowchart-container.fullscreen .fullscreen-btn {
  position: absolute;
  right: 0;
  background: #d32f2f;
  border-color: #d32f2f;
}

.graph-container.fullscreen .fullscreen-btn:hover,
.flowchart-container.fullscreen .fullscreen-btn:hover {
  background: #c62828;
}

.graph-container.fullscreen .node-info-panel,
.flowchart-container.fullscreen .flowchart-info-panel {
  top: 70px;
  right: 20px;
}

.graph-legend {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: white;
  padding: 10px;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  font-size: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.legend-item:last-child {
  margin-bottom: 0;
}

.legend-circle {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid;
}

/* Graph View Selector */
.graph-view-selector {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
}

.view-tabs {
  display: flex;
  gap: 4px;
  background: #e0e0e0;
  padding: 4px;
  border-radius: 6px;
}

.view-tab {
  padding: 8px 16px;
  border: none;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #666;
  transition: all 0.2s;
}

.view-tab:hover {
  background: rgba(255, 255, 255, 0.5);
  color: #333;
}

.view-tab.active {
  background: white;
  color: #1976d2;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.depth-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

.depth-selector label {
  font-size: 13px;
  color: #666;
}

.depth-selector select {
  padding: 6px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  background: white;
  cursor: pointer;
}

.depth-selector select:focus {
  outline: none;
  border-color: #2196f3;
}

/* Tree Layout Styles */
.tree-link {
  fill: none;
  stroke: #999;
  stroke-opacity: 0.6;
  stroke-width: 1.5px;
}

.tree-node {
  cursor: pointer;
}

.tree-node circle {
  transition: all 0.2s;
}

.tree-node:hover circle {
  stroke-width: 3px;
  filter: brightness(1.1);
}

.tree-node.selected circle {
  stroke-width: 4px;
  filter: drop-shadow(0 0 4px rgba(33, 150, 243, 0.5));
}

.tree-node text {
  font-family: monospace;
  font-size: 11px;
  fill: #333;
}

.tree-node.truncated text {
  fill: #ff9800;
}

.tree-node.loop text {
  fill: #9c27b0;
}

.tree-node.not-found text {
  fill: #999;
  font-style: italic;
}

.node-status {
  font-size: 14px;
  font-weight: bold;
}

/* Complexity Styles */
.complexity-card {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.complexity-card h3 {
  margin: 0 0 12px 0;
  font-size: 1em;
  color: #555;
}

.complexity-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.complexity-metric {
  text-align: center;
  padding: 12px;
  background: white;
  border-radius: 6px;
  border: 1px solid #e0e0e0;
}

.complexity-metric .value {
  font-size: 1.5em;
  font-weight: bold;
  color: #333;
}

.complexity-metric .label {
  font-size: 0.8em;
  color: #666;
  margin-top: 4px;
}

.complexity-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85em;
  font-weight: 500;
}

.complexity-low {
  background: #e8f5e9;
  color: #2e7d32;
}

.complexity-moderate {
  background: #fff3e0;
  color: #ef6c00;
}

.complexity-high {
  background: #ffebee;
  color: #c62828;
}

.entity-type-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.entity-type-breakdown .entity-type-badge {
  padding: 4px 10px;
  font-size: 0.85em;
}

.top-complex-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.top-complex-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 4px;
  cursor: pointer;
}

.top-complex-item:hover {
  background: #e3f2fd;
}

.top-complex-item .symbol {
  font-family: monospace;
  font-weight: 500;
}

.top-complex-item .metrics {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9em;
  color: #666;
}

.clickable-path {
  font-family: monospace;
}

.clickable-path .path-segment {
  color: #1976d2;
  cursor: pointer;
}

.clickable-path .path-segment:hover {
  text-decoration: underline;
}

.clickable-path .filename-segment {
  color: #333;
}

.complexity-very_high {
  background: #f3e5f5;
  color: #7b1fa2;
}

.complexity-distribution {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 12px;
}

.complexity-distribution .segment {
  height: 100%;
  transition: width 0.3s;
}

.complexity-distribution .segment-low {
  background: #4caf50;
}

.complexity-distribution .segment-moderate {
  background: #ff9800;
}

.complexity-distribution .segment-high {
  background: #f44336;
}

.complexity-distribution .segment-very_high {
  background: #9c27b0;
}

.complexity-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.complexity-inline .metric {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85em;
  color: #666;
}

.complexity-inline .metric .value {
  font-weight: bold;
  color: #333;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal {
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow: hidden;
}

.modal-header {
  background: #2c3e50;
  color: white;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.1em;
}

.modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 1.5em;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0.8;
}

.modal-close:hover {
  opacity: 1;
}

.modal-body {
  padding: 20px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: #333;
}

.form-group input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.form-group input:focus {
  outline: none;
  border-color: #2196f3;
  box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.form-group .hint {
  font-size: 0.85em;
  color: #666;
  margin-top: 6px;
}

.modal-footer {
  padding: 16px 20px;
  background: #f5f5f5;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.read-only-message {
  text-align: center;
  padding: 20px;
}

.read-only-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.read-only-message p {
  margin: 8px 0;
  color: #555;
  line-height: 1.5;
}

.read-only-message p:first-of-type {
  font-size: 1.1em;
  color: #333;
}

.btn-import {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #4caf50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}

.btn-import:hover {
  background: #43a047;
}

.btn-refresh {
  padding: 4px 10px;
  background: #ff9800;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.btn-refresh:hover {
  background: #f57c00;
}

.btn-refresh:disabled,
.btn-import:disabled,
.btn-delete:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-delete {
  padding: 4px 10px;
  background: #f44336;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.btn-delete:hover {
  background: #d32f2f;
}

.btn-danger {
  padding: 8px 16px;
  background: #f44336;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.btn-danger:hover {
  background: #d32f2f;
}

.project-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* Delete confirmation modal styles */
.modal-confirm {
  max-width: 450px;
}

.delete-warning {
  text-align: center;
  padding: 10px 0;
}

.delete-warning-icon {
  font-size: 48px;
  color: #f44336;
  margin-bottom: 16px;
}

.delete-warning p {
  margin: 12px 0;
  line-height: 1.5;
}

.delete-warning-text {
  color: #666;
  font-size: 14px;
}

.delete-warning-note {
  color: #888;
  font-size: 13px;
  font-style: italic;
}

.error-message {
  background: #ffebee;
  color: #c62828;
  padding: 10px 12px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 0.9em;
}

.success-message {
  background: #e8f5e9;
  color: #2e7d32;
  padding: 10px 12px;
  border-radius: 4px;
  margin-bottom: 16px;
  font-size: 0.9em;
}

/* Job Queue Styles */
.job-queue-panel {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 360px;
  max-height: 400px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  z-index: 100;
  overflow: hidden;
}

.job-queue-header {
  background: #2c3e50;
  color: white;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.job-queue-header h3 {
  margin: 0;
  font-size: 0.95em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.job-queue-badge {
  background: #4caf50;
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.8em;
}

.job-queue-badge.running {
  background: #2196f3;
}

.job-queue-toggle {
  background: none;
  border: none;
  color: white;
  font-size: 1.2em;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.job-queue-body {
  max-height: 300px;
  overflow-y: auto;
  padding: 0;
}

.job-item {
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
}

.job-item:last-child {
  border-bottom: none;
}

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

.job-item-type {
  font-weight: 600;
  font-size: 0.9em;
  text-transform: capitalize;
}

.job-item-name {
  font-weight: 500;
  font-size: 0.9em;
  color: #333;
}

.job-item-status {
  font-size: 0.75em;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
}

.job-item-status.queued {
  background: #fff3e0;
  color: #ef6c00;
}

.job-item-status.running {
  background: #e3f2fd;
  color: #1976d2;
}

.job-item-status.completed {
  background: #e8f5e9;
  color: #2e7d32;
}

.job-item-status.failed {
  background: #ffebee;
  color: #c62828;
}

.job-item-meta {
  font-size: 0.8em;
  color: #666;
  margin-bottom: 6px;
}

.job-progress-bar {
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  overflow: hidden;
}

.job-progress-fill {
  height: 100%;
  background: #2196f3;
  transition: width 0.3s;
}

.job-progress-fill.completed {
  background: #4caf50;
}

.job-progress-fill.failed {
  background: #f44336;
}

.job-item-error {
  font-size: 0.8em;
  color: #c62828;
  margin-top: 6px;
  word-break: break-word;
}

.job-queue-empty {
  padding: 20px;
  text-align: center;
  color: #999;
  font-size: 0.9em;
}

.job-queue-stats {
  padding: 10px 16px;
  background: #f5f5f5;
  font-size: 0.8em;
  color: #666;
  display: flex;
  justify-content: space-between;
}

.job-queue-minimized {
  width: auto;
  max-height: none;
}

.job-queue-minimized .job-queue-body,
.job-queue-minimized .job-queue-stats {
  display: none;
}

/* Jobs View Styles */
.job-stats-summary {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
}

.job-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 24px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.job-stat-value {
  font-size: 1.8em;
  font-weight: bold;
  color: #333;
}

.job-stat-label {
  font-size: 0.85em;
  color: #666;
  margin-top: 4px;
}

.job-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.job-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px;
  background: white;
}

.job-card-running {
  border-left: 4px solid #2196f3;
  background: #f8fbff;
}

.job-card-queued {
  border-left: 4px solid #ff9800;
  background: #fffdf8;
}

.job-card-completed {
  border-left: 4px solid #4caf50;
}

.job-card-failed {
  border-left: 4px solid #f44336;
  background: #fffafa;
}

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

.job-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.job-type-badge {
  background: #e3f2fd;
  color: #1976d2;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: 600;
  text-transform: uppercase;
}

.job-name {
  font-weight: 600;
  font-size: 1.1em;
  color: #333;
}

.job-status-badge {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: 500;
  text-transform: uppercase;
}

.job-status-badge.queued {
  background: #fff3e0;
  color: #e65100;
}

.job-status-badge.running {
  background: #e3f2fd;
  color: #1565c0;
}

.job-status-badge.completed {
  background: #e8f5e9;
  color: #2e7d32;
}

.job-status-badge.failed {
  background: #ffebee;
  color: #c62828;
}

.job-card-details {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
  font-size: 0.9em;
}

.job-detail {
  display: flex;
  gap: 6px;
}

.job-detail-label {
  color: #666;
}

.job-detail-value {
  color: #333;
  word-break: break-all;
}

.job-progress-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eee;
}

.job-progress-text {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 8px;
}

.job-progress-bar-large {
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
}

.job-progress-fill-large {
  height: 100%;
  background: linear-gradient(90deg, #2196f3, #64b5f6);
  transition: width 0.3s;
}

.job-error-section {
  margin-top: 12px;
  padding: 12px;
  background: #ffebee;
  border-radius: 6px;
}

.job-error-title {
  font-weight: 600;
  color: #c62828;
  margin-bottom: 6px;
}

.job-error-message {
  font-size: 0.9em;
  color: #b71c1c;
  font-family: monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Control Flow Flowchart Styles */
.flowchart-container {
  width: 100%;
  height: 600px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background: #fafafa;
  position: relative;
  overflow: hidden;
}

.flowchart-svg {
  width: 100%;
  height: 100%;
}

/* Flowchart shapes */
.flowchart-shape-oval {
  fill: #e8f5e9;
  stroke: #4caf50;
  stroke-width: 2px;
}

.flowchart-shape-rect {
  fill: #e3f2fd;
  stroke: #2196f3;
  stroke-width: 2px;
}

.flowchart-shape-diamond {
  fill: #fff8e1;
  stroke: #ffc107;
  stroke-width: 2px;
}

.flowchart-shape-hexagon {
  fill: #f3e5f5;
  stroke: #9c27b0;
  stroke-width: 2px;
}

.flowchart-shape-return {
  fill: #ffebee;
  stroke: #f44336;
  stroke-width: 2px;
}

.flowchart-node {
  cursor: default;
}

.flowchart-node:hover .flowchart-shape-oval,
.flowchart-node:hover .flowchart-shape-rect,
.flowchart-node:hover .flowchart-shape-diamond,
.flowchart-node:hover .flowchart-shape-hexagon,
.flowchart-node:hover .flowchart-shape-return {
  stroke-width: 3px;
  filter: brightness(1.05);
}

.flowchart-label {
  font-family: monospace;
  font-size: 11px;
  fill: #333;
  pointer-events: none;
}

.flowchart-edge {
  fill: none;
  stroke: #666;
  stroke-width: 1.5px;
}

.flowchart-edge-label {
  font-size: 10px;
  fill: #666;
  font-style: italic;
}

.flowchart-line-number {
  font-size: 9px;
  fill: #999;
}

/* Flowchart Legend */
.flowchart-legend {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: white;
  padding: 12px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-size: 12px;
}

.flowchart-legend .legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.flowchart-legend .legend-item:last-child {
  margin-bottom: 0;
}

.legend-shape {
  width: 24px;
  height: 16px;
  border-width: 2px;
  border-style: solid;
}

.legend-oval {
  background: #e8f5e9;
  border-color: #4caf50;
  border-radius: 8px;
}

.legend-rect {
  background: #e3f2fd;
  border-color: #2196f3;
}

.legend-diamond {
  background: #fff8e1;
  border-color: #ffc107;
  transform: rotate(45deg) scale(0.7);
  width: 16px;
  height: 16px;
}

.legend-hexagon {
  background: #f3e5f5;
  border-color: #9c27b0;
  clip-path: polygon(10% 0%, 90% 0%, 100% 50%, 90% 100%, 10% 100%, 0% 50%);
}

.legend-return {
  background: #ffebee;
  border-color: #f44336;
  border-radius: 4px;
}

/* Flowchart Info Panel */
.flowchart-info-panel {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 400px;
  max-height: calc(100% - 20px);
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  z-index: 10;
}

.flowchart-info-header {
  background: #2c3e50;
  color: white;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.flowchart-info-type {
  background: rgba(255, 255, 255, 0.2);
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.85em;
  text-transform: capitalize;
}

.flowchart-info-line {
  font-size: 0.85em;
  opacity: 0.8;
}

.flowchart-info-close {
  margin-left: auto;
  background: none;
  border: none;
  color: white;
  font-size: 1.4em;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  opacity: 0.7;
}

.flowchart-info-close:hover {
  opacity: 1;
}

.flowchart-info-body {
  padding: 14px;
  max-height: 400px;
  overflow-y: auto;
}

.flowchart-info-label {
  font-family: monospace;
  font-size: 0.9em;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 4px;
  margin-bottom: 12px;
  word-break: break-word;
}

.flowchart-info-source {
  background: #263238;
  border-radius: 4px;
  overflow: hidden;
}

.flowchart-info-source pre {
  margin: 0;
  padding: 12px;
  color: #aed581;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 12px;
  line-height: 1.5;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Autocomplete Search Styles */
.search-box-autocomplete {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.autocomplete-wrapper {
  flex: 1;
  position: relative;
}

.autocomplete-wrapper input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.autocomplete-wrapper input:focus {
  outline: none;
  border-color: #2196f3;
  box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
}

.autocomplete-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.highlighted {
  background: #f0f7ff;
}

.autocomplete-name {
  font-family: monospace;
  font-weight: 500;
  color: #1976d2;
  font-size: 13px;
}

.autocomplete-location {
  font-size: 11px;
  color: #666;
  margin-top: 2px;
}

.autocomplete-project {
  color: #9c27b0;
  font-weight: 500;
}

.result-project {
  color: #9c27b0;
  font-weight: 500;
}

/* Entity type badges for search results */
.entity-type-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  margin-right: 6px;
  font-family:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.entity-type-badge.function {
  background: #e3f2fd;
  color: #1565c0;
}

.entity-type-badge.class {
  background: #f3e5f5;
  color: #7b1fa2;
}

.entity-type-badge.struct {
  background: #fff3e0;
  color: #e65100;
}

.search-box-autocomplete button {
  padding: 10px 20px;
  background: #2196f3;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  white-space: nowrap;
}

.search-box-autocomplete button:hover {
  background: #1976d2;
}

.search-box-autocomplete button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Analysis Dashboard Styles */
.analysis-dashboard {
  max-width: 100%;
}

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

.analysis-header h2 {
  margin: 0;
  font-size: 1.5em;
  border-bottom: none;
  padding-bottom: 0;
}

/* Health Score Card */
.health-score-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  color: white;
  margin-bottom: 20px;
}

.health-score-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
}

.health-score-value {
  font-size: 2em;
  font-weight: bold;
  line-height: 1;
}

.health-score-label {
  font-size: 0.7em;
  opacity: 0.9;
  margin-top: 2px;
}

.health-score-info {
  flex: 1;
}

.health-rating {
  font-size: 1.3em;
  font-weight: 600;
  margin-bottom: 4px;
}

.health-description {
  font-size: 0.85em;
  opacity: 0.9;
}

/* Analysis Tabs - Compact horizontal scrolling */
.analysis-tabs {
  display: flex;
  gap: 2px;
  margin-bottom: 20px;
  padding: 4px;
  background: #f0f0f0;
  border-radius: 8px;
  overflow-x: auto;
  white-space: nowrap;
}

.analysis-tab {
  padding: 8px 12px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8em;
  font-weight: 500;
  color: #666;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.analysis-tab:hover {
  background: rgba(255, 255, 255, 0.7);
  color: #333;
}

.analysis-tab.active {
  background: white;
  color: #1976d2;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Analysis Summary Grid - Overview cards */
.analysis-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.analysis-summary-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.analysis-summary-card:hover {
  border-color: #2196f3;
  box-shadow: 0 2px 8px rgba(33, 150, 243, 0.15);
}

.analysis-summary-card.has-issues {
  border-left: 4px solid #ff9800;
}

.analysis-summary-card.has-critical {
  border-left: 4px solid #f44336;
}

.summary-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  border-radius: 8px;
  font-weight: bold;
  font-size: 1em;
  color: #666;
  flex-shrink: 0;
}

.summary-info {
  flex: 1;
  min-width: 0;
}

.summary-title {
  font-weight: 600;
  font-size: 0.9em;
  color: #333;
  margin-bottom: 4px;
}

.summary-stat {
  font-size: 0.85em;
  color: #1976d2;
  font-weight: 500;
}

.summary-detail {
  font-size: 0.75em;
  color: #888;
  margin-top: 2px;
}

/* Stats bar for detail views */
.analysis-stats-bar {
  display: flex;
  gap: 24px;
  padding: 16px 20px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 20px;
}

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

.stat-item.stat-warning .stat-value {
  color: #ff9800;
}

.stat-value {
  font-size: 1.8em;
  font-weight: bold;
  color: #333;
  line-height: 1;
}

.stat-label {
  font-size: 0.8em;
  color: #666;
  margin-top: 4px;
}

/* Metrics specific styles */
.metrics-overview {
  margin-bottom: 24px;
}

.metric-big-card {
  text-align: center;
  padding: 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  color: white;
  margin-bottom: 16px;
}

.metric-big-value {
  font-size: 3em;
  font-weight: bold;
}

.metric-big-label {
  font-size: 0.9em;
  opacity: 0.9;
  margin-top: 4px;
}

.metric-big-rating {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 16px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  font-weight: 500;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}

.metric-card {
  text-align: center;
  padding: 16px 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.metric-value {
  font-size: 1.5em;
  font-weight: bold;
  color: #333;
}

.metric-label {
  font-size: 0.75em;
  color: #666;
  margin-top: 4px;
}

/* Analysis Detail Tables - div-based */
.analysis-table {
  width: 100%;
  font-size: 0.85em;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}

.analysis-table .table-header {
  display: flex;
  background: #f5f5f5;
  font-weight: 600;
  color: #555;
  border-bottom: 2px solid #e0e0e0;
}

.analysis-table .table-header span {
  flex: 1;
  padding: 10px 12px;
}

.analysis-table .table-row {
  display: flex;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background 0.15s;
}

.analysis-table .table-row:last-child {
  border-bottom: none;
}

.analysis-table .table-row:hover {
  background: #f0f7ff;
}

.analysis-table .table-row.warning-row {
  background: #fff8e1;
}

.analysis-table .table-row.warning-row:hover {
  background: #ffecb3;
}

.analysis-table .table-row span {
  flex: 1;
  padding: 10px 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analysis-table .fn-name {
  font-family: monospace;
  font-weight: 500;
  color: #1976d2;
}

.analysis-table .fn-file {
  color: #666;
  font-size: 0.9em;
}

.analysis-table .fn-reason {
  color: #e65100;
  font-style: italic;
}

.analysis-table .circular-arrow {
  text-align: center;
  color: #f44336;
  font-weight: bold;
}

/* Analysis Badges */
.analysis-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.8em;
  font-weight: 500;
}

.analysis-badge.high {
  background: #ffebee;
  color: #c62828;
}

.analysis-badge.medium {
  background: #fff3e0;
  color: #e65100;
}

.analysis-badge.low {
  background: #e8f5e9;
  color: #2e7d32;
}

.analysis-badge.info {
  background: #e3f2fd;
  color: #1565c0;
}

/* Code Smell and Security Icons */
.issue-icon {
  margin-right: 8px;
}

.issue-icon.security {
  color: #c62828;
}

.issue-icon.smell {
  color: #ff9800;
}

.issue-icon.type {
  color: #9c27b0;
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  border: 1px solid #e0e0e0;
}

.metric-card .value {
  font-size: 2.2em;
  font-weight: bold;
  color: #1976d2;
  margin-bottom: 6px;
}

.metric-card .label {
  color: #666;
  font-size: 0.9em;
}

.metric-card.warning .value {
  color: #ff9800;
}

.metric-card.error .value {
  color: #f44336;
}

/* Dependency Graph Placeholder */
.dependency-graph-placeholder {
  background: #f8f9fa;
  border: 2px dashed #ddd;
  border-radius: 8px;
  padding: 40px;
  text-align: center;
  color: #999;
  margin-bottom: 20px;
}

.dependency-graph-placeholder h4 {
  margin: 0 0 8px 0;
  color: #666;
}

/* Documentation Coverage Bar */
.coverage-bar {
  height: 24px;
  background: #f0f0f0;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.coverage-fill {
  height: 100%;
  background: linear-gradient(90deg, #4caf50, #8bc34a);
  transition: width 0.5s ease;
}

.coverage-fill.low {
  background: linear-gradient(90deg, #f44336, #ff5722);
}

.coverage-fill.medium {
  background: linear-gradient(90deg, #ff9800, #ffc107);
}

.coverage-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.85em;
  font-weight: 600;
  color: #333;
}

/* Duplication Info */
.duplication-group {
  background: #fff8e1;
  border-left: 4px solid #ffc107;
  padding: 16px;
  margin-bottom: 16px;
  border-radius: 0 8px 8px 0;
  overflow: hidden;
}

.duplication-original,
.duplication-clone {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: white;
  border-radius: 4px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: background 0.15s;
  overflow: hidden;
}

.duplication-original:hover,
.duplication-clone:hover {
  background: #f5f5f5;
}

.duplication-clones {
  margin-left: 20px;
  padding-left: 16px;
  border-left: 2px solid #ffc107;
}

.dup-label {
  font-size: 0.8em;
  color: #666;
  font-weight: 500;
  min-width: 120px;
  flex-shrink: 0;
}

.duplication-original .fn-name,
.duplication-clone .fn-name {
  font-family: monospace;
  color: #1976d2;
  font-weight: 500;
  flex-shrink: 0;
}

.duplication-original .fn-file,
.duplication-clone .fn-file {
  color: #666;
  font-size: 0.85em;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fn-lines {
  color: #888;
  font-size: 0.85em;
  margin-left: auto;
  flex-shrink: 0;
}

/* Analysis Empty State */
.analysis-empty,
.empty-state.success-state {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}

.empty-state.success-state {
  background: #e8f5e9;
  color: #2e7d32;
  border-radius: 8px;
  font-weight: 500;
}

.analysis-empty .icon {
  font-size: 4em;
  margin-bottom: 16px;
  opacity: 0.5;
}

.analysis-empty h4 {
  margin: 0 0 8px 0;
  color: #666;
}

/* Security severity badges */
.severity-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75em;
  font-weight: 600;
  text-transform: uppercase;
}

.severity-badge.high {
  background: #ffebee;
  color: #c62828;
}

.severity-badge.medium {
  background: #fff3e0;
  color: #e65100;
}

.severity-badge.low {
  background: #e8f5e9;
  color: #2e7d32;
}

/* Complexity badge in tables */
.complexity-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75em;
  font-weight: 500;
}

.complexity-badge.complexity-low {
  background: #e8f5e9;
  color: #2e7d32;
}

.complexity-badge.complexity-moderate {
  background: #fff3e0;
  color: #e65100;
}

.complexity-badge.complexity-high {
  background: #ffebee;
  color: #c62828;
}

.complexity-badge.complexity-very_high {
  background: #f3e5f5;
  color: #7b1fa2;
}

/* Loading state for analysis */
.analysis-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #666;
}

.analysis-loading .spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e0e0e0;
  border-top-color: #2196f3;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Circular Dependencies Warning */
.circular-deps-warning {
  background: #ffebee;
  border-left: 4px solid #f44336;
  padding: 16px;
  margin-bottom: 20px;
  border-radius: 0 8px 8px 0;
}

.circular-deps-warning h4 {
  margin: 0 0 12px 0;
  color: #c62828;
  display: flex;
  align-items: center;
  gap: 8px;
}

.circular-path {
  background: white;
  padding: 12px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.9em;
  margin-bottom: 8px;
}

.circular-path:last-child {
  margin-bottom: 0;
}

/* Variable Scope Visualization */
.scope-tree {
  background: #f8f9fa;
  padding: 16px;
  border-radius: 8px;
  font-family: monospace;
  font-size: 0.9em;
}

.scope-level {
  padding-left: 20px;
  border-left: 2px solid #e0e0e0;
  margin-left: 8px;
}

.scope-var {
  padding: 4px 8px;
  margin: 4px 0;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.scope-var.unused {
  background: #ffebee;
  color: #c62828;
}

.scope-var.shadowed {
  background: #fff3e0;
  color: #e65100;
}

.scope-var.normal {
  background: #e8f5e9;
  color: #2e7d32;
}

/* API Surface Table */
.api-surface-table {
  width: 100%;
}

.api-surface-table .visibility {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: 500;
}

.api-surface-table .visibility.public {
  background: #e8f5e9;
  color: #2e7d32;
}

.api-surface-table .visibility.private {
  background: #f5f5f5;
  color: #666;
}

.api-surface-table .visibility.protected {
  background: #fff3e0;
  color: #e65100;
}

/* Type Analysis Details */
.type-info {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.type-tag {
  background: #f3e5f5;
  color: #7b1fa2;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.8em;
  font-family: monospace;
}

/* References Tab Styles */
.references-container {
  padding: 0;
}

.references-summary {
  padding: 12px 16px;
  background: #f8f9fa;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 0.95em;
  color: #555;
}

.definitions-note {
  color: #1976d2;
  font-weight: 500;
}

.definitions-section {
  margin-bottom: 20px;
}

.definitions-section h4 {
  margin: 0 0 10px 0;
  padding: 8px 0;
  border-bottom: 1px solid #e0e0e0;
  color: #333;
  font-size: 1em;
}

.definitions-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.definition-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #e3f2fd;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}

.definition-item:hover {
  background: #bbdefb;
}

.definition-symbol {
  font-family: monospace;
  font-weight: 600;
  color: #1565c0;
}

.definition-location {
  font-family: monospace;
  font-size: 0.85em;
  color: #666;
  margin-left: auto;
}

.references-by-type {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.reference-type-group h4 {
  margin: 0 0 8px 0;
  padding: 8px 0;
  border-bottom: 1px solid #e0e0e0;
  color: #333;
  font-size: 0.95em;
}

.reference-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.reference-item {
  padding: 8px 12px;
  border-left: 3px solid #90caf9;
  background: #fafafa;
  border-radius: 0 4px 4px 0;
}

.reference-location {
  font-family: monospace;
  font-size: 0.9em;
  color: #1976d2;
  margin-bottom: 4px;
}

.reference-context {
  font-size: 0.85em;
  color: #666;
  overflow-x: auto;
}

.reference-context code {
  font-family: monospace;
  white-space: pre;
  display: block;
  padding: 4px 0;
}

/* Concurrency and Resources Analysis Styles */
.file-section {
  margin-bottom: 24px;
}

.file-header {
  font-size: 0.95em;
  color: #1976d2;
  margin: 0 0 12px 0;
  padding: 8px 12px;
  background: #e3f2fd;
  border-radius: 6px;
  font-family: monospace;
}

.pattern-section {
  margin-bottom: 24px;
}

.pattern-section h3 {
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid #e0e0e0;
  color: #333;
}

.pattern-section.has-issues h3 {
  color: #c62828;
  border-bottom-color: #ffcdd2;
}

.pattern-group {
  margin-bottom: 20px;
  padding: 12px;
  background: #fafafa;
  border-radius: 8px;
}

.pattern-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.pattern-type {
  font-weight: 600;
  color: #1976d2;
  font-family: monospace;
}

.pattern-type.safe {
  color: #2e7d32;
}

.pattern-count {
  font-size: 0.85em;
  color: #666;
  background: #e0e0e0;
  padding: 2px 8px;
  border-radius: 12px;
}

.pattern-description {
  font-size: 0.85em;
  color: #666;
  margin-bottom: 12px;
  font-style: italic;
}

.pattern-name {
  font-family: monospace;
  color: #333;
}

.pattern-line {
  color: #666;
  font-size: 0.9em;
  text-align: right;
}

.table-more {
  padding: 8px 12px;
  color: #666;
  font-size: 0.85em;
  font-style: italic;
  text-align: center;
  background: #f5f5f5;
  border-radius: 4px;
  margin-top: 4px;
}

.table-row.is-acquire {
  border-left: 3px solid #4caf50;
}

.table-row.is-release {
  border-left: 3px solid #2196f3;
}

.table-row.has-issues {
  border-left: 3px solid #f44336;
  background: #fff8f8;
}

/* Icon colors for concurrency and resources */
.concurrency-icon {
  color: #9c27b0;
  font-weight: bold;
}

.resources-icon {
  color: #ff5722;
  font-weight: bold;
}

/* ============================================
   Analysis Dashboard - Sidebar Layout Styles
   ============================================ */

.analysis-layout {
  display: flex;
  gap: 24px;
  min-height: 600px;
}

/* Sidebar Navigation */
.analysis-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: white;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  padding: 16px 0;
  height: fit-content;
  position: sticky;
  top: 20px;
}

/* Health Score in Sidebar */
.sidebar-health {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  margin: 0 12px 16px 12px;
  border-radius: 10px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.sidebar-health.health-good {
  background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
}

.sidebar-health.health-moderate {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.sidebar-health.health-poor {
  background: linear-gradient(135deg, #f44336 0%, #c62828 100%);
}

.sidebar-health .health-score {
  font-size: 2.5em;
  font-weight: bold;
  line-height: 1;
}

.sidebar-health .health-label {
  font-size: 0.85em;
  opacity: 0.9;
  margin-top: 4px;
}

/* Sidebar Items */
.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin: 2px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
  color: #555;
}

.sidebar-item:hover {
  background: #f5f5f5;
  color: #333;
}

.sidebar-item.active {
  background: #e3f2fd;
  color: #1976d2;
  font-weight: 500;
}

.sidebar-item.has-issues {
  color: #e65100;
}

.sidebar-item.has-critical {
  color: #c62828;
}

.sidebar-icon {
  width: 24px;
  font-size: 0.9em;
  text-align: center;
  color: #888;
  flex-shrink: 0;
}

.sidebar-item.active .sidebar-icon {
  color: #1976d2;
}

.sidebar-text {
  flex: 1;
  font-size: 0.9em;
}

.sidebar-badge {
  font-size: 0.75em;
  padding: 2px 6px;
  border-radius: 10px;
  background: #e0e0e0;
  color: #666;
  font-weight: 500;
}

.sidebar-badge.warning {
  background: #fff3e0;
  color: #e65100;
}

.sidebar-badge.critical {
  background: #ffebee;
  color: #c62828;
}

/* Sidebar Groups */
.sidebar-group {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #eee;
}

.sidebar-group:first-of-type {
  margin-top: 8px;
  padding-top: 0;
  border-top: none;
}

.sidebar-group-title {
  font-size: 0.7em;
  font-weight: 600;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 16px 8px 16px;
}

/* Main Content Area */
.analysis-main {
  flex: 1;
  min-width: 0;
  background: white;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  padding: 24px;
}

.analysis-main .analysis-header {
  margin-bottom: 16px;
}

.analysis-main .breadcrumb {
  margin-bottom: 0;
}

.analysis-content h2 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.4em;
  color: #333;
  border-bottom: none;
  padding-bottom: 0;
}

.analysis-content h3 {
  margin-top: 24px;
  margin-bottom: 12px;
  font-size: 1.1em;
  color: #444;
}

.analysis-content h3:first-child {
  margin-top: 0;
}

.overview-description {
  color: #666;
  font-size: 0.95em;
  margin-bottom: 24px;
}

/* Pattern Type Badges for Concurrency/Resources */
.pattern-type-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.8em;
  font-weight: 500;
  font-family: monospace;
}

.pattern-type-badge.async {
  background: #e3f2fd;
  color: #1565c0;
}

.pattern-type-badge.thread {
  background: #f3e5f5;
  color: #7b1fa2;
}

.pattern-type-badge.sync {
  background: #fff3e0;
  color: #e65100;
}

.pattern-type-badge.leak {
  background: #ffebee;
  color: #c62828;
}

.pattern-type-badge.alloc {
  background: #e8f5e9;
  color: #2e7d32;
}

.pattern-type-badge.release {
  background: #e3f2fd;
  color: #1565c0;
}

/* Warning Group Style */
.pattern-group.warning-group {
  background: #fff8f8;
  border: 1px solid #ffcdd2;
}

/* Responsive Adjustments */
@media (max-width: 900px) {
  .analysis-layout {
    flex-direction: column;
  }

  .analysis-sidebar {
    width: 100%;
    position: static;
    display: flex;
    flex-wrap: wrap;
    padding: 12px;
    gap: 8px;
  }

  .sidebar-health {
    width: 100%;
    flex-direction: row;
    justify-content: center;
    gap: 12px;
    margin: 0 0 8px 0;
    padding: 12px 16px;
  }

  .sidebar-health .health-score {
    font-size: 1.8em;
  }

  .sidebar-group {
    display: contents;
  }

  .sidebar-group-title {
    display: none;
  }

  .sidebar-item {
    padding: 8px 12px;
    margin: 0;
    border: 1px solid #e0e0e0;
  }
}

/* ============================================
   Loading Animation and Empty State Styles
   ============================================ */

/* Loading Container */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

/* Spinning Loader */
.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e0e0e0;
  border-top-color: #1976d2;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  font-size: 1.1em;
  font-weight: 500;
  color: #333;
  margin-bottom: 8px;
}

.loading-subtext {
  font-size: 0.9em;
  color: #666;
}

/* Empty State Container */
.empty-state-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  background: #fafafa;
  border-radius: 12px;
  border: 2px dashed #e0e0e0;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8em;
  font-weight: bold;
  background: #f0f0f0;
  color: #999;
  border-radius: 50%;
  margin-bottom: 20px;
}

.empty-state-icon.success {
  background: #e8f5e9;
  color: #2e7d32;
}

.empty-state-icon.warning {
  background: #fff3e0;
  color: #e65100;
}

.empty-state-icon.error {
  background: #ffebee;
  color: #c62828;
}

.empty-state-title {
  font-size: 1.2em;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

.empty-state-message {
  font-size: 0.95em;
  color: #666;
  max-width: 400px;
  line-height: 1.5;
}

/* ============================================
   New Analysis Tab Styles (Patterns, Tests, Naming, Readability)
   ============================================ */

/* Pattern badges for design patterns */
.pattern-type-badge.pattern {
  background: #e8f5e9;
  color: #2e7d32;
}

.pattern-type-badge.anti-pattern {
  background: #ffebee;
  color: #c62828;
}

.pattern-context {
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: 0.85em;
  color: #666;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Test framework badge */
.test-framework-badge {
  background: #e3f2fd;
  color: #1565c0;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.85em;
  font-weight: 500;
}

/* Naming convention styles */
.naming-conventions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.naming-convention-card {
  background: #f5f5f5;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
}

.naming-convention-card .convention-name {
  font-size: 0.85em;
  color: #666;
  margin-bottom: 8px;
  text-transform: capitalize;
  word-break: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.naming-convention-card .convention-count {
  font-size: 1.8em;
  font-weight: 600;
  color: #333;
}

/* Readability score card */
.readability-score-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 20px;
  background: #f5f5f5;
}

.readability-score-card .readability-score {
  font-size: 3em;
  font-weight: 700;
  line-height: 1;
}

.readability-score-card .readability-label {
  font-size: 1.1em;
  font-weight: 500;
  margin-top: 8px;
}

.readability-score-card.readability-excellent {
  background: #e8f5e9;
  color: #2e7d32;
}

.readability-score-card.readability-good {
  background: #e3f2fd;
  color: #1565c0;
}

.readability-score-card.readability-fair {
  background: #fff3e0;
  color: #e65100;
}

.readability-score-card.readability-poor {
  background: #ffebee;
  color: #c62828;
}

.readability-file-score {
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
}

.readability-file-score.score-good {
  background: #e8f5e9;
  color: #2e7d32;
}

.readability-file-score.score-fair {
  background: #fff3e0;
  color: #e65100;
}

.readability-file-score.score-poor {
  background: #ffebee;
  color: #c62828;
}

.readability-issues {
  font-size: 0.85em;
  color: #666;
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================
   Project Actions Grid
   ============================================ */

.project-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.actions-group {
  background: #fafafa;
  border-radius: 12px;
  padding: 16px;
}

.actions-group h4 {
  margin: 0 0 12px 0;
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
  font-weight: 600;
}

.actions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.action-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}

.action-card:hover {
  border-color: #1976d2;
  box-shadow: 0 2px 8px rgba(25, 118, 210, 0.15);
  transform: translateY(-1px);
}

.action-card:active {
  transform: translateY(0);
}

.action-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e3f2fd;
  color: #1976d2;
  border-radius: 8px;
  font-size: 1.2em;
  font-weight: bold;
  flex-shrink: 0;
}

.action-card:hover .action-icon {
  background: #1976d2;
  color: white;
}

.action-label {
  font-weight: 600;
  color: #333;
  display: block;
  margin-bottom: 2px;
}

.action-desc {
  font-size: 0.85em;
  color: #666;
  display: block;
}

/* ============================================
   Global Search Styles (Header)
   ============================================ */

.header-search {
  flex: 0 1 300px;
  min-width: 150px;
  max-width: 300px;
  margin: 0 20px;
}

.global-search-wrapper {
  position: relative;
}

.global-search-input {
  width: 100%;
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  transition:
    background 0.2s,
    box-shadow 0.2s;
}

.global-search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.global-search-input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.global-autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  z-index: 1000;
  max-height: 400px;
  overflow-y: auto;
}

.global-autocomplete-dropdown .autocomplete-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  color: #333;
}

.global-autocomplete-dropdown .autocomplete-item:last-of-type {
  border-bottom: none;
}

.global-autocomplete-dropdown .autocomplete-item:hover,
.global-autocomplete-dropdown .autocomplete-item.highlighted {
  background: #f0f7ff;
}

.global-autocomplete-dropdown .autocomplete-name {
  font-family: monospace;
  font-weight: 500;
  color: #1976d2;
  font-size: 13px;
}

.global-autocomplete-dropdown .autocomplete-location {
  font-size: 11px;
  color: #666;
  margin-top: 4px;
  display: flex;
  gap: 8px;
}

.global-autocomplete-dropdown .autocomplete-project {
  color: #9c27b0;
  font-weight: 600;
}

.global-autocomplete-dropdown .autocomplete-file {
  color: #666;
}

.autocomplete-hint {
  padding: 8px 14px;
  font-size: 11px;
  color: #999;
  background: #f9f9f9;
  border-top: 1px solid #eee;
  text-align: center;
}

/* ============================================
   Global Search Results Page Styles
   ============================================ */

.search-results-header {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #eee;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.search-results-header h2 {
  margin: 0;
  padding: 0;
  border: none;
}

.search-results-query {
  color: #666;
  font-size: 0.9em;
}

.btn-close {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  padding: 0 8px;
  line-height: 1;
}

.btn-close:hover {
  color: #333;
}

.search-results-table {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}

.search-results-table-header {
  display: grid;
  grid-template-columns: 80px 1fr 120px 1fr 60px;
  gap: 12px;
  padding: 12px 16px;
  background: #f5f5f5;
  font-weight: 600;
  font-size: 0.85em;
  color: #666;
  border-bottom: 1px solid #e0e0e0;
}

.search-results-row {
  display: grid;
  grid-template-columns: 80px 1fr 120px 1fr 60px;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background 0.15s;
  align-items: center;
}

.search-results-row:last-child {
  border-bottom: none;
}

.search-results-row:hover {
  background: #f0f7ff;
}

.search-results-row .col-name {
  font-family: monospace;
  font-weight: 500;
  color: #1976d2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-results-row .col-project {
  color: #9c27b0;
  font-weight: 500;
  font-size: 0.9em;
}

.search-results-row .col-file {
  color: #666;
  font-size: 0.85em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-results-row .col-line {
  color: #999;
  font-size: 0.85em;
  text-align: right;
}

.load-more-container {
  text-align: center;
  padding: 16px;
}

.btn-load-more {
  padding: 10px 24px;
  background: #e3f2fd;
  color: #1976d2;
  border: 1px solid #90caf9;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
}

.btn-load-more:hover:not(:disabled) {
  background: #bbdefb;
}

.btn-load-more:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.search-results-count {
  text-align: center;
  padding: 12px;
  color: #999;
  font-size: 0.85em;
}

/* Markdown content styling */
.markdown-content {
  background: #fff;
  padding: 24px;
  border-radius: 8px;
  line-height: 1.6;
  font-size: 15px;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
  margin-top: 24px;
  margin-bottom: 16px;
  font-weight: 600;
  line-height: 1.25;
  color: #2c3e50;
}

.markdown-content h1 {
  font-size: 2em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid #eee;
}

.markdown-content h2 {
  font-size: 1.5em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid #eee;
}

.markdown-content h3 {
  font-size: 1.25em;
}

.markdown-content p {
  margin-top: 0;
  margin-bottom: 16px;
}

.markdown-content ul,
.markdown-content ol {
  padding-left: 2em;
  margin-bottom: 16px;
}

.markdown-content li {
  margin-bottom: 4px;
}

.markdown-content code {
  background: #f6f8fa;
  padding: 0.2em 0.4em;
  border-radius: 3px;
  font-size: 85%;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

.markdown-content pre {
  background: #282c34;
  color: #abb2bf;
  padding: 16px;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 16px;
}

.markdown-content pre code {
  background: transparent;
  padding: 0;
  font-size: 14px;
  color: inherit;
}

.markdown-content blockquote {
  margin: 0 0 16px 0;
  padding: 0 1em;
  color: #6a737d;
  border-left: 4px solid #dfe2e5;
}

.markdown-content table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 16px;
}

.markdown-content table th,
.markdown-content table td {
  padding: 8px 12px;
  border: 1px solid #dfe2e5;
  text-align: left;
}

.markdown-content table th {
  background: #f6f8fa;
  font-weight: 600;
}

.markdown-content table tr:nth-child(even) {
  background: #f9f9f9;
}

.markdown-content a {
  color: #0366d6;
  text-decoration: none;
}

.markdown-content a:hover {
  text-decoration: underline;
}

.markdown-content img {
  max-width: 100%;
  height: auto;
}

.markdown-content hr {
  border: none;
  border-top: 1px solid #eee;
  margin: 24px 0;
}
