/* ── SkyBox Chat Room Styles ───────────────────────────────────── */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #1a1a2e;
  color: #e0e0e0;
  height: 100vh;
}

.app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: #16213e;
  border-bottom: 1px solid #0f3460;
}

.header h1 { font-size: 1.3rem; color: #e94560; }

.status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.dot.online  { background: #4ade80; box-shadow: 0 0 6px #4ade80; }
.dot.offline { background: #6b7280; }
.dot.error   { background: #ef4444; }

.layout { display: flex; flex: 1; overflow: hidden; }
.chat-area { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.room-info {
  padding: 8px 16px;
  background: #1a1a3e;
  border-bottom: 1px solid #0f3460;
  font-size: 0.85rem;
  color: #94a3b8;
}

.room-info span { color: #e0e0e0; font-weight: 600; }

.messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.message {
  padding: 8px 12px;
  border-radius: 8px;
  max-width: 80%;
  word-wrap: break-word;
  line-height: 1.4;
}

.message.chat      { background: #16213e; align-self: flex-start; }
.message.chat.self { background: #1e3a5f; align-self: flex-end; }
.message .user     { color: #e94560; font-weight: 600; font-size: 0.85rem; }
.message .time     { color: #64748b; font-size: 0.7rem; margin-left: 8px; }
.message.join      { background: #0f3460; align-self: center; font-size: 0.8rem; color: #93c5fd; }
.message.leave     { background: #0f3460; align-self: center; font-size: 0.8rem; color: #fca5a5; }
.message.notice    { background: #1e293b; align-self: center; font-size: 0.8rem; color: #cbd5e1; font-style: italic; }
.message.system    { align-self: center; font-size: 0.8rem; color: #64748b; }
.message.error     { background: #3b1a1a; align-self: center; color: #fca5a5; }
.message.help      { background: #1e293b; align-self: flex-start; font-size: 0.8rem; color: #94a3b8; white-space: pre-line; }
.message.private   { background: #2d1b4e; align-self: flex-start; color: #c4b5fd; }

.input-area {
  display: flex;
  padding: 12px 16px;
  background: #16213e;
  border-top: 1px solid #0f3460;
  gap: 8px;
}

.input-area input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #0f3460;
  border-radius: 8px;
  background: #1a1a2e;
  color: #e0e0e0;
  font-size: 0.95rem;
  outline: none;
}

.input-area input:focus { border-color: #e94560; }

.input-area button {
  padding: 10px 20px;
  background: #e94560;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
}

.input-area button:hover { background: #d63851; }

.sidebar {
  width: 220px;
  background: #16213e;
  border-left: 1px solid #0f3460;
  padding: 16px;
  overflow-y: auto;
  display: none;
  flex-direction: column;
  gap: 12px;
}

.sidebar h3 {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 1px;
}

.sidebar ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }

.user-list li {
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.9rem;
}

.user-list li:nth-child(odd) { background: #1a1a3e; }

.commands li {
  font-size: 0.8rem;
  color: #94a3b8;
  padding: 2px 0;
}

.commands code { color: #e94560; font-size: 0.75rem; }

@media (min-width: 768px) { .sidebar { display: flex; } }
