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

body {
  font-family: 'Segoe UI', 'PingFang SC', Roboto, sans-serif;
  background: #0d1117;
  color: #c9d1d9;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

#login {
  background: #161b22;
  padding: 40px 50px;
  border-radius: 12px;
  border: 1px solid #30363d;
  text-align: center;
  max-width: 400px;
  width: 90%;
}

#login h2 {
  font-size: 24px;
  font-weight: 400;
  color: #f0f6fc;
  margin-bottom: 8px;
}

#login p {
  color: #8b949e;
  font-size: 14px;
  margin-bottom: 20px;
}

#login input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 6px;
  border: 1px solid #30363d;
  background: #0d1117;
  color: #c9d1d9;
  font-size: 16px;
  outline: none;
  margin-bottom: 16px;
}

#login input:focus {
  border-color: #58a6ff;
}

#login button {
  width: 100%;
  padding: 12px;
  border-radius: 6px;
  border: none;
  background: #238636;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

#login button:hover {
  background: #2ea043;
}

#chat {
  width: 100%;
  max-width: 700px;
  height: 90vh;
  background: #161b22;
  border-radius: 12px;
  border: 1px solid #30363d;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid #30363d;
  background: #0d1117;
  flex-shrink: 0;
}

#header span {
  font-size: 14px;
  color: #8b949e;
}

#header strong {
  color: #f0f6fc;
}

#header button {
  padding: 4px 14px;
  border-radius: 4px;
  border: 1px solid #30363d;
  background: transparent;
  color: #8b949e;
  font-size: 13px;
  cursor: pointer;
}

#header button:hover {
  color: #f0f6fc;
  border-color: #8b949e;
}

#messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#messages .msg {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font-size: 14px;
  line-height: 1.6;
}

#messages .msg .name {
  font-weight: 600;
  color: #58a6ff;
  white-space: nowrap;
}

#messages .msg .time {
  color: #484f58;
  font-size: 12px;
  white-space: nowrap;
}

#messages .msg .text {
  color: #c9d1d9;
  word-break: break-word;
}

#inputArea {
  display: flex;
  gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid #30363d;
  background: #0d1117;
  flex-shrink: 0;
}

#inputArea input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid #30363d;
  background: #0d1117;
  color: #c9d1d9;
  font-size: 14px;
  outline: none;
}

#inputArea input:focus {
  border-color: #58a6ff;
}

#inputArea button {
  padding: 10px 24px;
  border-radius: 6px;
  border: none;
  background: #238636;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

#inputArea button:hover {
  background: #2ea043;
}