body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #101318;
  color: #e5e9f0;
}

#app {
  padding: 12px 14px;
  box-sizing: border-box;
}

.app-header h1 {
  margin: 0 0 4px;
  font-size: 18px;
}

.subtitle {
  margin: 0;
  font-size: 12px;
  color: #a0aec0;
}

.status {
  margin-top: 8px;
  font-size: 12px;
  color: #e2e8f0;
}

.status .error {
  color: #feb2b2;
}

.controls {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.controls button {
  padding: 4px 8px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid #2d3748;
  background: #2d3748;
  color: #e5e9f0;
  cursor: pointer;
}

.controls button:hover {
  background: #4a5568;
}

.transparent-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #cbd5e0;
}

.transparent-toggle input {
  margin: 0;
}

.materials-section {
  margin-top: 10px;
  max-height: 280px;
  overflow: auto;
  border-radius: 6px;
  border: 1px solid #2d3748;
  background: rgba(15, 23, 42, 0.9);
  /* Hide scrollbars while keeping scroll functionality */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge legacy */
}

.materials-section::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.materials-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.materials-table thead {
  position: sticky;
  top: 0;
  background: #1f2933;
  z-index: 1;
}

.materials-table th,
.materials-table td {
  padding: 4px 6px;
  text-align: left;
  border-bottom: 1px solid #2d3748;
}

.materials-table tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.7);
}

.materials-table tbody tr:nth-child(odd) {
  background: rgba(15, 23, 42, 0.4);
}

.material-name {
  white-space: nowrap;
}

.goal-input {
  width: 64px;
  padding: 2px 4px;
  font-size: 12px;
  border-radius: 4px;
  border: 1px solid #4a5568;
  background: #0f172a;
  color: #e5e9f0;
  box-sizing: border-box;
}

.goal-input:focus {
  outline: none;
  border-color: #63b3ed;
  box-shadow: 0 0 0 1px #63b3ed;
}

.footer {
  margin-top: 8px;
  font-size: 11px;
  color: #a0aec0;
}

/* Transparent mode: compact view (hide header/footer/status, keep dark bg) */
body.transparent-mode #app {
  padding: 4px 6px;
}

/* Auto-compact when window height is very small */
body.compact-header .app-header,
body.compact-header .footer,
body.compact-header .status {
  display: none;
}

body.compact-header #app {
  padding-top: 4px;
}

body.transparent-mode .app-header,
body.transparent-mode .footer,
body.transparent-mode .status {
  display: none;
}

body.transparent-mode .materials-section {
  margin-top: 4px;
  border: none;
  background: transparent;
}

body.transparent-mode .materials-table thead {
  background: transparent;
}

body.transparent-mode .materials-table tbody tr:nth-child(even),
body.transparent-mode .materials-table tbody tr:nth-child(odd) {
  background: transparent;
}

