/* TFIA Backrooms - Dark atmospheric styling */

.backrooms-body {
  background: #0a0a0a;
  color: #e0e0e0;
  min-height: 100vh;
}

.backrooms-container {
  display: flex;
  height: calc(100vh - 200px);
  max-width: 1400px;
  margin: 0 auto;
  gap: 20px;
  padding: 20px;
}

/* Sidebar */
.rooms-sidebar {
  width: 280px;
  background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  padding: 20px;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.sidebar-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #2a2a2a;
}

.sidebar-header h2 {
  margin: 0 0 8px 0;
  font-size: 24px;
  color: #00ff88;
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.sidebar-subtitle {
  margin: 0;
  font-size: 12px;
  color: #888;
  font-style: italic;
}

.rooms-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.room-category {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.category-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #666;
  margin: 0 0 8px 0;
  font-weight: 600;
}

.room-button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  color: #e0e0e0;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: left;
  width: 100%;
  position: relative;
}

.room-button:hover:not(:disabled) {
  background: #2a2a2a;
  border-color: #00ff88;
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
  transform: translateX(4px);
}

.room-button.active {
  background: linear-gradient(135deg, #1a3a2a 0%, #0f2a1a 100%);
  border-color: #00ff88;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
}

.room-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.room-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.room-name {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}

.room-lock {
  font-size: 10px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Chat Area */
.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #1a1a1a 0%, #0f0f0f 100%);
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

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

.room-info h1 {
  margin: 0 0 8px 0;
  font-size: 24px;
  color: #00ff88;
  text-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.room-info p {
  margin: 0;
  font-size: 14px;
  color: #888;
  font-style: italic;
}

.room-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #888;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #666;
  animation: pulse 2s infinite;
}

.status-dot.connected {
  background: #00ff88;
  box-shadow: 0 0 8px rgba(0, 255, 136, 0.6);
}

.status-dot.disconnected {
  background: #ff4444;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Messages Container */
.messages-container {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: linear-gradient(180deg, #0f0f0f 0%, #0a0a0a 100%);
}

.messages-container::-webkit-scrollbar {
  width: 8px;
}

.messages-container::-webkit-scrollbar-track {
  background: #1a1a1a;
}

.messages-container::-webkit-scrollbar-thumb {
  background: #2a2a2a;
  border-radius: 4px;
}

.messages-container::-webkit-scrollbar-thumb:hover {
  background: #3a3a3a;
}

.welcome-message {
  text-align: center;
  padding: 40px 20px;
  color: #666;
  font-style: italic;
}

.welcome-message p {
  margin: 8px 0;
}

.message {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px;
  border-radius: 8px;
  background: #1a1a1a;
  border-left: 3px solid transparent;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.user {
  border-left-color: #4a9eff;
  background: linear-gradient(135deg, #1a2a3a 0%, #1a1a1a 100%);
}

.message.ai {
  border-left-color: #00ff88;
  background: linear-gradient(135deg, #1a3a2a 0%, #1a1a1a 100%);
}

.message.system {
  border-left-color: #888;
  background: #1a1a1a;
  opacity: 0.7;
}

.message-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.message-username {
  font-weight: 600;
  font-size: 14px;
}

.message.user .message-username {
  color: #4a9eff;
}

.message.ai .message-username {
  color: #00ff88;
}

.message-content {
  font-size: 15px;
  line-height: 1.6;
  color: #e0e0e0;
  word-wrap: break-word;
}

.message-timestamp {
  font-size: 11px;
  color: #666;
  margin-top: 4px;
}

/* Message Input */
.message-input-container {
  padding: 20px 24px;
  border-top: 1px solid #2a2a2a;
  background: #1a1a1a;
}

.message-form {
  display: flex;
  gap: 12px;
}

.message-input {
  flex: 1;
  padding: 12px 16px;
  background: #0f0f0f;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  color: #e0e0e0;
  font-size: 15px;
  transition: all 0.3s ease;
}

.message-input:focus {
  outline: none;
  border-color: #00ff88;
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.2);
}

.message-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.send-button {
  padding: 12px 24px;
  background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
  border: none;
  border-radius: 8px;
  color: #000;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.send-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #00cc6a 0%, #00ff88 100%);
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.4);
  transform: translateY(-2px);
}

.send-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .backrooms-container {
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 200px);
  }

  .rooms-sidebar {
    width: 100%;
    max-height: 300px;
  }

  .chat-area {
    min-height: 500px;
  }
}

/* Room transition effects */
.room-transition {
  animation: fadeOut 0.3s ease;
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0.3;
  }
}

