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

body {
  font-family: "Courier New", monospace;
  background: #000000;
  color: #ffffff;
  overflow: hidden;
}

.container {
  display: flex;
  height: 100vh;
  flex-direction: column;
}

.header {
  background: #000000;
  border-bottom: 1px solid #333333;
  padding: 8px 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.user-info {
  margin-right: auto;
}

.username-display {
  font-weight: bold;
  color: #ffc000;
  font-size: 12px;
}

.logout-link {
  color: #ffc000;
  text-decoration: none;
  font-weight: bold;
}

.logout-link:hover {
  text-decoration: underline;
}

.header-label {
  font-size: 12px;
  color: #999999;
  white-space: nowrap;
}

.header-input {
  padding: 4px 8px;
  background: #000000;
  border: 1px solid #333333;
  color: #ffffff;
  font-size: 12px;
  outline: none;
  height: 24px;
  font-family: "Courier New", monospace;
}

.header-input:focus {
  border-color: #282828;
}

#nameInput {
  width: 100px;
}

#textInput {
  flex: 1;
  min-width: 150px;
}

.btn-send {
  padding: 4px 12px;
  background: #333333;
  color: #ffffff;
  border: 1px solid #555555;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  font-family: "Courier New", monospace;
}

.btn-send:hover:not(:disabled) {
  background: #444444;
}

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

.header-right {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}

.auth-links {
  display: flex;
  gap: 8px;
}

.auth-links a {
  padding: 4px 10px;
  background: #333333;
  color: #ffffff;
  text-decoration: none;
  border: 1px solid #555555;
  font-size: 11px;
  cursor: pointer;
  font-family: "Courier New", monospace;
}

.auth-links a:hover {
  background: #444444;
}

/* Tambahkan styling untuk link Emotikon */
.emotikon-link {
  padding: 4px 10px;
  
  color: #3ddb00;
  text-decoration: none;
  border: 1px solid #555555;
  font-size: 11px;
  cursor: pointer;
  font-family: "Courier New", monospace;
  font-weight: bold;
  white-space: nowrap;
}

.emotikon-link:hover {
  background: #444444;
  color: #5dff00;
  text-shadow: 0 0 5px rgba(61, 219, 0, 0.5);
}

.back-link {
  padding: 4px 10px;
  background: #333333;
  color: #ffffff;
  text-decoration: none;
  border: 1px solid #555555;
  font-size: 11px;
  cursor: pointer;
  font-family: "Courier New", monospace;
  white-space: nowrap;
}

.back-link:hover {
  background: #444444;
}

.content {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  border-left: 2px solid #282828;
  border-right: 2px solid #282828;
}

.chat-title {
  background: #ff9800;
  padding: 10px 15px;
  text-align: center;
  font-size: 14px;
  color: #060606;
  font-weight: bold;
  letter-spacing: 2px;
  border-bottom: 1px solid #333333;
}

#warningContainer {
  padding: 0px 0px;
  min-height: 0;
}

.warning-message {
  background: #cc0000;
  color: #ffffff;
  padding: 8px 12px;
  border: 1px solid #ff6b6b;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
}

.messages {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  font-size: 12px;
  line-height: 1.1;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.messages::-webkit-scrollbar {
  display: none;
}

.message {
  word-wrap: break-word;
  white-space: pre;
  padding: 6px 15px;
  margin: 0;
  border: none;
  border-radius: 0;
  display: flex;
  align-items: center;
  gap: 0;
}

.message:nth-child(odd) {
  background: #0d0d0d;
}

.message:nth-child(even) {
  background: #1a1a1a;
}

.message-username {
  font-weight: bold;
  margin-right: 0;
  flex-shrink: 0;
}

.message-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  white-space: nowrap;
  margin-left: auto;
}

/* Delete button styling */
.btn-delete-message {
  background: none;
  border: none;
  color: #737373;
  cursor: pointer;
  font-size: 12px;
  padding: 0 4px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-delete-message:hover {
  color: #ffdd00;
  text-shadow: 0 0 5px rgba(255, 192, 0, 0.5);
}

/* IP address styling */
.message-ip {
  color: #ffc000;
  font-size: 10px;
  opacity: 0.8;
}

.message-ip:hover {
  opacity: 1;
  text-shadow: 0 0 3px rgba(255, 192, 0, 0.5);
}

/* Perbaiki users sidebar dengan garis kanan dan kiri yang seimbang */
.users-sidebar {
  width: 180px;
  background: #000000;
  border-left: 0px solid #282828;
  border-right: 2px solid #282828;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.5);
}

.users-sidebar.hidden {
  display: none;
}

.users-header {
  padding: 8px 10px;
  border-bottom: 1px solid #333333;
  font-size: 11px;
  color: #999999;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.btn-close-users {
  background: none;
  border: none;
  color: #fb2828;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-close-users:hover {
  color: #a64646;
}

.users-list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px;
  font-size: 11px;
}

.users-list::-webkit-scrollbar {
  width: 6px;
}

.users-list::-webkit-scrollbar-track {
  background: #000000;
}

.users-list::-webkit-scrollbar-thumb {
  background: #0066ff;
  border-radius: 3px;
}

.user-item {
  padding: 4px 6px;
  margin-bottom: 2px;
  cursor: pointer;
  color: #cccccc;
}

.user-item:hover {
  background: #1a1a1a;
}

/* Tambah styling untuk formatting pesan */
.message [B] {
  font-weight: bold;
}

.message [I] {
  font-style: italic;
}

.message [U] {
  text-decoration: underline;
}

.message [S] {
  text-decoration: line-through;
}

.message [BLINK] {
  animation: blink 1s infinite;
}

@keyframes blink {
  0%,
  50% {
    opacity: 1;
  }
  51%,
  100% {
    opacity: 0;
  }
}

.message [Link] {
  color: #ff0000;
  font-weight: bold;
}