* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background: #313338;
  color: #dbdee1;
  height: 100vh;
  display: flex;
  overflow: hidden;
}

/* ===== SERVER LIST ===== */
.servers {
  width: 72px;
  background: #1e1f22;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  gap: 8px;
}

.server-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #313338;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  cursor: pointer;
  transition: border-radius 0.15s, background 0.15s;
}

.server-icon:hover,
.server-icon.active {
  border-radius: 16px;
  background: #5865f2;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: 240px;
  background: #2b2d31;
  display: flex;
  flex-direction: column;
}

.server-header {
  height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.channels {
  flex: 1;
  padding: 16px 8px;
  overflow-y: auto;
}

.channel-category {
  font-size: 12px;
  font-weight: 600;
  color: #949ba4;
  text-transform: uppercase;
  padding: 8px 8px 4px;
  letter-spacing: 0.02em;
}

.channel {
  display: flex;
  align-items: center;
  padding: 6px 8px;
  border-radius: 4px;
  cursor: pointer;
  color: #949ba4;
  font-size: 15px;
  margin-bottom: 1px;
}

.channel:hover {
  background: #35373c;
  color: #dbdee1;
}

.channel.active {
  background: #404249;
  color: #fff;
}

.channel-hash {
  margin-right: 6px;
  font-weight: 500;
  color: #80848e;
}

/* ===== USER AREA ===== */
.user-area {
  height: 52px;
  background: #232428;
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 8px;
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #5865f2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
}

.user-info {
  flex: 1;
  overflow: hidden;
}

.username {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-status {
  font-size: 12px;
  color: #949ba4;
}

/* ===== MAIN CHAT ===== */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #313338;
}

.chat-header {
  height: 48px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
  font-weight: 600;
  font-size: 16px;
  gap: 8px;
}

.chat-header .hash {
  color: #80848e;
  font-size: 22px;
  font-weight: 500;
}

/* Messages */
.messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.message {
  display: flex;
  gap: 16px;
  padding: 2px 0;
  border-radius: 4px;
}

.message:hover {
  background: #2e3035;
}

.message-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #5865f2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
  margin-top: 2px;
}

.message-content {
  flex: 1;
  min-width: 0;
}

.message-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 2px;
}

.message-username {
  font-weight: 600;
  color: #f2f3f5;
  font-size: 15px;
}

.message-time {
  font-size: 12px;
  color: #949ba4;
}

.message-text {
  font-size: 15px;
  line-height: 1.4;
  color: #dbdee1;
  word-wrap: break-word;
}

/* Input area */
.input-area {
  padding: 0 16px 24px;
}

.input-box {
  background: #383a40;
  border-radius: 8px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.input-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #dbdee1;
  font-size: 15px;
  padding: 4px 0;
}

.input-box input::placeholder {
  color: #6d6f78;
}

.input-box button {
  background: #5865f2;
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}

.input-box button:hover {
  background: #4752c4;
}

/* Login overlay */
#login-overlay {
  position: fixed;
  inset: 0;
  background: #313338;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.login-box {
  background: #2b2d31;
  padding: 32px;
  border-radius: 8px;
  width: 400px;
  text-align: center;
}

.login-box h1 {
  font-size: 24px;
  margin-bottom: 8px;
}

.login-box p {
  color: #949ba4;
  margin-bottom: 20px;
}

.login-box input {
  width: 100%;
  padding: 12px;
  background: #1e1f22;
  border: none;
  border-radius: 4px;
  color: white;
  font-size: 15px;
  margin-bottom: 16px;
  outline: none;
}

.login-box button {
  width: 100%;
  padding: 12px;
  background: #5865f2;
  border: none;
  border-radius: 4px;
  color: white;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.login-box button:hover {
  background: #4752c4;
}