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

body {
  font-family: "Segoe UI", "Malgun Gothic", sans-serif;
  background: #000010;
  color: #eee;
  overflow: hidden;
}

#globe {
  position: fixed;
  inset: 0;
}

.panel {
  position: fixed;
  top: 20px;
  left: 20px;
  max-width: 320px;
  padding: 18px 20px;
  background: rgba(10, 15, 40, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  z-index: 10;
}

.panel h1 {
  font-size: 18px;
  margin-bottom: 8px;
}

.panel .desc {
  font-size: 13px;
  color: #b8c0d8;
  line-height: 1.5;
  margin-bottom: 12px;
}

.legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  margin-bottom: 12px;
}

.legend .dot {
  display: inline-block;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.dot.small { width: 8px;  height: 8px;  background: #ffd166; }
.dot.mid   { width: 11px; height: 11px; background: #f77f00; }
.dot.big   { width: 14px; height: 14px; background: #ef233c; }

#status {
  font-size: 12px;
  color: #7fd1ae;
}

.tooltip {
  position: fixed;
  pointer-events: none;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  z-index: 20;
  max-width: 260px;
}

.tooltip.hidden {
  display: none;
}

.tooltip b {
  color: #ffd166;
}

/* ─── 챗봇 패널 ─── */

.chat {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 340px;
  background: rgba(10, 15, 40, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  z-index: 15;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.06);
}

.chat-header button {
  background: none;
  border: none;
  color: #eee;
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
}

.chat.collapsed .chat-body {
  display: none;
}

.chat-body {
  display: flex;
  flex-direction: column;
}

.chat-settings {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-settings input {
  padding: 7px 10px;
  font-size: 12px;
  color: #eee;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  outline: none;
}

.chat-settings input:focus {
  border-color: #7fd1ae;
}

.chat-messages {
  height: 260px;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.msg {
  max-width: 85%;
  padding: 8px 11px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.msg.user {
  align-self: flex-end;
  background: #2a6df4;
  color: #fff;
  border-bottom-right-radius: 3px;
}

.msg.bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.1);
  border-bottom-left-radius: 3px;
}

.msg.error {
  align-self: flex-start;
  background: rgba(239, 35, 60, 0.25);
  border: 1px solid rgba(239, 35, 60, 0.5);
}

.msg.loading {
  color: #b8c0d8;
  font-style: italic;
}

.chat-input {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-input input {
  flex: 1;
  padding: 8px 10px;
  font-size: 13px;
  color: #eee;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  outline: none;
}

.chat-input input:focus {
  border-color: #7fd1ae;
}

.chat-input button {
  padding: 8px 14px;
  font-size: 13px;
  color: #fff;
  background: #2a6df4;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.chat-input button:disabled {
  opacity: 0.5;
  cursor: default;
}
