/* ==========================================================================
   LucasArts SCUMM Adventure Quest Styles
   ========================================================================== */

.scumm-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: #000000;
  user-select: none;
  overflow: hidden;
  font-family: 'Courier New', Courier, monospace;
}

/* 1. Scene Viewport */
.scumm-viewport {
  flex: 1;
  position: relative;
  background-color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.scumm-canvas {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
  cursor: crosshair;
}

/* Floating Subtitle Text (Guybrush & NPCs) */
.scumm-subtitles-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
}

.scumm-speech-bubble {
  position: absolute;
  transform: translate(-50%, -100%);
  font-family: 'Courier New', monospace;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  white-space: pre-wrap;
  max-width: 280px;
  line-height: 1.25;
  padding: 2px 6px;
  text-shadow:
    -1px -1px 0 #000,
     1px -1px 0 #000,
    -1px  1px 0 #000,
     1px  1px 0 #000,
     0px  2px 3px rgba(0,0,0,0.8);
  pointer-events: none;
  animation: scummTextPop 0.15s ease-out;
}

@keyframes scummTextPop {
  0% { transform: translate(-50%, -90%) scale(0.9); opacity: 0; }
  100% { transform: translate(-50%, -100%) scale(1); opacity: 1; }
}

.scumm-speech-guybrush {
  color: #fffe54; /* Classic Guybrush Threepwood yellow text */
}

.scumm-speech-npc {
  color: #55ffff; /* Classic NPC cyan text */
}

.scumm-speech-narrator {
  color: #ffffff;
}

/* Dialogue Options Overlay (Monkey Island style) */
.scumm-dialogue-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 40, 0.92);
  border-top: 2px solid #0000aa;
  padding: 6px 12px;
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 100;
}

.scumm-dialogue-overlay.active {
  display: flex;
}

.scumm-dialogue-choice {
  color: #ffff55;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1.3;
}

.scumm-dialogue-choice:hover {
  color: #ffffff;
  background-color: #0000aa;
}

/* Room Title Card on entering new room */
.scumm-room-title {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid #fffe54;
  color: #fffe54;
  padding: 3px 12px;
  font-size: 11px;
  font-weight: bold;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.scumm-room-title.visible {
  opacity: 1;
}

/* ==========================================================================
   2. Classic SCUMM Console (Action Line, Verbs, Inventory)
   ========================================================================== */

.scumm-console {
  height: 112px;
  background-color: #000055; /* Classic LucasArts deep blue console */
  border-top: 2px solid #000000;
  display: flex;
  flex-direction: column;
  padding: 2px 6px;
  box-shadow: inset 0 2px 0 #000088;
}

/* Dynamic Action Sentence Line */
.scumm-sentence-line {
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fffe54;
  font-size: 13px;
  font-weight: bold;
  text-shadow: 1px 1px 0 #000;
  overflow: hidden;
  white-space: nowrap;
  letter-spacing: 0.5px;
}

/* Lower Panel: 9-Verbs Grid + Inventory Box */
.scumm-lower-panel {
  flex: 1;
  display: flex;
  gap: 8px;
  padding: 2px 4px;
}

/* The 9 Iconic Verbs (3 columns x 3 rows) */
.scumm-verbs-grid {
  display: grid;
  grid-template-columns: repeat(3, 72px);
  grid-template-rows: repeat(3, 24px);
  gap: 2px 6px;
  align-items: center;
}

.scumm-verb-btn {
  background: transparent;
  border: none;
  color: #00aa00; /* Classic dark green inactive text */
  font-family: 'Courier New', monospace;
  font-size: 13px;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  outline: none;
  padding: 0;
  text-shadow: 1px 1px 0 #000;
}

.scumm-verb-btn:hover {
  color: #55ff55; /* Light green on hover */
}

.scumm-verb-btn.active {
  color: #fffe54; /* Yellow active verb */
}

/* Inventory Box */
.scumm-inventory-box {
  flex: 1;
  background-color: #000022;
  border: 1px solid #000088;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 24px;
  gap: 2px 4px;
  padding: 2px 4px;
  overflow-y: auto;
}

.scumm-inv-item {
  color: #ff55ff; /* Classic pink/magenta inventory text */
  font-size: 12px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 1px 2px;
}

.scumm-inv-item:hover {
  background-color: #000088;
  color: #ffffff;
}

.scumm-inv-item.active {
  color: #fffe54;
  background-color: #0000aa;
}
