#game-container {
    width: 100%;
    height: 100%;
    background: #05060f;
    overflow: hidden;
    position: relative;
    display: flex;
}

canvas {
    flex-grow: 1;
    display: block;
}

/* Правая панель чата */
.side-chat-panel {
    width: 320px;
    background: linear-gradient(180deg, #0a0b1e 0%, #05060f 100%);
    border-left: 2px solid var(--primary);
    display: flex;
    flex-direction: column;
    padding: 20px;
    z-index: 1000;
    box-shadow: -15px 0 40px rgba(0,0,0,0.8);
}

.exit-hub-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 12px;
    border-radius: 12px;
    font-family: var(--font-accent);
    font-weight: 900;
    font-size: 0.7rem;
    text-align: center;
    text-decoration: none;
    margin-bottom: 15px;
    transition: 0.3s;
    letter-spacing: 1px;
}

.exit-hub-btn:hover {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 20px var(--glow-p);
}

.chat-history {
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-right: 8px;
    mask-image: linear-gradient(to bottom, transparent, black 5%, black 95%, transparent);
}

.chat-msg {
    background: rgba(194, 147, 255, 0.05);
    border-radius: 10px;
    padding: 10px;
    border-left: 2px solid var(--primary);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: translateX(0); } }

.chat-msg .sender {
    font-weight: 800;
    color: var(--secondary);
    font-size: 0.65rem;
    text-transform: uppercase;
    display: block;
    margin-bottom: 3px;
}

.chat-msg .text {
    color: #fff;
    font-size: 0.85rem;
    line-height: 1.4;
    opacity: 0.9;
}

.chat-input-container {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(194, 147, 255, 0.3);
    border-radius: 12px;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    transition: 0.3s;
}

.chat-input-container:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--glow-p);
}

.chat-input {
    flex: 1;
    background: none;
    border: none;
    color: #fff;
    padding: 8px 0;
    font-family: var(--font-main);
    outline: none;
    font-size: 0.9rem;
}

.chat-btn {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.chat-btn:hover { transform: scale(1.2); }

.chat-history::-webkit-scrollbar { width: 3px; }
.chat-history::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 10px; }
