/* ========================================================= */
/* 3. HABBO ISOMETRIC GAME WORLD & CHAT STYLES               */
/* ========================================================= */

#screen-game {
  background: #050508;
  flex-direction: column;
}

.game-topbar {
  background: #09090c;
  border-bottom: 2px solid var(--card-border);
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
}

.room-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.room-title {
  font-family: var(--font-pixel);
  font-size: 13px;
  color: var(--kaywat-green);
}

.viewport-container {
  position: relative;
  flex-grow: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 50%, #0c0c12 0%, #050508 100%);
}

canvas#isoCanvas {
  image-rendering: pixelated;
  cursor: pointer;
}

#chat-bubbles-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 20;
}

.speech-bubble {
  position: absolute;
  background: #ffffff;
  color: #000000;
  border: 2px solid #000000;
  border-radius: 8px;
  padding: 6px 12px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 2px 4px 10px rgba(0,0,0,0.5);
  transform: translate(-50%, -100%);
  pointer-events: auto;
  animation: bubblePop 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.speech-bubble::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 8px 6px 0 6px;
  border-style: solid;
  border-color: #000 transparent transparent transparent;
}

.speech-bubble .username {
  color: var(--kaywat-green);
  margin-right: 4px;
}

@keyframes bubblePop {
  0% { transform: translate(-50%, -80%) scale(0.5); opacity: 0; }
  100% { transform: translate(-50%, -100%) scale(1); opacity: 1; }
}

.game-chatbar {
  background: #09090c;
  border-top: 2px solid var(--card-border);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 30;
}

.chat-input-wrapper {
  flex-grow: 1;
  position: relative;
  display: flex;
  align-items: center;
}

.chat-input {
  width: 100%;
  background: #000000;
  border: 2px solid var(--card-border);
  border-radius: 20px;
  padding: 10px 18px;
  color: #fff;
  font-family: var(--font-main);
  font-size: 15px;
  outline: none;
}

.chat-input:focus {
  border-color: var(--kaywat-green);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

.quick-emojis {
  display: flex;
  gap: 6px;
}

.emoji-btn {
  background: rgba(255,255,255,0.08);
  border: 1px solid var(--card-border);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  cursor: pointer;
  transition: transform 0.15s;
}

.emoji-btn:hover {
  transform: scale(1.2);
  background: rgba(34, 197, 94, 0.2);
  border-color: var(--kaywat-green);
}

.chat-history-panel {
  position: absolute;
  top: 65px;
  left: 20px;
  width: 320px;
  max-height: 220px;
  background: rgba(9, 9, 12, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: auto;
  z-index: 15;
  font-size: 13px;
}

.chat-line .user {
  font-weight: 700;
  color: var(--kaywat-green);
}

/* Furniture Drawer for Decorator Mode */
.furni-drawer {
  position: absolute;
  top: 60px;
  right: 20px;
  width: 260px;
  background: #09090c;
  border: 2px solid var(--card-border);
  border-radius: 12px;
  padding: 16px;
  display: none;
  flex-direction: column;
  gap: 12px;
  z-index: 35;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.furni-drawer.active {
  display: flex;
}

.furni-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
}

.furni-item-btn {
  background: #000000;
  border: 1px solid var(--card-border);
  border-radius: 6px;
  height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  transition: all 0.15s;
}

.furni-item-btn:hover {
  border-color: var(--kaywat-green);
  background: rgba(34, 197, 94, 0.15);
}

.btn-habbo {
  background: #000000;
  color: #ffffff;
  border: 2px solid #ffffff;
  border-radius: 6px;
  font-family: var(--font-pixel);
  font-size: 11px;
  padding: 10px 16px;
  cursor: pointer;
  box-shadow: 0 4px 0 #1f2937;
  transition: all 0.1s;
  text-transform: uppercase;
}

.btn-habbo:hover {
  border-color: var(--kaywat-green);
  color: var(--kaywat-green-glow);
  box-shadow: 0 4px 0 #1f2937, 0 0 15px rgba(34, 197, 94, 0.4);
}

.btn-habbo.secondary {
  background: #09090c;
  color: var(--text-sub);
  border-color: var(--card-border);
  box-shadow: 0 4px 0 #000000;
}

.btn-habbo.secondary:hover {
  border-color: #ffffff;
  color: #ffffff;
}
