
:root {
    --color-primary: #007bff;
    --color-secondary: #6c757d;
    --color-light: #f8f9fa;
    --color-dark: #343a40;
    --panel-width-desktop: 280px;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    /* Using Inter font */
    background-color: var(--color-light);
    color: var(--color-dark);
    height: 100vh;
    overflow: hidden;
}

#app-container {
    display: flex;
    width: 100%;
    height: 100%;
}

/* --- Panel Base Styles --- */
.panel {
    display: flex;
    flex-direction: column;
    border-right: 1px solid #ccc;
    overflow-y: auto;
    background: white;
    padding: 15px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

/* --- LEFT & RIGHT PANEL (Sidebars) --- */
#left-panel,
#right-panel {
    width: var(--panel-width-desktop);
    flex-shrink: 0;
}

#right-panel {
    border-right: none;
    border-left: 1px solid #ccc;
}

/* --- MIDDLE PANEL (Main Chat) --- */
#chat-panel {
    flex-grow: 1;
    /* Takes up all available space */
    display: flex;
    flex-direction: column;
    background: var(--color-light);
}

/* --- Message Area --- */
#messages-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
    padding: 0;
    overflow: hidden;
    /* Contains filter and message list */
}

#filter-bar {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    background: #f1f1f1;
    flex-shrink: 0;
}

#filter-input {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
    font-size: 14px;
}

#filter-button {
    background: var(--color-secondary);
    color: white;
    border: none;
    padding: 8px 15px;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
    transition: background 0.2s;
}

#filter-button:hover {
    background: #5a6268;
}

#messages {
    list-style-type: none;
    padding: 10px;
    margin: 0;
    flex-grow: 1;
    overflow-y: auto;
}

.msg-item {
    padding: 8px 10px;
    border-radius: 8px;
    margin-bottom: 5px;
    line-height: 1.4;
    display: flex;
    /* Ensures self messages align right correctly */
    flex-direction: column;
}

.msg-system {
    text-align: center;
    color: var(--color-secondary);
    font-size: 0.85em;
    margin: 10px 0;
}

.msg-self {
    text-align: right;
    background-color: #d1e7ff;
    align-self: flex-end;
    max-width: 80%;
    /* Ensure message bubbles don't take full width */
}

.msg-other {
    text-align: left;
    background-color: var(--color-light);
    align-self: flex-start;
    max-width: 80%;
}

.msg-user {
    font-weight: bold;
    margin-right: 5px;
}


/* --- Form/Input Area --- */
.input-area {
    background: white;
    padding: 10px;
    display: flex;
    border-top: 1px solid #ccc;
    flex-shrink: 0;
}

.input-area input {
    border: 1px solid #ccc;
    padding: 12px;
    flex-grow: 1;
    margin-right: 10px;
    border-radius: 6px;
    font-size: 16px;
}

.input-area button {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s, transform 0.1s;
    font-weight: 600;
}

.input-area button:hover:not(:disabled) {
    background: #0056b3;
    transform: translateY(-1px);
}

.input-area button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* --- Panel Content Styles --- */
.panel h3.h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--color-primary);
    color: var(--color-dark);
}

.user-list,
.link-list {
    list-style-type: none;
    padding: 0;
    margin-top: 10px;
}

.user-list li,
.link-list li {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 5px;
    cursor: pointer;
    transition: background 0.2s;
}

.user-list li:hover {
    background: #eee;
}

.user-list .current-user {
    background: #d1e7ff;
    font-weight: bold;
    color: var(--color-primary);
}

.link-list a {
    text-decoration: none;
    color: var(--color-primary);
    display: block;
    font-weight: 500;
}

/* --- Mobile Navigation Buttons (Hidden on Desktop) --- */
.mobile-nav {
    display: none;
    /* Default hidden */
    justify-content: space-around;
    padding: 10px;
    background: #cd5c5c;
    color: white;
    flex-shrink: 0;
    text-align: center;
}

.mobile-nav button {
    background: none;
    border: none;
    color: white;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 600;
    transition: background 0.2s;
}

.mobile-nav button.active,
.mobile-nav button:hover {
    background: var(--color-primary);
}

/* --- RESPONSIVE LAYOUT (Mobile View) --- */
@media (max-width: 800px) {
    #app-container {
        flex-direction: column;
        /* Stack vertically on mobile */
        overflow: hidden;
    }

    .mobile-nav {
        display: block;
        order: 1;
        position: relative;
        z-index: 99;
    }

    /* Make all panels take full width and hide side panels by default */
    .panel {
        width: 100%;
        height: 100%;
        position: absolute;
        /* Stacked position for mobile view */
        top: 0;
        left: 0;
        z-index: 10;
        display: none;
        padding-bottom: 60px;
        /* Space for the mobile nav */
    }

    /* Ensure main chat panel is visible by default */
    #chat-panel {
        display: flex;
        z-index: 20;
        margin-top: 25px;
    }
}
/* 1. Target the UNORDERED LIST (ul) */
.horizontal-list {
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px; 
    overflow-y: hidden;
}

.horizontal-list li {
    list-style-type: none;
    /* display: inline-block; */ 
    display: block;
}

.horizontal-list a {
    text-decoration: none;
    color: black;
}
.horizontal-list button {
   border:none;
   background-color:ghostwhite;
}
.in-chat{
    border: 2px solid lightblue;
    border-radius: 7px;
}