* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #1e1f22;
  color: #e5e7eb;
}

.hidden {
  display: none !important;
}

.auth-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
}

.card {
  width: min(95vw, 480px);
  background: #2b2d31;
  padding: 24px;
  border-radius: 12px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.tab-btn {
  background: #3b3f45;
}

.tab-btn.active {
  background: #5865f2;
}

.auth-form {
  margin-bottom: 8px;
}

input, button {
  width: 100%;
  margin-top: 8px;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #3f4248;
  background: #1f2125;
  color: #fff;
}

button {
  background: #5865f2;
  cursor: pointer;
}

.app {
  display: grid;
  grid-template-columns: 88px 260px 1fr 240px;
  min-height: 100vh;
}

.servers {
  background: #1a1b1e;
  padding: 10px;
  border-right: 1px solid #2d3138;
}

.channels {
  background: #2b2d31;
  padding: 12px;
  border-right: 1px solid #2d3138;
}

.chat {
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  background: #313338;
}

.members {
  background: #2b2d31;
  padding: 12px;
  border-left: 1px solid #2d3138;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid #2d3138;
}

.title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.title-row button {
  width: 42px;
}

#serverList button,
#channelList button,
#roleList button {
  text-align: left;
}

#serverList button.active,
#channelList button.active {
  background: #4752c4;
}

.panel-section {
  margin-top: 12px;
  border-top: 1px solid #3f4248;
  padding-top: 10px;
}

.messages {
  overflow: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.msg {
  background: #1f2125;
  border-radius: 8px;
  padding: 8px;
}

.msg .flag {
  display: inline-block;
  margin-top: 6px;
  font-size: 11px;
  background: #3f2a2a;
  color: #fca5a5;
  padding: 3px 6px;
  border-radius: 999px;
}

.msg .meta {
  font-size: 12px;
  color: #9ca3af;
}

.msg .reactions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}

.msg .reactions button {
  width: auto;
  padding: 4px 8px;
  margin: 0;
  background: #3b3f45;
}

.message-form {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  padding: 12px;
}

.rtc-controls {
  display: flex;
  gap: 8px;
}

.rtc-controls button {
  width: auto;
}

.videos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid #2d3138;
}

video {
  width: 100%;
  min-height: 140px;
  background: #0f1012;
  border-radius: 8px;
}

.status {
  min-height: 18px;
  color: #fca5a5;
  padding: 0 12px 12px;
}

#memberList,
#modList {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.member-row,
.mod-row {
  background: #1f2125;
  border: 1px solid #3f4248;
  border-radius: 8px;
  padding: 8px;
  font-size: 13px;
}

@media (max-width: 1100px) {
  .app {
    grid-template-columns: 88px 240px 1fr;
  }

  .members {
    display: none;
  }
}
