/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: "Courier New", Courier, monospace;
  font-size: 13px;
  background: #008080;
  color: #000;
}

/* === Title Bar === */
.title-bar {
  background: #000080;
  color: #fff;
  font-weight: bold;
  font-size: 14px;
  padding: 4px 8px;
  text-align: center;
  letter-spacing: 1px;
}

/* === Dashboard Grid === */
.dashboard {
  display: flex;
  height: calc(100vh - 24px);
  gap: 2px;
  padding: 2px;
}

/* === Panel (Win95 Window) === */
.panel {
  background: #c0c0c0;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.col-left  { flex: 0 0 25%; }
.col-center { flex: 0 0 50%; }
.col-right { flex: 0 0 25%; }

.panel-header {
  background: #000080;
  color: #fff;
  font-weight: bold;
  font-size: 12px;
  padding: 3px 6px;
  user-select: none;
}

.sub-header {
  background: #808080;
  margin-top: 4px;
}

.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 6px;
}

/* === Identity === */
#identity p {
  margin-bottom: 2px;
  font-size: 12px;
}

/* === Stats Table === */
#stats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 4px;
}

#stats-table td {
  padding: 1px 4px;
  border-bottom: 1px solid #a0a0a0;
}

#stats-table td:last-child {
  text-align: right;
  font-weight: bold;
}

/* === Equipment & Spells Lists === */
#equipment-list, #spell-list {
  list-style: none;
  font-size: 12px;
  margin-top: 4px;
}

#equipment-list li, #spell-list li {
  padding: 1px 0;
  border-bottom: 1px dotted #a0a0a0;
}

.scroll-box {
  max-height: 120px;
  overflow-y: auto;
  border: 1px inset #808080;
  background: #fff;
  padding: 4px;
}

/* === Center Column === */
.center-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
}

.location-header {
  font-weight: bold;
  font-size: 14px;
  text-align: center;
  color: #000080;
  padding: 4px;
  background: #e0e0e0;
  border: 1px inset #808080;
  width: 90%;
  text-align: center;
}

.portrait {
  width: 100px;
  height: 100px;
  border: 2px inset #808080;
  background: #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  user-select: none;
}

/* === Progress Bars === */
.bar-group {
  width: 90%;
}

.bar-label {
  display: block;
  font-size: 11px;
  font-weight: bold;
  margin-bottom: 2px;
}

.bar-track {
  width: 100%;
  height: 18px;
  background: #fff;
  border: 2px inset #808080;
  position: relative;
}

.bar-fill {
  height: 100%;
  width: 0%;
  transition: width 0.1s linear;
}

.task-fill { background: #00aa00; }
.xp-fill   { background: #0055cc; }
.plot-fill  { background: #aa5500; }

/* === Right Column: Feed === */
.feed-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#inventory-list {
  list-style: none;
  font-size: 12px;
  min-height: 80px;
  flex: 1;
}

#inventory-list li {
  padding: 1px 0;
  border-bottom: 1px dotted #a0a0a0;
}

.log-box {
  flex: 1;
  min-height: 120px;
  max-height: none;
  font-size: 11px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

/* === Scrollbar Retro Style === */
::-webkit-scrollbar {
  width: 16px;
}

::-webkit-scrollbar-track {
  background: #c0c0c0;
  border: 1px solid #808080;
}

::-webkit-scrollbar-thumb {
  background: #c0c0c0;
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
  border-right: 2px solid #808080;
  border-bottom: 2px solid #808080;
}
