/* ============================================
   小薇和威威的3D小家 - 样式表
   ============================================ */

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

body {
  margin: 0;
  overflow: hidden;
  font-family: 'Microsoft YaHei', 'PingFang SC', sans-serif;
  background: #14142a;
}

/* -------- 加载画面 -------- */
#loading {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #14142a;
  color: #ffb6c1;
  font-size: 20px;
  z-index: 100;
  transition: opacity 0.8s;
}
#loading.hide {
  opacity: 0;
  pointer-events: none;
}

/* -------- UI 层 -------- */
#ui {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

/* 标题 */
#title {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  padding: 5px 16px;
  border-radius: 14px;
  font-size: 13px;
  white-space: nowrap;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* 访问计数 */
#info {
  position: absolute;
  top: 14px;
  right: 14px;
  color: rgba(255, 255, 255, 0.35);
  font-size: 11px;
  text-align: right;
  line-height: 1.5;
}

/* 操作提示 */
#ctrl {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.2);
  font-size: 11px;
  background: rgba(0, 0, 0, 0.2);
  padding: 3px 12px;
  border-radius: 8px;
}

/* -------- 气泡 -------- */
#bubble {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 240, 228, 0.93);
  color: #553;
  padding: 12px 20px;
  border-radius: 14px;
  font-size: 14px;
  max-width: 320px;
  text-align: center;
  min-width: 80px;
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 200, 150, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
#bubble.show {
  opacity: 1;
}
#bubble::after {
  content: '';
  position: absolute;
  bottom: -7px;
  left: 50%;
  transform: translateX(-50%);
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 7px solid rgba(255, 240, 228, 0.93);
}

/* 提示文字 */
#hint {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.3);
  font-size: 11px;
  opacity: 0;
  transition: opacity 0.6s;
}
#hint.show {
  opacity: 1;
}

/* -------- 聊天区域 -------- */
#chat-area {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
#chat-area.show {
  opacity: 1;
  pointer-events: auto;
}

#chat-input {
  width: 240px;
  padding: 10px 14px;
  border-radius: 20px;
  border: none;
  background: rgba(30, 30, 50, 0.85);
  color: #fff;
  font-size: 14px;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  outline: none;
  font-family: inherit;
}
#chat-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}
#chat-input:focus {
  border-color: rgba(255, 150, 200, 0.4);
}

#chat-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 100, 130, 0.7);
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.15s;
  pointer-events: auto;
}
#chat-send:hover {
  transform: scale(1.1);
}

/* -------- 动作按钮 -------- */
#btns {
  position: absolute;
  bottom: 70px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: auto;
}
#btns button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.4);
  color: rgba(255, 255, 255, 0.6);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
}
#btns button:hover {
  transform: scale(1.1);
  background: rgba(255, 255, 255, 0.15);
}
#btns button.on {
  border-color: #ff6b9d;
  color: #ff6b9d;
}
