/* HDDS Debugger - Minimal Industrial Dark Theme */

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #1a1a1a;
  color: #e0e0e0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
header {
  background: #2c2c2c;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #4CAF50;
}

header h1 {
  font-size: 1.5rem;
  color: #4CAF50;
  margin-bottom: 0.2rem;
}

#version {
  font-size: 0.8rem;
  color: #888;
}

#status {
  font-size: 0.9rem;
  padding: 0.4rem 1rem;
  border-radius: 4px;
  background: #333;
  font-weight: 600;
}

#status.ok {
  color: #4CAF50;
}

#status.error {
  color: #f44336;
}

/* Main Grid Layout */
main {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1rem;
}

section {
  background: #2c2c2c;
  border-radius: 8px;
  padding: 1rem;
  border: 1px solid #333;
}

section h2 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid #444;
  padding-bottom: 0.5rem;
  color: #4CAF50;
}

/* Mesh Graph */
#mesh-graph {
  background: #1a1a1a;
  border-radius: 4px;
  display: block;
  margin: 0 auto;
}

#mesh-info {
  margin-top: 1rem;
  display: flex;
  gap: 2rem;
  justify-content: center;
  font-size: 0.9rem;
}

#mesh-info span {
  color: #4CAF50;
  font-weight: 600;
}

/* Recenter Button */
.recenter-button {
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  background: #4CAF50;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.recenter-button:hover {
  background: #45a049;
}

.recenter-button:active {
  background: #3d8b40;
  transform: translateY(1px);
}

/* Metrics Section */
#metrics-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chart-container {
  background: #1a1a1a;
  border-radius: 4px;
  padding: 0.5rem;
  height: 150px;
}

#metrics-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  font-size: 0.9rem;
}

#metrics-summary p {
  background: #1a1a1a;
  padding: 0.5rem;
  border-radius: 4px;
}

#metrics-summary span {
  color: #4CAF50;
  font-weight: 600;
}

/* Topics Table */
#topics-table {
  grid-column: 1 / 3; /* Full width */
}

table {
  width: 100%;
  border-collapse: collapse;
}

table th,
table td {
  padding: 0.6rem;
  text-align: left;
  border-bottom: 1px solid #444;
}

table th {
  background: #333;
  font-weight: 600;
  color: #4CAF50;
}

table tbody tr:hover {
  background: #333;
}

/* D3.js Elements */
.node {
  cursor: pointer;
  stroke: #fff;
  stroke-width: 2px;
  transition: r 0.2s;
}

.node:hover {
  r: 25;
}

.label {
  fill: #e0e0e0;
  font-size: 10px;
  pointer-events: none;
}

.link {
  stroke: #666;
  stroke-width: 1.5px;
}

/* Footer */
footer {
  background: #2c2c2c;
  padding: 0.5rem 2rem;
  border-top: 1px solid #444;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: #888;
}

footer span {
  color: #4CAF50;
}

/* Responsive */
@media (max-width: 1280px) {
  main {
    grid-template-columns: 1fr;
  }

  #topics-table {
    grid-column: 1;
  }
}

/* Scrollbar (dark theme) */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}
