#chatWindow {
    width: 1200px;
    height: 600px;
}

.chat-container {
    display: flex;
    height: 100%;
}

.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 2px inset #fff;
    margin: 10px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.chat-input-container {
    padding: 10px;
    background: #c0c0c0;
    border-top: 2px solid #808080;
    display: flex;
    gap: 10px;
}

.chat-input {
    flex: 1;
    padding: 4px;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    font-size: 14px;
    font-family: 'Win95Sans', sans-serif;
    background: #fff;
    color: #000;
}

.chat-input:focus {
    outline: none;
    border-color: #000080;
}

.chat-send-btn {
    font-family: "Win95Sans", sans-serif; 
    background: #c0c0c0;
    border: 2px solid;
    border-color: #dfdfdf #808080 #808080 #dfdfdf;
    padding: 3px 10px;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    min-height: 24px;
}

.chat-send-btn:active {
    border-color: #808080 #dfdfdf #dfdfdf #808080;
}

.chat-right-panel {
    width: 250px;
    margin: 10px 10px 10px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-auth {
    background: #c0c0c0;
    border: 2px inset #fff;
    padding: 10px;
}

.chat-sidebar {
    background: #c0c0c0;
    border: 2px inset #fff;
    flex: 1;
    overflow-y: auto;
}

.chat-users {
    padding: 10px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-form input {
    padding: 4px;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    font-size: 14px;
    font-family: 'Win95Sans', sans-serif;
    background: #fff;
    color: #000;
}

.auth-form input:focus {
    outline: none;
    border-color: #000080;
}

.auth-form button {
    font-family: "Win95Sans", sans-serif; 
    background: #c0c0c0;
    border: 2px solid;
    border-color: #dfdfdf #808080 #808080 #dfdfdf;
    padding: 3px 10px;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    min-height: 24px;
}

.auth-form button:active {
    border-color: #808080 #dfdfdf #dfdfdf #808080;
}

#passwordBox {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.logout-button {
    width: 100%;
    margin-top: 10px;
    background: #c0c0c0;
    border: 2px outset #fff;
    padding: 5px;
    cursor: pointer;
    font-family: 'Win95Sans', sans-serif;
}

.logout-button:active {
    border-style: inset;
}

.message {
    display: flex;
    align-items: start;
    margin-bottom: 15px;
    max-width: 80%;
}

.message.sent {
    margin-left: auto;
    flex-direction: row-reverse;
}

.message-avatar {
    width: 32px;
    height: 32px;
    border: 1px solid #000;
    margin: 0 10px;
}

.message-content {
    background: #f0f0f0;
    padding: 8px;
    border: 1px solid #808080;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    font-size: 12px;
    gap: 20px;
}

.message-username {
    font-weight: bold;
    min-width: 100px;
}

.message-time {
    color: #666;
    flex-shrink: 0;
}

.message-text {
    word-break: break-word;
}

.password-generated {
    margin-top: 10px;
    padding: 10px;
    background: #ffffe1;
    border: 1px solid #808080;
    font-size: 12px;
}

.user-profile {
    padding: 10px;
    background: #fff;
    border: 1px solid #808080;
}

.user-profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.user-profile-avatar {
    width: 48px;
    height: 48px;
    border: 1px solid #000;
    margin-right: 10px;
}

.user-profile-info {
    flex: 1;
    min-width: 0; /* Важно для работы text-overflow */
}

.user-profile-name {
    font-weight: bold;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-profile-stats {
    font-size: 12px;
    color: #666;
}

.user-stats {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid #808080;
    position: relative;
}

.user-stats:last-child {
    margin-bottom: 0;
}

.user-stats img {
    width: 32px;
    height: 32px;
    margin-right: 10px;
    border: 1px solid #000;
}

.user-stats-info {
    flex: 1;
    min-width: 0; /* Важно для работы text-overflow */
}

.user-stats-name {
    font-weight: bold;
    margin-bottom: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 20px; /* Место для индикатора онлайна */
}

.user-stats-count {
    font-size: 12px;
    color: #5c5b5b;
}

.user-online::before {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: #00ff00;
    border-radius: 50%;
    border: 1px solid #808080;
} 

.auth-form-container {
    width: 300px;
    margin: 40px auto;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #dfdfdf #808080 #808080 #dfdfdf;
    padding: 20px;
}

.auth-form-title {
    background: #000080;
    color: #fff;
    padding: 6px 8px;
    font-weight: bold;
    margin-bottom: 16px;
}

.auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-form-group label {
    display: block;
    font-size: 14px;
    font-family: 'Win95Sans', sans-serif;
}

.auth-input {
    width: 100%;
    height: 24px;
    padding: 4px;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    font-size: 14px;
    font-family: 'Win95Sans', sans-serif;
    background: #fff;
    color: #000;
    box-sizing: border-box;
}

.auth-input:focus {
    outline: none;
    border-color: #000080;
}

.auth-button {
    width: 100%;
    font-family: "Win95Sans", sans-serif;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #dfdfdf #808080 #808080 #dfdfdf;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    outline: none;
    height: 30px;
}

.auth-button:active {
    border-color: #808080 #dfdfdf #dfdfdf #808080;
}

.auth-form-actions {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.auth-form-generated {
    margin-top: 20px;
    padding: 12px;
    background: #ffffe1;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
}

.auth-form-password {
    font-family: monospace;
    font-size: 16px;
    padding: 8px;
    margin: 12px 0;
    background: #fff;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    text-align: center;
}

.auth-form-hint {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin-top: 8px;
    font-family: 'Win95Sans', sans-serif;
} 

.chat-status-bar {
    height: 23px;
    background: #c0c0c0;
    border-top: 1px solid #808080;
    padding: 2px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    font-family: "MS Sans Serif", Tahoma, sans-serif;
}

.chat-connection-status {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}

.chat-connected {
    background-color: #00ff00;
}

.chat-disconnected {
    background-color: #ff0000;
}

#zkChatStatusMessage {
    margin-left: 5px;

}

#zkChatOnlineCount {
    margin-right: 5px;
} 
