* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Courier New', monospace;
  background: #f5f5f5;
  min-height: 100vh;
  transition: background 0.4s, color 0.4s;
}

body.incognito {
  background: #0a0a0a;
  color: #ccc;
}

.ie-app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 16px;
}

.ie-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  margin-bottom: 20px;
  gap: 8px;
}

.ie-header a { color: inherit; opacity: 0.5; text-decoration: none; }
.ie-mode {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border: 1px solid currentColor;
  opacity: 0.7;
}

body.incognito .ie-mode { color: #f44; border-color: #f44; }

.ie-entity-wrap { text-align: center; margin-bottom: 16px; }

.ie-entity {
  width: 80px;
  height: 80px;
  margin: 0 auto 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: #e0e0e0;
  transition: all 0.4s;
}

body.incognito .ie-entity {
  background: #200;
  box-shadow: 0 0 40px rgba(255,0,0,0.4);
  animation: ie-pulse 0.8s infinite alternate;
}

@keyframes ie-pulse {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

.ie-entity-name { font-size: 0.85rem; opacity: 0.7; }

.ie-chat {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
  min-height: 200px;
}

.ie-msg {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.45;
  max-width: 92%;
}

.ie-msg--entity {
  background: #e8e8e8;
  align-self: flex-start;
}

body.incognito .ie-msg--entity {
  background: #1a0000;
  color: #f88;
  border: 1px solid #400;
}

.ie-msg--user {
  background: #d0e8ff;
  align-self: flex-end;
}

body.incognito .ie-msg--user {
  background: #111;
  color: #aaa;
}

.ie-input-row {
  display: flex;
  gap: 8px;
}

.ie-input-row input {
  flex: 1;
  padding: 10px;
  font-family: inherit;
  font-size: 0.85rem;
  border: 1px solid #ccc;
  background: #fff;
}

body.incognito .ie-input-row input {
  background: #111;
  border-color: #400;
  color: #eee;
}

.ie-input-row button {
  padding: 10px 16px;
  font-family: inherit;
  cursor: pointer;
  background: #333;
  color: #fff;
  border: none;
}

.ie-foot {
  font-size: 0.68rem;
  opacity: 0.5;
  margin-top: 12px;
  text-align: center;
  line-height: 1.5;
}

.ie-unmask {
  display: block;
  margin: 10px auto 0;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  opacity: 0.85;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ie-unmask:hover { opacity: 1; }
