/* Auth Screen Styling */
.overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: #1e1f22;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.auth-box {
    background-color: #313338;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.auth-box h2 { color: white; margin-bottom: 20px; }

.input-group input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 4px;
    border: none;
    background-color: #1e1f22;
    color: white;
    outline: none;
}

.auth-buttons { display: flex; gap: 10px; }

.auth-buttons button {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    background-color: #5865f2;
    color: white;
}

.auth-buttons button.secondary { background-color: #4e5058; }
.auth-buttons button:hover { opacity: 0.9; }

/* User Profile Sidebar Info */
.user-profile {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #3f4147;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#btn-logout {
    background: none; border: none; color: #da373c; cursor: pointer; font-size: 0.85rem;
}

/* Helper Class to Hide Elements */
.hidden { display: none !important; }
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #313338; /* Discord dark grey */
    color: #dbdee1;
    height: 100vh;
    display: flex;
}

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

/* Sidebar Styling */
.sidebar {
    width: 240px;
    background-color: #2b2d31;
    display: flex;
    flex-direction: column;
    padding: 15px;
}

.app-logo {
    font-weight: bold;
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: #fff;
}

.channel-list {
    list-style: none;
}

.channel-list li {
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 4px;
    color: #949ba4;
}

.channel-list li:hover, .channel-list li.active {
    background-color: #35373c;
    color: #fff;
}

/* Chat Area Styling */
.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #313338;
}

.chat-header {
    height: 50px;
    border-bottom: 1px solid #1f2023;
    display: flex;
    align-items: center;
    padding: 0 20px;
    background-color: #313338;
}

.chat-header h2 {
    font-size: 1rem;
    color: #fff;
}

.message-container {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message { 
    line-height: 1.4;
}

.username {
    font-weight: 600;
    color: #f2f3f5;
    margin-right: 8px;
}

.timestamp {
    font-size: 0.75rem;
    color: #949ba4;
}

.message-text {
    margin-top: 4px;
    color: #dbdee1;
}

/* Input Area Styling */
.chat-input-area {
    padding: 0 20px 24px 20px;
}

#message-form {
    display: flex;
    background-color: #383a40;
    border-radius: 8px;
    padding: 10px;
}

#msg-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #dbdee1;
    font-size: 1rem;
    padding: 5px;
}

#message-form button {
    background-color: #5865f2; /* Discord Blurple */
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

#message-form button:hover {
    background-color: #4752c4;
}
