/* ─────────────────────────────────────────────
   MANIAC TOWER — Dialogue System Styles
   ───────────────────────────────────────────── */

/* ── Dialogue Box ──────────────────────────── */
#dialogue-box {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 152px;
  background: rgba(4, 4, 20, 0.97);
  border-top: 2px solid #3a3aaa;
  display: flex;
  align-items: stretch;
  gap: 0;
  z-index: 500;
  cursor: pointer;

  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

#dialogue-box.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

/* ── Portrait area ─────────────────────────── */
.dialogue-portrait {
  width: 100px;
  flex-shrink: 0;
  background: #0a0a1e;
  border-right: 2px solid #2a2a6a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  position: relative;
}

/* Portrait types via CSS */
.dialogue-portrait::after {
  content: '?';
  font-size: 28px;
  opacity: 0.4;
}
.portrait-erol::after     { content: '🧔'; }
.portrait-dj::after       { content: '🎧'; }
.portrait-claus::after    { content: '♟️'; }
.portrait-sansi::after    { content: '🌸'; }
.portrait-zombie::after   { content: '🧟'; }
.portrait-schoppe::after  { content: '⚖️'; }
.portrait-sign::after     { content: '📋'; }
.portrait-player::after   { content: '🪖'; }

/* Portrait frame corner decorations */
.dialogue-portrait::before {
  content: '';
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(100, 100, 200, 0.2);
  pointer-events: none;
}

/* ── Text area ─────────────────────────────── */
.dialogue-text-area {
  flex: 1;
  padding: 14px 20px 12px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

/* ── Speaker name ──────────────────────────── */
#dialogue-name {
  font-family: var(--font-game);
  font-size: 10px;
  color: #ffcc44;
  text-shadow: 0 0 8px rgba(255, 200, 40, 0.4);
  letter-spacing: 1px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

/* ── Dialogue text ─────────────────────────── */
#dialogue-text {
  font-family: var(--font-game);
  font-size: 11px;
  color: #d0d0ff;
  line-height: 1.9;
  flex: 1;
  word-break: break-word;
}

/* ── Continue hint ─────────────────────────── */
#dialogue-continue {
  font-family: var(--font-game);
  font-size: 9px;
  color: #88aaff;
  text-align: right;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(100, 150, 255, 0.9), 0 0 16px rgba(80, 120, 255, 0.5);
  animation: continuePulse 0.75s ease-in-out infinite alternate;
  display: none;
}

@keyframes continuePulse {
  from { opacity: 0.55; transform: translateX(0px); }
  to   { opacity: 1;    transform: translateX(3px); }
}

/* ── Bottom frame line ─────────────────────── */
#dialogue-box::before {
  content: '';
  position: absolute;
  top: -1px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    #5566ff 20%,
    #5566ff 80%,
    transparent 100%
  );
}

/* Corner brackets */
#dialogue-box::after {
  content: '';
  position: absolute;
  top: 4px; left: 4px;
  width: 12px; height: 12px;
  border-top: 2px solid #5566ff;
  border-left: 2px solid #5566ff;
}
