/* @font-face{
    font-family: "tahoma";
    src: url("fonts/cd0381aa3322dff4babd137f03829c8c.eot");
    src: url("fonts/cd0381aa3322dff4babd137f03829c8c.eot?#iefix")format("embedded-opentype"),
        url("fonts/cd0381aa3322dff4babd137f03829c8c.woff")format("woff"),
        url("fonts/cd0381aa3322dff4babd137f03829c8c.woff2")format("woff2"),
        url("fonts/cd0381aa3322dff4babd137f03829c8c.ttf")format("truetype"),
        url("fonts/cd0381aa3322dff4babd137f03829c8c.svg#Tahoma")format("svg");
    font-weight:normal;
    font-style:normal;
    font-display:swap;
    unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF;
} */

@font-face{
    font-family: "corsl";
    src: url("fonts/Consolas.eot");
    src: url("fonts/Consolas.eot?#iefix")format("embedded-opentype"),
        url("fonts/Consolas.woff")format("woff"),
        url("fonts/Consolas.woff2")format("woff2"),
        url("fonts/Consolas.ttf")format("truetype"),
        url("fonts/Consolas.svg#corsl")format("svg");
    font-weight:normal;
    font-style:normal;
    font-display:swap;
}

/* CRITICAL: Full screen, no padding, no body margins */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.chat-feed div, .private-feed div {
    margin: 5px 0px;
}

.chat-feed .arabic, .private-feed .arabic {
    font-size: 16px; /* Arabic text slightly bigger */
    font-family: corsl;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #008080;
/*  font-family: 'MS Sans Serif', sans-serif; */
  font-family: corsl;
  font-size: 14px; /* Larger base font */
}

.fake {
    width: 30px;
    min-width: unset !important;
    padding: 5px 7px 5px 5px !important;
    position: fixed;
    right: 10px;
}

.dialog-body {
  padding: 150px 30px;
}
.minimize-btn, .close-btn {
    min-width: unset !important;
}

.greeting {
    margin-top: 30px;
}

/* CRITICAL: Windows fill entire viewport */
.window {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  transform: none !important;
  width: 100% !important;
  height: 100% !important;
  background: #c0c0c0;
  border: 2px solid;
  border-color: #dfdfdf #000000 #000000 #dfdfdf;
  display: none !important;
  z-index: 1;
  padding-right: 3px;
}

.window.active {
  display: flex !important;
  flex-direction: column;
}

/* Windows 98 UI Styles */
.title-bar {
  background: #000080;
  color: #ffffff;
  padding: 4px; /* Larger padding */
  font-weight: bold;
  display: flex;
/* justify-content: space-between; */
  align-items: center;
  flex-shrink: 0;
  height: 40px;
  width: 100%;
}

.title-bar.inactive {
  background: #808080;
}

.title-bar-text {
  padding: 0 10px;
  font-size: 16px; /* Larger title text */
}

.title-bar-controls {
  display: flex;
  gap: 4px;
  right: 10px;
  position: absolute;
}

.title-btn {
  padding: 2px 8px;
  font-size: 12px;
  min-width: 50px;
}

.window-body {
  padding: 15px; /* Larger padding */
  background: #c0c0c0;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Buttons */
.btn {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #dfdfdf #000000 #000000 #dfdfdf;
  padding: 6px 12px; /* Larger padding */
/*  font-family: 'MS Sans Serif', sans-serif; */
  font-family: corsl;
  font-size: 16px; /* Larger font */
  cursor: pointer;
  min-width: 85px;
}

.btn:active {
  border-color: #000000 #dfdfdf #dfdfdf #000000;
}

.btn:disabled {
  color: #808080;
  cursor: not-allowed;
}

/* CRITICAL: Disconnect button styling */
.disconnect-btn {
  background: #ff0000;
  color: #ffffff;
  border-color: #ffcccc #800000 #800000 #ffcccc;
  margin-left: auto; /* Push to right */
}

.disconnect-btn:active {
  border-color: #800000 #ffcccc #ffcccc #800000;
}

.button-row {
/*  display: flex; */
  gap: 8px;
  margin-top: 15px;
  flex-shrink: 0;
  align-items: center; /* Center align items */
  text-align: right;
}

/* Inputs */
.text-input {
  width: 100%;
  padding: 6px; /* Larger padding */
  border: 2px inset #c0c0c0;
  background: #ffffff;
/*  font-family: 'MS Sans Serif', sans-serif; */
  font-family: corsl;
  font-size: 16px; /* Larger font */
  margin-top: 0px;
  height: 40px;
}

/* Nickname Window */
#nickWindow {
  justify-content: center;
  align-items: center;
}

#nickWindow .window-body {
  width: 400px; /* Slightly wider */
  height: auto;
}

.status-message {
  margin-top: 8px;
  min-height: 24px;
  color: #000080;
  font-weight: bold;
  font-size: 14px;
}

/* Channel List */
.channel-list {
  border: 2px inset #c0c0c0;
  background: #ffffff;
  flex: 1;
  overflow-y: auto;
  margin-bottom: 15px;
}

.channel-item {
  padding: 4px 8px; /* Larger padding */
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  font-size: 24px;
}

.channel-item:hover {
  background: #000080;
  color: #ffffff;
}

.channel-item.selected {
  background: #000080;
  color: #ffffff;
}

.user-counter {
  color: #808080;
}

/* Chat Window - CRITICAL: Users list integrated with chat feed */
#chatWindow {
  height: 100vh;
}

.chat-container {
  display: flex;
  flex: 1;
  overflow: hidden;
  flex-direction: row-reverse; /* Users list on right */
}

.chat-area {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.chat-feed {
  flex: 1;
  border: 2px inset #c0c0c0;
  background: #ffffff;
  padding: 8px;
  overflow-y: auto;
/*  font-family: 'Courier New', monospace; */
  font-family: corsl;
  font-size: 16px; /* Larger font */
  white-space: pre-wrap;
}

/* CRITICAL: User list integrated into chat feed */
.user-list {
  width: 250px; /* Wider */
  border: 2px inset #c0c0c0;
  background: #ffffff;
  padding: 8px;
  overflow-y: auto;
  font-size: 14px; /* Larger font */
  display: block !important; /* Always visible on desktop */
  margin-left: 10px;
  height: 95%;
  font-weight: bold;
}

.user-list.op {
  color: #ff0000;
  font-weight: bold;
}

.user-item {
  padding: 3px 0; /* Larger padding */
  cursor: pointer;
  font-size: 14px;
}

.user-item:hover {
  background: #000080;
  color: #ffffff;
}

/* CRITICAL: Input area at bottom, above taskbar */
.input-area {
  display: flex;
  gap: 8px;
  padding: 8px;
  background: #c0c0c0;
  border-top: 2px solid #000000;
  flex-shrink: 0;
  margin-bottom: 35px; /* Space for taskbar */
}

#messageInput {
  flex: 1;
}

/* Mobile Users Toggle - CRITICAL: Slide from right */
#usersToggleBtn {
  display: none;
}

@media (max-width: 768px) {
  /* Mobile: users list slides from right */
  .chat-container {
    flex-direction: row; /* Reset to normal on mobile */
  }
  
  .user-list {
    display: block !important;
    position: fixed;
    top: 57px; /* Below title bar */
    right: -165px; /* Hidden off-screen */
    bottom: 108px; /* Above input area + taskbar */
    width: 150px;
    z-index: 10;
    background: #f5f5f5;
    transition: right 0.3s ease;
    margin-left: 0;
    margin-right: 15px;
    height: unset;
  }
  
  .user-list.visible {
    right: 0; /* Slide in */
  }
  
  #usersToggleBtn {
    display: block;
  }
}

/* Private Chat Windows */
.private-window {
  position: fixed;
  bottom: 40px;
  right: 10px;
  max-width: 400px; /* Wider */
  width: 95%;
  height: 350px; /* Taller */
  background: #c0c0c0;
  border: 2px solid;
  border-color: #dfdfdf #000000 #000000 #dfdfdf;
  display: flex;
  flex-direction: column;
  z-index: 100;
}

.private-window.minimized {
  display: none;
  z-index: 100;
}
.private-window.topmost {
  z-index: 200; 
}

/* .private-window.flashing .title-bar {
  animation: flash 1s infinite;
} */

@keyframes flash {
  0%, 100% { background: #000080; color:#fff; }
  50% { background: #c0c0c0; color: #000;}
}

.private-feed {
  flex: 1;
  border: 2px inset #c0c0c0;
  background: #ffffff;
  padding: 8px;
  overflow-y: auto;
/*  font-family: 'Courier New', monospace; */
  font-family: corsl;
  font-size: 16px; /* Larger font */
  white-space: pre-wrap;
}

/* CRITICAL: Private chat nicknames bold */
.private-feed strong, .chat-feed strong {
  font-weight: bold;
/*  color: #000; */
  float: left;
}

.private-input-area {
  display: flex;
  gap: 8px;
  padding: 8px;
  background: #c0c0c0;
  border-top: 2px solid #000000;
  flex-shrink: 0;
}

/* Taskbar */
#taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  min-height: 35px;
  background: #c0c0c0;
  border-top: 2px solid #dfdfdf;
  display: flex;
  gap: 2px;
  padding: 2px;
  z-index: 200;
  flex-wrap: wrap;
}

.taskbar-item {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #dfdfdf #000000 #000000 #dfdfdf;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  min-width: 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.taskbar-item:active {
  border-color: #000000 #dfdfdf #dfdfdf #000000;
}

.taskbar-item.flashing {
  animation: flash 1s infinite;
}

.close-btn {
  margin-left: 5px;
  color: #000;
  font-weight: bold;
}

/* Dialog Overlay */
.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.dialog-overlay.visible {
  display: flex;
}

/* CRITICAL: Dialog window - force visible and centered */
.dialog {
  width: 400px; /* Wider */
  background: #c0c0c0;
  border: 2px solid;
  border-color: #dfdfdf #000000 #000000 #dfdfdf;
  display: block !important;
  position: relative !important;
  top: auto !important;
  left: auto !important;
  transform: none !important;
}

.dialog .window-body {
  height: auto !important;
}
.channel-list-w {
    margin-bottom: 35px;
}