/* FILE: client/src/style.css */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700&display=swap');

:root {
  font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, sans-serif;
  --ui-dark: rgba(28, 31, 25, 0.88);
  --ui-border: rgba(255, 255, 255, 0.14);
  --ui-text: #f3f0e8;
  --ui-muted: #b8b5ab;
  --chant-bg: rgba(132, 114, 82, 0.86);
  --chant-border: rgba(218, 196, 152, 0.45);
}

* {
  box-sizing: border-box;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #bfc7be;
}

.tinh-tam-shell {
  position: relative;
  width: 100vw;
  height: 100dvh;
  overflow: hidden;
}

.world-viewport {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.world-viewport canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

/* THANH HUD PHÍA TRÊN */
.hud-top {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  pointer-events: none;
}

.top-left-group {
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
}

.icon-circle-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--ui-dark);
  border: 1px solid var(--ui-border);
  color: var(--ui-text);
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.room-pill-btn {
  height: 46px;
  padding: 0 18px;
  border-radius: 24px;
  background: var(--ui-dark);
  border: 1px solid var(--ui-border);
  color: var(--ui-text);
  font: 500 15px 'Be Vietnam Pro', sans-serif;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #53d769;
  display: inline-block;
}

.top-right-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: auto;
}

.utility-pill {
  height: 46px;
  padding: 0 14px;
  border-radius: 24px;
  background: var(--ui-dark);
  border: 1px solid var(--ui-border);
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--ui-text);
  backdrop-filter: blur(12px);
}

.utility-btn {
  background: transparent;
  border: none;
  color: var(--ui-text);
  display: flex;
  align-items: center;
  gap: 5px;
  font: 500 15px 'Be Vietnam Pro', sans-serif;
  cursor: pointer;
  padding: 4px;
}

.chant-pill-btn {
  height: 42px;
  padding: 0 18px;
  border-radius: 22px;
  background: var(--chant-bg);
  border: 1px solid var(--chant-border);
  color: #fff8ea;
  font: 500 14px 'Be Vietnam Pro', sans-serif;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: filter 0.2s ease;
}

.chant-pill-btn.active {
  background: rgba(168, 134, 72, 0.95);
  border-color: #ffe299;
}

/* THÔNG BÁO CHÀO GIỮA MÀN HÌNH */
.center-greeting-toast {
  position: absolute;
  top: 32%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 12;
  padding: 13px 26px;
  border-radius: 28px;
  background: rgba(34, 38, 32, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #f7f4ec;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
  backdrop-filter: blur(10px);
  transition: opacity 0.3s ease;
}

/* NÚT CHAT TRÒN & THANH DOCK DƯỚI CÙNG */
.chat-fab-btn {
  position: absolute;
  left: 18px;
  bottom: 98px;
  z-index: 15;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--ui-dark);
  border: 1px solid var(--ui-border);
  color: var(--ui-text);
  display: grid;
  place-items: center;
  cursor: pointer;
  backdrop-filter: blur(12px);
}

.bottom-dock-bar {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 18px;
  max-width: 520px;
  margin: 0 auto;
  height: 68px;
  border-radius: 34px;
  background: var(--ui-dark);
  border: 1px solid var(--ui-border);
  z-index: 15;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.32);
}

.dock-item-btn {
  background: transparent;
  border: none;
  color: var(--ui-text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font: 500 13px 'Be Vietnam Pro', sans-serif;
  cursor: pointer;
  height: 100%;
  border-radius: 34px;
  transition: background 0.2s ease;
}

.dock-item-btn:hover,
.dock-item-btn.active {
  background: rgba(255, 255, 255, 0.08);
}

.dock-item-btn svg {
  width: 22px;
  height: 22px;
  stroke: #e8e4d8;
}

/* MODAL ĐỔI TÊN & TRÀNG HẠT */
.modal-backdrop {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: rgba(14, 16, 13, 0.65);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 16px;
}

.sacred-modal {
  width: min(380px, 100%);
  background: #232720;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  padding: 24px;
  color: var(--ui-text);
}

.sacred-modal h2 {
  margin: 0 0 6px;
  font-size: 20px;
  text-align: center;
}

.sacred-modal p {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--ui-muted);
  text-align: center;
}

.field-label {
  display: block;
  font-size: 12px;
  color: var(--ui-muted);
  margin: 12px 0 6px;
}

.sacred-modal input {
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
  font-size: 14px;
  outline: none;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.modal-actions button {
  flex: 1;
  padding: 11px;
  border-radius: 14px;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--ui-text);
}

.btn-primary {
  background: #d99b26;
  color: #1c1912;
}