
/* Chat UI Styles */
.chat-button, .admin-debug-button {
    position: fixed;
    width: 60px;
    height: 60px;
    background-color: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 25px !important;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.chat-button {
    bottom: 80px;
    right: 20px;
}

.admin-debug-button {
    top: 80px;
    left: 20px;
    display: none !important; /* Hidden by default, shown via JS */
}

.chat-button:hover, .admin-debug-button:hover {
    background-color: rgba(0, 0, 0, 0.6);
    transform: scale(1.1);
}

.chat-button img, .admin-debug-button img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.chat-container {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    height: 400px;
    background-color: #1e1e1e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    display: none;
    flex-direction: column;
    z-index: 10000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    resize: both;
    min-width: 300px;
    min-height: 200px;
}

.chat-container.resizing {
    user-select: none;
}

.chat-header {
    padding: 10px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    color: #fff;
    background-color: #2a2a2a;
    cursor: move;
    user-select: none;
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.chat-message {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 8px;
    border-radius: 5px;
    word-wrap: break-word;
    font-size: 0.9rem;
}

.chat-message:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.08);
}

.chat-input-area {
    padding: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 10px;
    background-color: rgba(0, 0, 0, 0.2);
}

#chat-input {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s ease;
}

#chat-input:focus {
    border-color: rgba(255, 255, 255, 0.3);
}

#chat-send {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 5px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

#chat-send:hover {
    background: rgba(255, 255, 255, 0.2);
}

.chat-crown {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 4px;
}

.chat-username {
    font-weight: bold;
}

.chat-username.special {
    color: yellow;
}

.chat-username.normal {
    color: white;
}

.chat-text {
    color: white;
}

.chat-timestamp {
    color: #888;
    font-size: 0.8rem;
    margin-right: 5px;
}

.chat-prune-btn {
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.7rem;
    cursor: pointer;
    margin-left: 10px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.chat-prune-btn:hover {
    opacity: 1;
}

.chat-delete-msg {
    color: #ff4444;
    cursor: pointer;
    margin-left: 5px;
    font-weight: bold;
    font-size: 0.8rem;
}

.chat-delete-msg:hover {
    text-decoration: underline;
}
