#messages-container {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: white;
}

#messages {
    font-size: 11px;
    line-height: 1.4;
}/* RaqRoom CSS - 2008 Style */
body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
    margin: 0;
    padding: 0;
    background: #f0f0f0;
    color: #333;
}

/* Update your existing CSS with these changes */

/* Make sidebar a flex container */
#sidebar {
    width: 200px;
    border-right: 1px solid #ddd;
    background: #eee;
    padding: 15px;
    overflow-y: hidden; /* Change from auto to hidden */
    display: flex;
    flex-direction: column;
}

#sidebar h3 {
    margin-top: 0;
    color: #357abd;
    font-size: 14px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
    flex-shrink: 0; /* Don't shrink the header */
}

/* Make users list scrollable and take available space */
#users-list {
    flex: 1; /* Take up remaining space */
    overflow-y: auto; /* Make it scrollable */
    margin-bottom: 15px;
    min-height: 0; /* Important for flex child to shrink */
}

#users-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#users-list li {
    padding: 3px 0;
    font-size: 11px;
}

/* Status controls - collapsible */
#status-controls {
    flex-shrink: 0; /* Don't shrink */
}

#status-controls h4 {
    margin: 0 0 10px 0;
    font-size: 12px;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px;
    background: #ddd;
    border-radius: 3px;
    transition: background 0.2s ease;
}

#status-controls h4:hover {
    background: #ccc;
}

#status-controls h4:after {
    content: '^';
    font-weight: bold;
    transition: transform 0.3s ease;
}

#status-controls.collapsed h4:after {
    transform: rotate(180deg);
}

#status-buttons {
    max-height: 100px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

#status-controls.collapsed #status-buttons {
    max-height: 0;
}

.status-btn {
    display: block;
    width: 100%;
    margin-bottom: 5px;
    padding: 5px;
    background: #e0e0e0;
    border: 1px solid #ccc;
    cursor: pointer;
    font-size: 10px;
    border-radius: 2px;
}

.status-btn:hover {
    background: #d0d0d0;
}

.status-btn.active {
    background: #4a90e2;
    color: white;
    border-color: #357abd;
}

/* Header - Reduced height */
#header {
    background: linear-gradient(to bottom, #4a90e2 0%, #357abd 100%);
    background: -webkit-gradient(linear, left top, left bottom, from(#4a90e2), to(#357abd));
    background: -moz-linear-gradient(top, #4a90e2 0%, #357abd 100%);
    height: 45px; /* Reduced from 60px */
    border-bottom: 2px solid #2a5a8d;
    padding: 0 20px;
    position: relative;
}

.logo {
    float: left;
    padding-top: 5px; /* Moved up from 10px */
}

#logo {
    height: 30px; /* Reduced from 40px */
    width: auto;
}

.nav {
    float: right;
    padding-top: 12px; /* Moved up from 20px */
    color: white;
    font-weight: bold;
}

.nav button {
    margin-left: 10px;
    padding: 5px 12px;
    background: #2a5a8d;
    border: 1px solid #1a4a7d;
    color: white;
    cursor: pointer;
    border-radius: 3px;
    font-size: 11px;
}

.nav button:hover {
    background: #1a4a7d;
}

/* Main Container */
#main-container {
    width: 95%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 10px;
}

/* Auth Section */
#auth-section {
    text-align: center;
    margin-top: 50px;
}

.form-container {
    display: inline-block;
    background: white;
    border: 2px solid #ccc;
    border-radius: 5px;
    padding: 30px;
    margin: 20px;
    box-shadow: 2px 2px 5px #aaa;
    text-align: left;
    min-width: 300px;
}

.form-container h2 {
    margin-top: 0;
    color: #357abd;
    text-align: center;
    font-size: 18px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 12px;
    box-sizing: border-box;
}

.form-group input:focus {
    border-color: #4a90e2;
    outline: none;
    background: #f9f9ff;
}

.form-container button {
    width: 100%;
    padding: 10px;
    background: #4a90e2;
    border: 1px solid #357abd;
    color: white;
    font-weight: bold;
    cursor: pointer;
    border-radius: 3px;
    font-size: 13px;
}

.form-container button:hover {
    background: #357abd;
}

.form-container p {
    text-align: center;
    margin-top: 15px;
    font-size: 11px;
}

.form-container a {
    color: #4a90e2;
    text-decoration: none;
}

.form-container a:hover {
    text-decoration: underline;
}

/* Chat Section */
#chat-container {
    background: white;
    border: 2px solid #ccc;
    border-radius: 5px;
    height: 500px;
    display: flex;
    box-shadow: 2px 2px 5px #aaa;
}



/* Chat Section */
#chat-container {
    background: white;
    border: 2px solid #ccc;
    border-radius: 5px;
    height: 500px;
    display: flex;
    box-shadow: 2px 2px 5px #aaa;
}

#sidebar {
    width: 200px;
    border-right: 1px solid #ddd;
    background: #eee;
    padding: 15px;
    overflow-y: auto;
}

#sidebar h3 {
    margin-top: 0;
    color: #357abd;
    font-size: 14px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
}

#users-list {
    margin-bottom: 20px;
}

#users-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#users-list li {
    padding: 3px 0;
    font-size: 11px;
}

.user-online {
    color: #22aa22;
    font-weight: bold;
}

.user-away {
    color: #ffaa00;
}

.user-busy {
    color: #aa2222;
}

.user-offline {
    color: #888;
}

#status-controls h4 {
    margin: 0 0 10px 0;
    font-size: 12px;
    color: #555;
}

.status-btn {
    display: block;
    width: 100%;
    margin-bottom: 5px;
    padding: 5px;
    background: #e0e0e0;
    border: 1px solid #ccc;
    cursor: pointer;
    font-size: 10px;
    border-radius: 2px;
}

.status-btn:hover {
    background: #d0d0d0;
}

.status-btn.active {
    background: #4a90e2;
    color: white;
    border-color: #357abd;
}

/* Chat Area */
#chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.message {
    margin-bottom: 8px;
    padding: 5px 8px;
    border-radius: 3px;
    background: #f9f9f9;
    border-left: 3px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.message-content-wrapper {
    flex: 1;
}

/* Message buttons - appear on hover at far right end */
.message-buttons {
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    gap: 2px;
    margin-left: 20px;
    flex-shrink: 0;
}

.message:hover .message-buttons {
    opacity: 1;
}

.message-edit,
.message-delete {
    padding: 1px 4px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #bbb;
    color: #333;
    cursor: pointer;
    border-radius: 2px;
    font-size: 8px;
    font-weight: bold;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.message-edit:hover {
    background: #4a90e2;
    color: white;
    border-color: #357abd;
}

.message-delete:hover {
    background: #cc4444;
    color: white;
    border-color: #aa2222;
}

.message:hover .message-actions {
    opacity: 1;
}

.message-edit,
.message-delete {
    padding: 1px 4px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #bbb;
    color: #333;
    cursor: pointer;
    border-radius: 2px;
    font-size: 8px;
    font-weight: bold;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.message-edit:hover {
    background: #4a90e2;
    color: white;
    border-color: #357abd;
}

.message-delete:hover {
    background: #cc4444;
    color: white;
    border-color: #aa2222;
}

.message-timestamp {
    color: #888;
    font-size: 10px;
}

.message-username {
    font-weight: bold;
    color: #357abd;
}

.message-content {
    margin-left: 10px;
}

.message-edited {
    color: #888;
    font-style: italic;
    font-size: 10px;
}

/* Message Input */
#message-input-container {
    border-top: 1px solid #ddd;
    padding: 10px 15px;
    background: #f8f8f8;
}

#message-input-container form {
    display: flex;
    gap: 10px;
}

#message-input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 12px;
}

#message-input:focus {
    border-color: #4a90e2;
    outline: none;
}

#message-input-container button {
    padding: 8px 15px;
    background: #4a90e2;
    border: 1px solid #357abd;
    color: white;
    cursor: pointer;
    border-radius: 3px;
    font-size: 11px;
}

#message-input-container button:hover {
    background: #357abd;
}

/* Status Messages */
#status-message {
    position: fixed;
    top: 65px; /* Adjusted for shorter header */
    right: 20px;
    padding: 10px 15px;
    background: #333;
    color: white;
    border-radius: 3px;
    font-size: 11px;
    z-index: 1000;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
}

#status-message.success {
    background: #22aa22;
}

#status-message.error {
    background: #aa2222;
}

/* Utility */
.clearfix:after {
    content: "";
    display: table;
    clear: both;
}

/* Scrollbars (WebKit) */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}
