/* #game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #0f3460 0%, #16213e 100%);
} */

/* Replace the chat container CSS with this: */
.imsolo-chat-container {
    position: absolute;
    bottom: 50px;
    left: 16px;
    width: 350px;
    height: 250px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    pointer-events: auto;
    resize: both;
    overflow: hidden;
    min-width: 250px;
    min-height: 150px;
    max-width: 600px;
    max-height: 500px;
    backdrop-filter: blur(5px);
    opacity: 0.5;
}

.imsolo-chat-container.theme-transparent {
    background: rgba(0, 0, 0, 0);
}

.imsolo-chat-container.theme-dark {
    background: rgba(0, 0, 0, 0.85);
}

.imsolo-chat-container.theme-light {
    background: rgba(111, 111, 111, 0.95);
}

.imsolo-chat-container.theme-red {
    background: rgba(96, 15, 16, 0.9);
}

.imsolo-chat-container.theme-blue {
    background: rgba(15, 52, 96, 0.9);
}

.imsolo-chat-container.theme-green {
    background: rgba(16, 46, 30, 0.9);
}

.imsolo-chat-resize-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.3);
    z-index: 10;
}

.imsolo-chat-resize-handle.bottom-right {
    bottom: 0;
    right: 0;
    cursor: nwse-resize;
    border-radius: 0 0 8px 0;
}

.imsolo-chat-resize-handle.top-right {
    top: 0;
    right: 0;
    cursor: nesw-resize;
    border-radius: 0 8px 0 0;
}

.imsolo-chat-resize-handle:hover {
    background: rgba(255, 255, 255, 0.5);
}

.imsolo-chat-header {
    padding: 2px 12px 2px 12px;
    background: rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 12px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    user-select: none;
}

.imsolo-chat-header-controls {
    display: flex;
    gap: 5px;
}

.imsolo-chat-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
}

.imsolo-chat-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.imsolo-chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.imsolo-chat-messages::-webkit-scrollbar {
    width: 8px;
}

.imsolo-chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.imsolo-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.imsolo-chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.imsolo-chat-message {
    margin-bottom: 4px;
    padding: 4px 6px;
    border-radius: 4px;
    transition: background 0.2s;
    cursor: pointer;
}

.imsolo-chat-message:hover {
    background: rgba(255, 255, 255, 0.05);
}

.imsolo-chat-message.system {
    color: #ffd700;
    font-style: italic;
    opacity: 0.8;
}

.imsolo-chat-message.blocked {
    opacity: 0.5;
    font-style: italic;
}

.imsolo-chat-message.blocked .imsolo-chat-text {
    color: #888;
}

.imsolo-chat-username {
    font-weight: bold;
    margin-right: 4px;
}

.imsolo-chat-text {
    color: #e0e0e0;
}

.theme-light .imsolo-chat-text {
    color: #333;
}

.imsolo-chat-timestamp {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.4);
    margin-left: 6px;
}

.imsolo-chat-input-container {
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.imsolo-chat-input {
    width: 100%;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: white;
    font-size: 13px;
    outline: none;
    font-family: inherit;
}

.theme-light .imsolo-chat-input {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

.imsolo-chat-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.imsolo-chat-input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.imsolo-chat-context-menu {
    position: absolute;
    background: rgba(20, 20, 20, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 4px 0;
    min-width: 150px;
    display: none;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.imsolo-chat-context-menu-item {
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
    color: #e0e0e0;
    transition: background 0.2s;
}

.imsolo-chat-context-menu-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.imsolo-chat-context-menu-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 4px 0;
}

.imsolo-chat-settings {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #2b2d42d1;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    padding: 20px;
    min-width: 350px;
    display: none;
    z-index: 2000;
    backdrop-filter: blur(10px);
}

.imsolo-chat-settings h3 {
    margin-bottom: 15px;
    color: #ffd700;
    font-size: 16px;
}

.imsolo-chat-settings-section {
    margin-bottom: 20px;
}

.imsolo-chat-settings-label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: #e0e0e0;
}

.imsolo-chat-settings-select {
    width: 100%;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    color: white;
    font-size: 13px;
    cursor: pointer;
}

.imsolo-chat-settings-select option {
    background: #1a1a1a;
    color: white;
}

.imsolo-chat-muted-list {
    max-height: 150px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 8px;
    margin-top: 8px;
}

.imsolo-chat-muted-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px;
    margin-bottom: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    color: white;
}

.imsolo-chat-unmute-btn {
    background: rgba(255, 100, 100, 0.3);
    border: none;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 11px;
}

.imsolo-chat-unmute-btn:hover {
    background: rgba(255, 100, 100, 0.5);
}

.imsolo-chat-close-settings {
    width: 100%;
    padding: 10px;
    background: rgba(100, 150, 255, 0.3);
    border: 1px solid rgba(100, 150, 255, 0.5);
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    margin-top: 10px;
}

.imsolo-chat-close-settings:hover {
    background: rgba(100, 150, 255, 0.5);
}

#test-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 15px;
    backdrop-filter: blur(5px);
}

#test-controls h3 {
    margin-bottom: 10px;
    font-size: 14px;
    color: #ffd700;
}

#test-controls button {
    display: block;
    width: 100%;
    margin-bottom: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

#test-controls button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.hidden {
    display: none !important;
}

/* Add this to your CSS */
.imsolo-chat-container.minimized {
    width: 80px !important;
    height: 40px !important;
    min-width: 80px !important;
    min-height: 40px !important;
}

.imsolo-chat-container.minimized .imsolo-chat-messages,
.imsolo-chat-container.minimized .imsolo-chat-input-container,
.imsolo-chat-container.minimized .imsolo-chat-resize-handle {
    display: none !important;
}

.imsolo-chat-container.minimized .imsolo-chat-header {
    cursor: pointer;
}

.imsolo-chat-container.minimized {
    display: none !important;
}

.imsolo-chat-restore-btn {
    position: absolute;
    bottom: 50px;
    left: 16px;
    width: 50px;
    height: 50px;
    background: rgb(0 0 0 / 15%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    backdrop-filter: blur(5px);
    transition: all 0.2s;
    pointer-events: auto;
/*     z-index: 999; */
}

.imsolo-chat-restore-btn:hover {
    background: rgba(0, 0, 0, 0.95);
    transform: scale(1.1);
}

.imsolo-chat-restore-btn.visible {
    display: flex;
}

.imsolo-white-msg {
    color: white;
}

.imsolo-dark-msg {
    color: #848585;
}

.imsolo-black-msg {
    color: #000000;
}