/* Terminal Panel */
.panel-terminal {
  position: relative;
  background: #000;
  display: flex;
  flex-direction: column;
}

.panel-terminal::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0),
    rgba(255,255,255,0) 2px,
    rgba(0,0,0,0.1) 3px,
    rgba(0,0,0,0.1) 4px
  );
  pointer-events: none;
  z-index: 50;
  animation: screen-flicker 0.15s infinite;
}

.terminal-header {
  padding: 1rem 1.5rem;
  background: linear-gradient(to bottom, var(--bgSurface), var(--bgPanel));
  border-bottom: 1px solid var(--borderGothic);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  z-index: 10;
}

.room-name {
  font-family: var(--fontHeading);
  font-size: 1.5rem;
  color: var(--accentGold);
  text-shadow: 0 0 5px rgba(212, 175, 55, 0.4);
}

.zone-name {
  font-family: var(--fontLore);
  color: var(--textMuted);
  font-style: italic;
}

.terminal-output {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.5rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--textPrimary);
  text-shadow: 0 0 3px rgba(200, 200, 200, 0.3);
  z-index: 10;
}

.terminal-line {
  margin-bottom: 0.4rem;
  word-wrap: break-word;
}

/* Line Types */
.line-system {
  color: hsl(50, 80%, 70%);
}
.line-combat {
  color: var(--accentCrimson);
  text-shadow: 0 0 8px rgba(220, 20, 60, 0.4);
}
.line-combat-deal {
  color: var(--accentSuccess);
  text-shadow: 0 0 8px rgba(40, 255, 120, 0.3);
}
.line-say {
  color: hsl(40, 60%, 90%);
}
.line-shout {
  color: var(--accentGold);
  font-weight: bold;
}
.line-tell {
  color: hsl(190, 80%, 60%);
}
.line-loot {
  color: var(--accentGold);
  font-weight: bold;
  animation: rarity-shimmer 2s infinite linear;
}
.line-level {
  color: var(--accentGold);
  font-family: var(--fontHeading);
  font-size: 1.2em;
  text-align: center;
  margin: 1rem 0;
  animation: level-up-pulse 2s infinite alternate;
}
.line-error {
  color: hsl(0, 100%, 60%);
  font-weight: bold;
}

/* Input Area */
.input-row {
  display: flex;
  padding: 1rem 1.5rem;
  background: var(--bgSurface);
  border-top: 1px solid var(--borderGothic);
  align-items: center;
  z-index: 10;
}

.input-prompt {
  color: var(--accentGold);
  margin-right: 0.8rem;
  font-weight: bold;
}

.cmd-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--textPrimary);
  font-family: var(--fontMono);
  font-size: 1.1rem;
  outline: none;
  text-shadow: 0 0 5px rgba(255,255,255,0.2);
}

.cmd-input::placeholder {
  color: rgba(200, 200, 200, 0.2);
}

/* Combat Bar Overlay */
.combat-bar {
  background: var(--bgSurface);
  border-top: 1px solid var(--accentCrimson);
  padding: 0.5rem 1.5rem;
  display: flex;
  align-items: center;
  z-index: 10;
}
.combat-target-name {
  width: 150px;
  color: var(--accentCrimson);
  font-weight: bold;
  font-family: var(--fontHeading);
}
