/* Room Page - 3D Playable Room */
.room-page {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 70px);
  background: #0a0a0a;
}

.room-header {
  background: #1a1a1a;
  padding: 1rem 2rem;
  border-bottom: 2px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.room-info h1 {
  color: #FFD700;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.room-stats {
  display: flex;
  gap: 1.5rem;
}

.room-stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #aaa;
  font-size: 0.9rem;
}

.stat-icon {
  font-size: 1.2rem;
}

.room-canvas {
  flex: 1;
  position: relative;
  background: #000;
  overflow: hidden;
}

.room-canvas canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.canvas-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #FFD700;
}

.canvas-loading .spinner {
  width: 60px;
  height: 60px;
  border: 4px solid #333;
  border-top-color: #FFD700;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

.room-controls {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(26, 26, 26, 0.9);
  padding: 1rem;
  border-radius: 12px;
  border: 2px solid #333;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.control-info {
  color: #aaa;
  font-size: 0.9rem;
}

.control-info strong {
  color: #FFD700;
}

.chat-box {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  width: 350px;
  background: rgba(26, 26, 26, 0.95);
  border: 2px solid #333;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 400px;
}

.chat-messages {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  min-height: 200px;
  max-height: 300px;
}

.chat-message {
  margin-bottom: 0.75rem;
  padding: 0.5rem;
  background: rgba(42, 42, 42, 0.5);
  border-radius: 8px;
  font-size: 0.9rem;
  color: #fff;
}

.chat-message.system {
  background: rgba(255, 215, 0, 0.1);
  border-left: 3px solid #FFD700;
  color: #FFD700;
}

.chat-message strong {
  color: #FFD700;
  margin-right: 0.5rem;
}

.chat-input-container {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  background: rgba(42, 42, 42, 0.8);
  border-top: 1px solid #333;
}

#chat-input {
  flex: 1;
  background: #1a1a1a;
  border: 2px solid #333;
  border-radius: 8px;
  padding: 0.5rem;
  color: #fff;
  font-size: 0.9rem;
}

#chat-input:focus {
  outline: none;
  border-color: #FFD700;
}

.chat-input-container .btn {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* Furniture Interaction Menu */
.furniture-menu {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(26, 26, 26, 0.98);
  border: 3px solid #FFD700;
  border-radius: 16px;
  padding: 2rem;
  min-width: 300px;
  box-shadow: 0 8px 32px rgba(255, 215, 0, 0.3);
  z-index: 10000;
  animation: menuSlideIn 0.3s ease;
}

@keyframes menuSlideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -40%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.menu-title {
  color: #FFD700;
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 1.5rem;
  text-align: center;
}

.menu-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.menu-action-btn {
  background: linear-gradient(135deg, #FF1493, #FFD700);
  border: none;
  border-radius: 12px;
  padding: 1rem;
  color: #fff;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.menu-action-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(255, 215, 0, 0.5);
}

.action-icon {
  font-size: 1.5rem;
}

.action-label {
  flex: 1;
  text-align: left;
}

.menu-close-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: transparent;
  border: none;
  color: #888;
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.2s;
}

.menu-close-btn:hover {
  color: #FFD700;
}

/* Responsive */
@media (max-width: 768px) {
  .chat-box {
    width: calc(100% - 2rem);
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }

  .room-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .furniture-menu {
    min-width: calc(100% - 4rem);
    max-width: calc(100% - 4rem);
  }
}
