body {
    background-color: #1a1a2e;
    color: #eaeaea;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.chat-container {
    background: #162447;
    width: 100%;
    max-width: 500px;
    height: 80%;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    border-bottom: 2px solid #1b2a47;
    display: flex;
    flex-direction: column;
    gap: 10px;
    scrollbar-width: thin;
    scrollbar-color: #4b92db #121212;
}

#chat-messages::-webkit-scrollbar {
    width: 6px;
}

#chat-messages::-webkit-scrollbar-thumb {
    background-color: #4b92db;
    border-radius: 3px;
}

#chat-messages::-webkit-scrollbar-track {
    background-color: #121212;
}

#chat-messages div {
    padding: 15px;
    border-radius: 12px;
    max-width: 80%;
    line-height: 1.4;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    position: relative;
}

.timestamp {
    font-size: 0.8em;
    color: #aaa;
    position: absolute;
    right: 10px;
    bottom: 10px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

#chat-messages div:hover .timestamp {
    opacity: 1;
}

.user-message {
    background-color: #4b92db;
    align-self: flex-end;
    text-align: right;
    color: #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    border: 3px solid #1f4068;
}

.other-message {
    background-color: #1f4068; 
    align-self: flex-start;
    text-align: left;
    color: #eaeaea;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

input {
    width: calc(100% - 100px);
    padding: 12px 20px;
    border: none;
    border-radius: 50px;
    margin: 10px;
    background-color: #2a2a45;
    color: #eaeaea;
    font-size: 16px;
    transition: background-color 0.3s;
}

input:focus {
    outline: none;
    background-color: #4b92db;
}

button {
    width: 90px;
    padding: 12px;
    background-color: #4b92db;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    margin: 10px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #1f4068;
    transform: translateY(-2px); 
}

button:active {
    transform: translateY(1px); 
}

.chat-container .input-container {
    display: flex;
    align-items: center;
    padding: 10px;
}

.chat-container .input-container input {
    flex-grow: 1;
    margin-right: 10px;
}

.chat-container .input-container button {
    margin-left: 10px;
}

.username {
    color: #4b92db;
    cursor: pointer;
    text-decoration: underline;
}

.username:hover {
    color: #1f4068;
}

.popup {
    display: none; 
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
}

.popup-content {
    background-color: #162447;
    padding: 20px;
    border-radius: 12px;
    max-width: 400px;
    color: white;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    position: relative;
}

.close {
    color: white;
    font-size: 24px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: pointer;
}

.close:hover {
    color: #4b92db;
}

#chat-messages a {
    color: #4b92db;
    text-decoration: none;
}

#chat-messages a:hover {
    text-decoration: underline;
}

.typing-status {
    color: #eaeaea;
    font-size: 14px;
    margin: 10px;
    display: none;
}

.typing-status span {
    color: #4b92db;
    font-weight: bold;
}
